You are not logged in.

#1 2008-11-13 23:45:21

syntaxerrormmm
Member
From: Italy
Registered: 2008-10-22
Posts: 80
Website

[PKGBUILD] makeself 2.1.5

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

#2 2008-11-14 06:36:32

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [PKGBUILD] makeself 2.1.5

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. smile

Offline

#3 2008-11-14 08:21:41

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [PKGBUILD] makeself 2.1.5

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

#4 2008-11-14 10:02:10

syntaxerrormmm
Member
From: Italy
Registered: 2008-10-22
Posts: 80
Website

Re: [PKGBUILD] makeself 2.1.5

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 smile

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.

Thanks, regards,


syntaxerrormmm - Homepage

Offline

#5 2008-11-14 10:23:11

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [PKGBUILD] makeself 2.1.5

syntaxerrormmm wrote:
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

#6 2008-11-14 11:07:56

syntaxerrormmm
Member
From: Italy
Registered: 2008-10-22
Posts: 80
Website

Re: [PKGBUILD] makeself 2.1.5

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 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

#7 2008-11-14 11:24:48

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [PKGBUILD] makeself 2.1.5

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

#8 2008-11-14 18:54:53

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [PKGBUILD] makeself 2.1.5

syntaxerrormmm wrote:
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 smile

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

#9 2008-11-14 21:17:17

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: [PKGBUILD] makeself 2.1.5

syntaxerrormmm wrote:

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 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,

I just want to confirm that the license is GPL. So you understood correctly.

Offline

#10 2008-11-15 18:08:42

syntaxerrormmm
Member
From: Italy
Registered: 2008-10-22
Posts: 80
Website

Re: [PKGBUILD] makeself 2.1.5

foutrelis wrote:

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

Board footer

Powered by FluxBB