amiwm PKGBUILD file

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

amiwm PKGBUILD file

tur-users mailing list
Hello all

This is my first attempt to create a valid PKGBUILD file for Arch Linux.
It is about the missing amiwm window manager.

Please tell me what you think



# Maintainer: Panayotis Katsaloulis <[hidden email]>
pkgname=amiwm
pkgver=0.21pl2
pkgrel=1
pkgdesc="An X window manager that tries to make your display look and
feel like an Amiga® Workbench® screen"
arch=('x86_64' 'i686')
url="https://www.lysator.liu.se/~marcus/amiwm.html"
license=('FREEWARE')
source=('ftp://ftp.lysator.liu.se/pub/X11/wm/amiwm/amiwm0.21pl2.tar.gz')
md5sums=('3a47e887777e2be2978363220cf815ef')

build() {
    cd "$pkgname$pkgver"
    ./configure --prefix=/usr
    make
}

package() {
    cd "$pkgname$pkgver"
    make prefix="$pkgdir/usr" install
    rm $pkgdir/usr/bin/requestchoice
    install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
Reply | Threaded
Open this post in threaded view
|

Re: amiwm PKGBUILD file

Michael Kogan
Looks good to me, the only minor thing coming to mind is: Maybe

license=('custom')

is better fitting the specification:
https://wiki.archlinux.org/index.php/PKGBUILD#license

2018-01-23 22:59 GMT+01:00 Panayotis Katsaloulis via aur-general <
[hidden email]>:

> Hello all
>
> This is my first attempt to create a valid PKGBUILD file for Arch Linux.
> It is about the missing amiwm window manager.
>
> Please tell me what you think
>
>
>
> # Maintainer: Panayotis Katsaloulis <[hidden email]>
> pkgname=amiwm
> pkgver=0.21pl2
> pkgrel=1
> pkgdesc="An X window manager that tries to make your display look and
> feel like an Amiga® Workbench® screen"
> arch=('x86_64' 'i686')
> url="https://www.lysator.liu.se/~marcus/amiwm.html"
> license=('FREEWARE')
> source=('ftp://ftp.lysator.liu.se/pub/X11/wm/amiwm/amiwm0.21pl2.tar.gz')
> md5sums=('3a47e887777e2be2978363220cf815ef')
>
> build() {
>     cd "$pkgname$pkgver"
>     ./configure --prefix=/usr
>     make
> }
>
> package() {
>     cd "$pkgname$pkgver"
>     make prefix="$pkgdir/usr" install
>     rm $pkgdir/usr/bin/requestchoice
>     install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
> }
>
Reply | Threaded
Open this post in threaded view
|

Re: amiwm PKGBUILD file

DJ Lucas
In reply to this post by tur-users mailing list
On January 23, 2018 3:59:24 PM CST, Panayotis Katsaloulis via aur-general <[hidden email]> wrote:

>Hello all
>
>This is my first attempt to create a valid PKGBUILD file for Arch
>Linux.
>It is about the missing amiwm window manager.
>
>Please tell me what you think
>
>
>
># Maintainer: Panayotis Katsaloulis <[hidden email]>
>pkgname=amiwm
>pkgver=0.21pl2
>pkgrel=1
>pkgdesc="An X window manager that tries to make your display look and
>feel like an Amiga® Workbench® screen"
>arch=('x86_64' 'i686')
>url="https://www.lysator.liu.se/~marcus/amiwm.html"
>license=('FREEWARE')
>source=('ftp://ftp.lysator.liu.se/pub/X11/wm/amiwm/amiwm0.21pl2.tar.gz')
>md5sums=('3a47e887777e2be2978363220cf815ef')
>
>build() {
>    cd "$pkgname$pkgver"
>    ./configure --prefix=/usr
>    make
>}
>
>package() {
>    cd "$pkgname$pkgver"
>    make prefix="$pkgdir/usr" install
>    rm $pkgdir/usr/bin/requestchoice
>   install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
>}

License should be custom, you should use $pkgver in the URL (will save you a step when you update it), and you need to provide dependency info (at very least Xorg, but most likely more).

HTH

--DJ

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Reply | Threaded
Open this post in threaded view
|

Re: amiwm PKGBUILD file

tur-users mailing list
In reply to this post by tur-users mailing list
On 01/23/2018 04:59 PM, Panayotis Katsaloulis via aur-general wrote:
> Hello all
>
> This is my first attempt to create a valid PKGBUILD file for Arch Linux.
> It is about the missing amiwm window manager.
>
> Please tell me what you think

In addition to the other comments,

> package() {
>     cd "$pkgname$pkgver"
>     make prefix="$pkgdir/usr" install
>     rm $pkgdir/usr/bin/requestchoice

You forgot to quote "$pkgdir" here

>     install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
> }
>


--
Eli Schwartz
Bug Wrangler and Trusted User


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: amiwm PKGBUILD file

DJ Lucas-2
In reply to this post by DJ Lucas


On 01/23/2018 04:15 PM, DJ Lucas wrote:

> On January 23, 2018 3:59:24 PM CST, Panayotis Katsaloulis via aur-general <[hidden email]> wrote:
>> Hello all
>>
>> This is my first attempt to create a valid PKGBUILD file for Arch
>> Linux.
>> It is about the missing amiwm window manager.
>>
>> Please tell me what you think
>>
>>
>>
>> # Maintainer: Panayotis Katsaloulis <[hidden email]>
>> pkgname=amiwm
>> pkgver=0.21pl2
>> pkgrel=1
>> pkgdesc="An X window manager that tries to make your display look and
>> feel like an Amiga® Workbench® screen"
>> arch=('x86_64' 'i686')
>> url="https://www.lysator.liu.se/~marcus/amiwm.html"
>> license=('FREEWARE')
>> source=('ftp://ftp.lysator.liu.se/pub/X11/wm/amiwm/amiwm0.21pl2.tar.gz')
>> md5sums=('3a47e887777e2be2978363220cf815ef')
>>
>> build() {
>>     cd "$pkgname$pkgver"
>>     ./configure --prefix=/usr
>>     make
>> }
>>
>> package() {
>>     cd "$pkgname$pkgver"
>>     make prefix="$pkgdir/usr" install
>>     rm $pkgdir/usr/bin/requestchoice
>>    install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
>> }
>
> License should be custom, you should use $pkgver in the URL (will save you a step when you update it), and you need to provide dependency info (at very least Xorg, but most likely more).
>
> HTH
>

Also, having built it, it looks like the smallest inclusive dependency
is just libxmu by itself. Finally, the manuals should be installed in
/usr/share/man, not /usr/man. Append the following:

     mv -v "${pkgdir}/usr/man" "${pkgdir}/usr/share"

Use of curly braces (unnecessary in this case) and placement of the
quote marks above are to taste. Another thing, again only to taste, is
always using '-v' in mv, cp, ln, and install commands (probably others),
but if something goes wrong, it gives the user more to go on and shows
up in the build log.

--DJ
Reply | Threaded
Open this post in threaded view
|

Re: amiwm PKGBUILD file

tur-users mailing list
Thank you for the comments.
Indeed I didn't try to use "namcap" to catch most of the comments. Now
I did and sorry about that.


Looking deeper at the resutls, I found another issue, which I don't
know which is the most appropriate method to fix it.

Inside the produced package has references to the build directory, i.e.

lib/amiwm/Xsession2:DEFAULT_XINITRC="/home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/Xinitrc"
lib/amiwm/Xinitrc:/home/teras/Sources/amiwm/pkg/amiwm/usr/bin/amiwm &
wmpid=$!
lib/amiwm/Xinitrc:    
/home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/amiwm-init   #
Default amiwm tools
lib/amiwm/Xsession: export
SDT_ALT_SESSION="/home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/Xsession2"


All of them "remember" the "/home/teras/Sources/amiwm" which if I am
not mistaken is the ${pkgdir} folder.
Should I do something like:

for i in "${pkgdir}/usr/lib/amiwm/{Xsession2,Xinitrc,Xsession}" ; do
sed -e "s%${pkgdir}%%g" "$i" >"$i.fix"; mv -v "$i.fix" "$i" ; done


The full corected PKGBUILD follows:


# Maintainer: Panayotis Katsaloulis <[hidden email]>
pkgname=amiwm
pkgver=0.21pl2
pkgrel=1
pkgdesc="An X window manager that tries to make your display look and
feel like an Amiga® Workbench® screen"
arch=('x86_64' 'i686')
url="https://www.lysator.liu.se/~marcus/amiwm.html"
license=('CUSTOM')
source=("ftp://ftp.lysator.liu.se/pub/X11/wm/amiwm/amiwm${pkgver}.tar.gz")
md5sums=('3a47e887777e2be2978363220cf815ef')
depends=('libxmu')

build() {
    cd "$pkgname$pkgver"
    ./configure --prefix=/usr
    make
}

package() {
    cd "$pkgname$pkgver"
    make prefix="$pkgdir/usr" install
    rm -v "$pkgdir/usr/bin/requestchoice"
    mv -v "${pkgdir}/usr/man" "${pkgdir}/usr/share"
    for i in "${pkgdir}"/usr/lib/amiwm/{Xsession2,Xinitrc,Xsession} ;
do sed -e "s%${pkgdir}%%g" "$i" >"$i.fix" ; mv -v "$i.fix" "$i" ; done
    install -v -Dm644 LICENSE
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
Reply | Threaded
Open this post in threaded view
|

Re: amiwm PKGBUILD file

tur-users mailing list
On 01/24/2018 05:32 AM, Panayotis Katsaloulis via aur-general wrote:

> Thank you for the comments.
> Indeed I didn't try to use "namcap" to catch most of the comments. Now
> I did and sorry about that.
>
>
> Looking deeper at the resutls, I found another issue, which I don't
> know which is the most appropriate method to fix it.
>
> Inside the produced package has references to the build directory, i.e.
>
> lib/amiwm/Xsession2:DEFAULT_XINITRC="/home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/Xinitrc"
> lib/amiwm/Xinitrc:/home/teras/Sources/amiwm/pkg/amiwm/usr/bin/amiwm &
> wmpid=$!
> lib/amiwm/Xinitrc:    
> /home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/amiwm-init   #
> Default amiwm tools
> lib/amiwm/Xsession: export
> SDT_ALT_SESSION="/home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/Xsession2"
>
>
> All of them "remember" the "/home/teras/Sources/amiwm" which if I am
> not mistaken is the ${pkgdir} folder.
> Should I do something like:
>
> for i in "${pkgdir}/usr/lib/amiwm/{Xsession2,Xinitrc,Xsession}" ; do
> sed -e "s%${pkgdir}%%g" "$i" >"$i.fix"; mv -v "$i.fix" "$i" ; done


This happens because you use prefix="$pkgdir/usr" during package(), does
the software not support DESTDIR?

If not, then you'll need to copy everything over by hand rather than
using make install. Or, if upstream is still alive, asking them to fix
their Makefile so it respects DESTDIR.

You could also fix the Makefile, and ship a patch alongside the
PKGBUILD, then apply it in prepare() via `patch`.

--
Eli Schwartz
Bug Wrangler and Trusted User


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: amiwm PKGBUILD file

tur-users mailing list
Exactly that's the reason.

I tried to contact upstream and see how it goes.


Στις Τετ, 24 Ιαν, 2018 at 1:44 ΜΜ, ο/η Eli Schwartz via
aur-general <[hidden email]> έγραψε:

> On 01/24/2018 05:32 AM, Panayotis Katsaloulis via aur-general wrote:
>>  Thank you for the comments.
>>  Indeed I didn't try to use "namcap" to catch most of the comments.
>> Now
>>  I did and sorry about that.
>>
>>
>>  Looking deeper at the resutls, I found another issue, which I don't
>>  know which is the most appropriate method to fix it.
>>
>>  Inside the produced package has references to the build directory,
>> i.e.
>>
>>  
>> lib/amiwm/Xsession2:DEFAULT_XINITRC="/home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/Xinitrc"
>>  lib/amiwm/Xinitrc:/home/teras/Sources/amiwm/pkg/amiwm/usr/bin/amiwm
>> &
>>  wmpid=$!
>>  lib/amiwm/Xinitrc:
>>  /home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/amiwm-init   #
>>  Default amiwm tools
>>  lib/amiwm/Xsession: export
>>  
>> SDT_ALT_SESSION="/home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/Xsession2"
>>
>>
>>  All of them "remember" the "/home/teras/Sources/amiwm" which if I am
>>  not mistaken is the ${pkgdir} folder.
>>  Should I do something like:
>>
>>  for i in "${pkgdir}/usr/lib/amiwm/{Xsession2,Xinitrc,Xsession}" ; do
>>  sed -e "s%${pkgdir}%%g" "$i" >"$i.fix"; mv -v "$i.fix" "$i" ; done
>
>
>
> This happens because you use prefix="$pkgdir/usr" during package(),
> does
> the software not support DESTDIR?
>
> If not, then you'll need to copy everything over by hand rather than
> using make install. Or, if upstream is still alive, asking them to fix
> their Makefile so it respects DESTDIR.
>
> You could also fix the Makefile, and ship a patch alongside the
> PKGBUILD, then apply it in prepare() via `patch`.
>
> --
> Eli Schwartz
> Bug Wrangler and Trusted User
>