You are not logged in.
Pages: 1
I have updated an old pkgbuild present in aur, this is the first time i do it
#Contributor: Cilyan Olowen <gaknar@gmail.com>
pkgname=plee-the-bear
pkgver=0.3.1
pkgrel=1
pkgdesc="Plee The Bear is ('will be', in facts) a 2D platform game\
like those we found on consoles in the beginning of the 90's."
arch=(i686 x86_64)
url="http://plee-the-bear.sourceforge.net/"
license=('GPL2' 'Creative Commons')
depends=('boost>=1.33' 'libclaw>=1.5.2' 'sdl>=1.2.8' 'sdl_mixer>=1.2.6' 'mesa' 'wxgtk>=2.8')
makedepends=('cmake')
source=(http://prdownloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
md5sums=('ccf66e60c0fde6103542907d56acb681')
build() {
cd "$startdir/src/$pkgname-$pkgver"
cmake . -DCMAKE_INSTALL_PREFIX:PATH=/usr || return 1
make || return 1
make DESTDIR="$startdir/pkg" install
# Rename executable to a more intuitive name
cd "$startdir/pkg/usr"
mv bin/plee-the-bear bin/plee-the-bear-bin
echo "#!/bin/sh" > bin/ptb
echo "plee-the-bear-bin \"$@\" \\" >> bin/ptb
echo " --game=/usr/share/plee-the-bear/game_description" >> bin/ptb
cp bin/ptb bin/plee-the-bear
chmod a+x bin/ptb bin/plee-the-bear
# Create menu entry
install -d $startdir/pkg/usr/share/applications
_menufile="$startdir/pkg/usr/share/applications/$pkgname.desktop"
echo "[Desktop Entry]" > $_menufile
echo "Type=Application" >> $_menufile
echo "Version=1.0" >> $_menufile
echo "Encoding=UTF-8" >> $_menufile
echo "Name=Plee The Bear" >> $_menufile
echo "GenericName=A 2D platform game" >> $_menufile
echo "GenericName[en]=A 2D platform game" >> $_menufile
echo "GenericName[fr]=Un jeu de plateforme en 2D" >> $_menufile
echo "GenericName[it]=Un gioco in stile platform 2D" >> $_menufile
echo "Comment=Drive Plee the Bear to his son" >> $_menufile
echo "Comment[en]=Drive Plee the Bear to his son" >> $_menufile
echo "Comment[fr]=Menez Plee l'Ours jusqu'à son fiston" >> $_menufile
echo "Comment[it]=Portate Plee l'Orso fino a suo figlio" >> $_menufile
echo "Exec=ptb" >> $_menufile
echo "Terminal=false" >> $_menufile
echo "StartupNotify=false" >> $_menufile
echo "Categories=Game" >> $_menufile
chmod 0644 $_menufile
}
# vim:set ts=2 sw=2 et:
I have only made small changes. Suggestions?
Offline
It is best to put the desktop stuff in a separate file and add it to the source array. Even the launcher would be better in a separate file.
Offline
Thank you Allan for your reply.
The new version doesn't need launchers so the pkgbuild will be similar to this code
#Contributor: Cilyan Olowen <gaknar@gmail.com>
pkgname=plee-the-bear
pkgver=0.3.1
pkgrel=1
pkgdesc="Plee The Bear is ('will be', in facts) a 2D platform game\
like those we found on consoles in the beginning of the 90's."
arch=(i686 x86_64)
url="http://plee-the-bear.sourceforge.net/"
license=('GPL2' 'Creative Commons')
depends=('boost>=1.33' 'libclaw>=1.5.2' 'sdl>=1.2.8' 'sdl_mixer>=1.2.6' 'mesa' 'wxgtk>=2.8')
makedepends=('cmake')
source=(http://prdownloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
md5sums=('a3dffaec43728c23413760ae10873512')
build() {
cd "$startdir/src/$pkgname-$pkgver"
cmake . -DCMAKE_INSTALL_PREFIX:PATH=/usr || return 1
make || return 1
make DESTDIR="$startdir/pkg" install
install -Dm644 $startdir/src/$pkgname-$pkgver/bin/bear-factory $startdir/pkg/usr/bin/bear-factory
}
Last edited by Babets (2008-07-18 12:24:29)
Offline
Pages: 1