You are not logged in.

#1 2008-01-21 22:55:59

my64
Member
From: France
Registered: 2007-12-30
Posts: 88

two new packages for review

Hello,
I have made and tested 2 new packages: one is a game, crrcsim (a model plane simulator) and the other is portaudio (v18 as required by crrcsim)
Now before "publishing them" and as they are my very first packages, I'd like to check if they are ok.
PKBUILD are below, thanks for any comments.

PKGBUILD portaudio

# Contributor: Olivier Bordes <package@obordes.com>

pkgname=portaudio
pkgver=pa_snapshot_v18
pkgrel=1
pkgdesc="A free, cross-platform, open source, audio I/O library"
arch=('i686' 'x86_64')
url="http://www.portaudio.com/"
license=('custom')
depends=('autoconf>=2.13')
options=(!libtool)
source=(http://www.portaudio.com/archives/$pkgver.tar.gz)
md5sums=('855a1d26bc9cdf3126dcd5e709608aa9')
build() {
  cd $startdir/src/${pkgname}
  mkdir -p  $startdir/pkg/usr/lib
  mkdir -p  $startdir/pkg/usr/include
  ./configure --prefix=$startdir/pkg/usr
  make || return 1
  make install || return 1
  install -D -m644 LICENSE.txt $startdir/pkg/usr/share/licenses/$pkgname/LICENSE.txt
}

# vim:set ts=2 sw=2 et:

PKGBUILD crrcsim

# Maintainer: Olivier Bordes <package@obordes.com>
pkgname=crrcsim
pkgver=0.9.8_2
pkgrel=1
pkgdesc="model-airplane flight simulation program."
arch=('i686' 'x86_64')
depends=('sdl' 'portaudio=pa_snapshot_v18' 'plib')
options=('!libtool')
license=('GPL')
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-src-${pkgver/_/-}.tar
.gz)
url="http://crrcsim.sourceforge.net/"
md5sums=('c89b4458fe0697059d40a2e4636632d0')

