You are not logged in.
Pages: 1
Hi all,
first PKGBUILD, I propose to the kind forum users/TUs/developers for comments.
# Contributor: Emiliano Vavassori <syntaxerrormmm@gmail.com>
pkgname=makeself
pkgver=2.1.5
pkgrel=1
pkgdesc="A shell script that generates a self-extractable tar.gz archive."
arch=('any')
url="http://megastep.org/makeself/"
license=('GPL')
source=(http://megastep.org/$pkgname/$pkgname-$pkgver.run)
noextract=($pkgname-$pkgver.run)
md5sums=('85f03bd3602fd55debec6ae449f7c15c')
build() {
cd $srcdir
sh $startdir/$pkgname-$pkgver.run --noexec > /dev/null 2>&1 || return 1
cd $pkgname-$pkgver
sed -i -e 's:^HEADER=.*$:HEADER=/usr/share/makeself/makeself-header.sh:' $pkgname.sh
install -D -m 755 -o root -g root $pkgname.sh $pkgdir/usr/bin/$pkgname.sh
install -D -m 755 -o root -g root $pkgname-header.sh $pkgdir/usr/share/$pkgname/$pkgname-header.sh
gzip $pkgname.1 README TODO
install -D -m 644 -o root -g root $pkgname.1.gz $pkgdir/usr/share/man/man1/$pkgname.1.gz
mkdir -p $pkgdir/usr/share/doc/$pkgname
install -m 644 -o root -g root README.gz TODO.gz $pkgdir/usr/share/doc/$pkgname
}
Thank you to all that will reply.
syntaxerrormmm - Homepage
Offline
Looks good. Here are the things I would do a bit different:
sh $startdir/$pkgname-$pkgver.run --noexec > /dev/null 2>&1 || return 1
It's better if you don't refer to files outside of $srcdir. With that in mind, this changes to:
sh $pkgname-$pkgver.run --noexec > /dev/null 2>&1 || return 1
mkdir -p $pkgdir/usr/share/doc/$pkgname
install -m 644 -o root -g root README.gz TODO.gz $pkgdir/usr/share/doc/$pkgname
`install -d -m 755' is preferred to `mkdir -p' since it's safer in case the user has altered his umask. Moreover, "-o root -g root" is not needed, as the makepkg script is run using fakeroot or under root. So, the above lines get rewritten to:
install -d -m 755 $pkgdir/usr/share/doc/$pkgname
install -m 644 README.gz TODO.gz $pkgdir/usr/share/doc/$pkgname
Finally, I like putting double quotes around paths that may contain spaces (e.g.: "$srcdir", "$pkgdir/usr/share/doc/$pkgname") but this not a biggy.
Other than these minor spots, your PKGBUILD is looking great.
Offline
Also, the license should be GPL2, and you don't have to compress the manpage since makepkg does that automatically.
Last edited by creslin (2008-11-14 08:26:56)
ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.
Offline
sh $startdir/$pkgname-$pkgver.run --noexec > /dev/null 2>&1 || return 1
It's better if you don't refer to files outside of $srcdir. With that in mind, this changes to:
sh $pkgname-$pkgver.run --noexec > /dev/null 2>&1 || return 1
So the line should be:
sh $pkgname-$pkgver.run --noexec --target "$srcdir/$pkgname-$pkgver" > /dev/null 2>&1 || return 1
I was cd'ing to $srcdir to let the unpack script use its default. In any case, no problem, I'm here to learn good guidelines
Also, the license should be GPL2
Are you sure? Looking on what was stated on this and this (license part), 'GPL' should be ok.
Thanks, regards,
syntaxerrormmm - Homepage
Offline
creslin wrote:Also, the license should be GPL2
Are you sure? Looking on what was stated on this and this (license part), 'GPL' should be ok.
The website says "version 2 and above" so I believe that is covered by GPL2 in /usr/share/licenses/common.
License
Makeself is covered by the GNU General Public License (GPL) version 2 and above.
Last edited by creslin (2008-11-14 10:26:28)
ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.
Offline
English is not my language, but when I read here:
The (L)GPL has many versions and permutations of those versions. For (L)GPL software, the convention is:
o (L)GPL - (L)GPLv2 or any later version
o (L)GPL2 - (L)GPL2 only
o (L)GPL3 - (L)GPL3 or any later version
I just understand that "GPL 2 or above" is the first item of the list, so it should be 'GPL'. The only exception I could think of is that wiki is not up-to-date. In any case, no problem, since 'GPL2' in /usr/share/licenses/common is a soft link to 'GPL'.
Thanks, regards,
syntaxerrormmm - Homepage
Offline
Actually I think you're right. For some reason I thought that only applied to LGPL, but it seems that GPL2 is also symlinked to GPL.
ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.
Offline
foutrelis wrote:sh $startdir/$pkgname-$pkgver.run --noexec > /dev/null 2>&1 || return 1
It's better if you don't refer to files outside of $srcdir. With that in mind, this changes to:
sh $pkgname-$pkgver.run --noexec > /dev/null 2>&1 || return 1
So the line should be:
sh $pkgname-$pkgver.run --noexec --target "$srcdir/$pkgname-$pkgver" > /dev/null 2>&1 || return 1
I was cd'ing to $srcdir to let the unpack script use its default. In any case, no problem, I'm here to learn good guidelines
Maybe I didn't phrase it correctly. What I meant to say was that you shouldn't refer to $startdir/$pkgname-$pkgver.run. You could, of course, use $srcdir/$pkgname-$pkgver.run instead or even $startdir/src/$pkgname-$pkgver.run, but since you were already cd'ed into $srcdir, $pkgname-$pkgver.run works fine as well.
Offline
English is not my language, but when I read here:
Wiki wrote:The (L)GPL has many versions and permutations of those versions. For (L)GPL software, the convention is:
o (L)GPL - (L)GPLv2 or any later version
o (L)GPL2 - (L)GPL2 only
o (L)GPL3 - (L)GPL3 or any later versionI just understand that "GPL 2 or above" is the first item of the list, so it should be 'GPL'. The only exception I could think of is that wiki is not up-to-date. In any case, no problem, since 'GPL2' in /usr/share/licenses/common is a soft link to 'GPL'.
Thanks, regards,
I just want to confirm that the license is GPL. So you understood correctly.
Offline
Maybe I didn't phrase it correctly. What I meant to say was that you shouldn't refer to $startdir/$pkgname-$pkgver.run. You could, of course, use $srcdir/$pkgname-$pkgver.run
Well, for how I understood the makepkg process, $pkgname-$pkgver.run will be never present in $srcdir, since the .run file is downloaded as source and not unpacked. Couldn't try it by myself since the remote repository for the file is ATM not available. Am I wrong?
[Edit] Ok, I was wrong. Just saw with another PKGBUILD, sources are all symlinked in $srcdir. So thank you foutrelis, that was a very good hint.
Thanks again to all.
Last edited by syntaxerrormmm (2008-11-15 18:19:15)
syntaxerrormmm - Homepage
Offline
Pages: 1