You are not logged in.
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
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
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 ?
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".
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
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 )
mkdir ${startdir}/pkg/usr/{include,lib}
make PREFIX=${startdir}/pkg/usr install
Offline
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
....
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
Try changing mkdir to mkdir -p
Offline
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
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