build() {
  cd $startdir/src/$pkgname-${pkgver/_/-}
  
  if [ "${CARCH}" = "x86_64" ]; then
        make -f Makefile.linux64 || return 1
  elif [ "${CARCH}" = "i686" ]; then
        make -f Makefile.linux || return 1
  else return 1
        fi

        mkdir -p $startdir/pkg/usr/share/games/crrcsim/documentation
        mkdir -p $startdir/pkg/usr/share/games/crrcsim/models
        mkdir -p $startdir/pkg/usr/share/games/crrcsim/scenery
        mkdir -p $startdir/pkg/usr/share/games/crrcsim/sounds
        mkdir -p $startdir/pkg/usr/share/games/crrcsim/textures
        mkdir -p $startdir/pkg/usr/share/games/crrcsim/objects
        cp -r ./documentation/* $startdir/pkg/usr/share/games/crrcsim/documentation/
        cp -r ./models/*   $startdir/pkg/usr/share/games/crrcsim/models/
        cp ./scenery/*.xml  $startdir/pkg/usr/share/games/crrcsim/scenery/
        cp ./scenery/*.tga  $startdir/pkg/usr/share/games/crrcsim/scenery/
        cp -r ./sounds/* $startdir/pkg/usr/share/games/crrcsim/sounds/
        cp ./textures/*.rgb $startdir/pkg/usr/share/games/crrcsim/textures/
        cp ./textures/*.bw  $startdir/pkg/usr/share/games/crrcsim/textures/
        cp ./objects/*.ac  $startdir/pkg/usr/share/games/crrcsim/objects/
        cp ./packages/icons/crrcsim.png $startdir/pkg/usr/share/games/crrcsim/

        mkdir -p $startdir/pkg/usr/bin
        cp ./crrcsim $startdir/pkg/usr/bin/
}
# vim:set ts=2 sw=2 et:

Last edited by my64 (2008-01-21 22:58:27)

Offline

#2 2008-01-21 23:17:02

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,410
Website

Re: two new packages for review

For portaudio, do you need the makedir statements?  I assume they are created automatically by make install.  Also, you configure statement should be "./configure --prefix=/usr"  and adjust the "make install" line to install in $startdir/pkg/usr.  This tends to be achieved by using a DESTDIR or --prefix statement in the install line.

For crrcsim you could use install instead of cp, especially for the binary at the end to make sure the permissions are right.  Is there no "make install" option at all for that package?  Also, Maintainer should be Contributor.

Also, are you sure you need "options=('!libtool')"?  I haven't checked but not many packages really do...

Otherwise the packages look good!

Last edited by Allan (2008-01-21 23:18:06)

Offline

#3 2008-01-21 23:29:18

my64
Member
From: France
Registered: 2007-12-30
Posts: 88

Re: two new packages for review

Allan wrote:

For portaudio, do you need the makedir statements?  I assume they are created automatically by make install.  Also, you configure statement should be "./configure --prefix=/usr"  and adjust the "make install" line to install in $startdir/pkg/usr.  This tends to be achieved by using a DESTDIR or --prefix statement in the install line.

well, the current "make install" of portaudio does not use DESTDIR. This is why I removed the DESTDIR from the make install, and change the configure prefix.  Am I wrong ?

Allan wrote:

For crrcsim you could use install instead of cp, especially for the binary at the end to make sure the permissions are right.  Is there no "make install" option at all for that package?  Also, Maintainer should be Contributor.

No, unfortunately the current "make install" of crrcsim has hadcoded the path. For "install", ok I'll  use it instead of "cp".

Allan wrote:

Also, are you sure you need "options=('!libtool')"?  I haven't checked but not many packages really do...

No, probably not, I was not 100% sure.
Thanks for your comments.
Olivier

Offline

#4 2008-01-21 23:45:13

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,410
Website

Re: two new packages for review

my64 wrote:
Allan wrote:

For portaudio, do you need the makedir statements?  I assume they are created automatically by make install.  Also, you configure statement should be "./configure --prefix=/usr"  and adjust the "make install" line to install in $startdir/pkg/usr.  This tends to be achieved by using a DESTDIR or --prefix statement in the install line.

well, the current "make install" of portaudio does not use DESTDIR. This is why I removed the DESTDIR from the make install, and change the configure prefix.  Am I wrong ?

"./configure --prefix=/usr" makes sure when it is installed that it knows where it really is.  Using other values than where it really will be installed makes some problems for some libraries/programs so it is best to be safe.

Now, portaudio has a really crappy makefile so install will go something like... (half tested here smile )

mkdir ${startdir}/pkg/usr/{include,lib}
make PREFIX=${startdir}/pkg/usr install

Offline

#5 2008-01-21 23:52:51

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,410
Website

Re: two new packages for review

my64 wrote:
Allan wrote:

For crrcsim you could use install instead of cp, especially for the binary at the end to make sure the permissions are right.  Is there no "make install" option at all for that package?  Also, Maintainer should be Contributor.

No, unfortunately the current "make install" of crrcsim has hadcoded the path. For "install", ok I'll  use it instead of "cp".

Looking at the makefile, you can adjust it "manually" using sed...

sed -i "s#/usr/local#${startdir}/pkg/usr#g"  Makefile

That should do the trick...

Offline

#6 2008-01-22 18:38:36

my64
Member
From: France
Registered: 2007-12-30
Posts: 88

Re: two new packages for review

Allan wrote:

....

mkdir ${startdir}/pkg/usr/{include,lib}
make PREFIX=${startdir}/pkg/usr install

does not work and gives:

/install: ne peut créer le fichier régulier `/var/abs/unsupported/portaudio/pkg/usr/lib/libportaudio.so.0.0.18': Aucun fichier ou répertoire de ce type
make: *** [install] Erreur 1
==> ERREUR: La compilation a échoué.
    Abandon...

Offline

#7 2008-01-22 18:42:57

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: two new packages for review

Try changing mkdir to mkdir -p

Offline

#8 2008-01-22 19:09:09

my64
Member
From: France
Registered: 2007-12-30
Posts: 88

Re: two new packages for review

ok thanks, it works. It was obvious that PREFIX should work when looking in more details in the Makefile.
It looks now like this:

# Contributor: Olivier Bordes <package@obordes.com>

pkgname=portaudio
pkgver=pa_snapshot_v18
pkgrel=1
pkgdesc="A free, cross-platform, open source, audio I/O library"
arch=('i686' 'x86_64')
url="http://www.portaudio.com/"
license=('custom')
depends=('autoconf>=2.13')
source=(http://www.portaudio.com/archives/$pkgver.tar.gz)
md5sums=('855a1d26bc9cdf3126dcd5e709608aa9')
build() {
  cd $startdir/src/${pkgname}
  mkdir -p ${startdir}/pkg/usr/{include,lib}
  ./configure --prefix=/usr
  make || return 1
  make PREFIX=${startdir}/pkg/usr install || return 1
  install -D -m644 LICENSE.txt $startdir/pkg/usr/share/licenses/$pkgname/LICENSE.txt
}

# vim:set ts=2 sw=2 et:

Offline

#9 2008-01-22 22:04:39

my64
Member
From: France
Registered: 2007-12-30
Posts: 88

Re: two new packages for review

And here is the crrcsim:

# Contributor: Olivier Bordes <package@obordes.com>
pkgname=crrcsim
pkgver=0.9.8_2
pkgrel=1
pkgdesc="model-airplane flight simulation program."
arch=('i686' 'x86_64')
depends=('sdl' 'portaudio=pa_snapshot_v18' 'plib')
license=('GPL')
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-src-${pkgver/_/-}.tar.gz)
url="http://crrcsim.sourceforge.net/"
md5sums=('c89b4458fe0697059d40a2e4636632d0')

build() {
  cd $startdir/src/$pkgname-${pkgver/_/-}

  if [ "${CARCH}" = "x86_64" ]; then
    _makesuffix=linux64
  elif [ "${CARCH}" = "i686" ]; then
    _makesuffix=linux
  else return 1
  fi

  make -f Makefile.$_makesuffix || return 1
  sed -i "s#/usr/local#${startdir}/pkg/usr#g"  Makefile.$_makesuffix
  make -f Makefile.$_makesuffix install || return 1
}
# vim:set ts=2 sw=2 et:

Offline

Board footer

Powered by FluxBB