You are not logged in.
I'm looking for comments on this PKGBUILD I have for the OHRRPGCE. It's the first time writing a PKGBUILD so I would like to know if anyhting I did went wrong.
# Maintainer: Matthias Lamers <aussieevil@hotmail.com>
pkgname=ohrrpgce
pkgver=callipygous
pkgrel=1
pkgdesc="A role playing game creation engine"
arch=(i686 x86_64)
license=(GPL)
url="http://rpg.hamsterrepublic.com/ohrrpgce/Main_Page"
depends=('sdl_mixer' 'openeuphoria' 'libxpm' 'libxrandr' 'ncurses')
makedepends=('freebasic' 'scons' 'openeuphoria' 'dos2unix')
optdepends=('timidity-freepats: midi music support')
source=(svn://gilgamesh.hamsterrepublic.com/ohrrpgce/rel/callipygous)
prepare() {
cd "${srcdir}/$pkgver"
sed 's|env python|env python2|' -i reloadbasic/reloadbasic.py
chmod +x reloadbasic/reloadbasic.py
dos2unix -o *.rbas
PATH=$PATH:/usr/share/openeuphoria/bin/
#patch -p1 -i "$srcdir/$pkgname-$pkgver.patch"
}
build() {
cd "${srcdir}/$pkgver"
if [ "$CARCH" = "x86_64" ]; then
scons arch=64 game custom hspeak unlump relump debug=0
else
scons game custom hspeak unlump relump debug=0
fi
./relump vikings/vikings.rpgdir ./vikings.rpg
#scons arch=64 game custom hspeak unlump relump debug=0
}
package() {
#cd "$pkgname-$pkgver"
#make DESTDIR="$pkgdir/" install
echo "this is package"
cd "${srcdir}/$pkgver/"
mv ohrrpgce-custom ohrrpgce-custom.bin
echo -e "#!/bin/sh\ncd /usr/share/ohrrpgce\nexec ./ohrrpgce-custom.bin \"\${@}\""\
> ohrrpgce-custom && chmod +x ohrrpgce-custom
mkdir -p "${pkgdir}/usr/bin/"
mkdir -p "${pkgdir}/usr/share/ohrrpgce/"
mkdir -p "${pkgdir}/usr/share/doc/ohrrpgce/"
cp hspeak ohrrpgce-{game,custom} {re,un}lump "${pkgdir}/usr/bin/"
cp ohrrpgce-custom.bin "${pkgdir}/usr/share/ohrrpgce/"
cp ohrrpgce.new plotscr.hsd scancode.hsi "${pkgdir}/usr/share/ohrrpgce/"
cp ./vikings.rpg "${pkgdir}/usr/share/ohrrpgce/"
cp -pr "vikings/Vikings script files" tmp
cp -p "vikings/README-vikings.txt" tmp
cp -r import "${pkgdir}/usr/share/ohrrpgce/"
cp -r docs "${pkgdir}/usr/share/doc/ohrrpgce/"
cp -r ohrhelp "${pkgdir}/usr/share/doc/ohrrpgce/"
}
md5sums=('SKIP')Offline
Two tips to get you started in fixing it up:
1. Please read https://wiki.archlinux.org/index.php/VC … guidelines
2. You should not be changing anything in $srcdir in the package function. You'll break makepkg -R.
Offline
So since scons is used in this, how do I get it to install in package() without it rebuilding the code all over again?
# Maintainer: Matthias Lamers <aussieevil@hotmail.com>
pkgname=ohrrpgce
pkgver=callipygous.r8061
pkgrel=1
pkgdesc="A role playing game creation engine"
arch=(i686 x86_64)
license=(GPL)
url="http://rpg.hamsterrepublic.com/ohrrpgce/Main_Page"
depends=('sdl_mixer' 'openeuphoria' 'libxpm' 'libxrandr' 'ncurses')
makedepends=('subversion' 'freebasic' 'scons' 'openeuphoria' 'dos2unix')
optdepends=('timidity-freepats: midi music support')
source=(svn://gilgamesh.hamsterrepublic.com/ohrrpgce/rel/callipygous)
pkgver(){
cd "${srcdir}/callipygous"
local ver="$(svnversion)"
printf "%s.r%s" "callipygous" "${ver//[[:alpha:]]}"
}
prepare() {
cd "${srcdir}/callipygous"
sed 's|env python|env python2|' -i reloadbasic/reloadbasic.py
chmod +x reloadbasic/reloadbasic.py
dos2unix -o *.rbas
PATH=$PATH:/usr/share/openeuphoria/bin/
#patch -p1 -i "$srcdir/$pkgname-$pkgver.patch"
}
build() {
cd "${srcdir}/callipygous"
if [ "$CARCH" = "x86_64" ]; then
scons arch=64 game custom hspeak unlump relump debug=0
else
scons game custom hspeak unlump relump debug=0
fi
cd vikings
../relump vikings.rpgdir vikings.rpg
rm -rfv vikings.rpgdir
#scons arch=64 game custom hspeak unlump relump debug=0
}
package() {
pwd
#cd "$pkgname-$pkgver"
#make DESTDIR="$pkgdir/" install
cd "${srcdir}/callipygous"
if [ "$CARCH" = "x86_64" ]; then
scons arch=64 install game custom hspeak unlump relump destdir='${pkgdir}'
else
scons install game custom hspeak unlump relump destdir='${pkgdir}'
fi
cp -prv "${srcdir}/callipygous/vikings/*" "${pkgdir}"
}
md5sums=('SKIP')Last edited by aussieevil (2016-06-08 05:58:35)
Offline
Well, I would assume scons is smart enough not to rebuild things that were already built. ![]()
Alternatively, you could continue copying everything by hand... but you might want to take advantage of the `install -D ...` command, rather than repetitive `mkdir -p ...; cp ...` commands. And as Scimmia said, if you need to prepare additional files before packaging, do it in the build() function. i.e. ohrrpgce-custom{,.bin}
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Had problems with "install" but thankfully, scons install puts everything into one folder so I just used "cp -r" instead
# Maintainer: Matthias Lamers <aussieevil@hotmail.com>
pkgname=ohrrpgce
pkgver=callipygous.r8062
pkgrel=1
pkgdesc="A role playing game creation engine"
arch=(i686 x86_64)
license=(GPL)
url="http://rpg.hamsterrepublic.com/ohrrpgce/Main_Page"
depends=('sdl_mixer' 'openeuphoria' 'libxpm' 'libxrandr' 'ncurses')
makedepends=('subversion' 'freebasic' 'scons' 'openeuphoria' 'dos2unix')
optdepends=('timidity-freepats: midi music support')
source=(svn://gilgamesh.hamsterrepublic.com/ohrrpgce/rel/callipygous)
pkgver(){
cd "${srcdir}/callipygous"
local ver="$(svnversion)"
printf "%s.r%s" "callipygous" "${ver//[[:alpha:]]}"
}
prepare() {
cd "${srcdir}/callipygous"
sed 's|env python|env python2|' -i reloadbasic/reloadbasic.py
chmod +x reloadbasic/reloadbasic.py
dos2unix -o *.rbas
PATH=$PATH:/usr/share/openeuphoria/bin/
#patch -p1 -i "$srcdir/$pkgname-$pkgver.patch"
}
build() {
cd "${srcdir}/callipygous"
if [ "$CARCH" = "x86_64" ]; then
scons arch=64 game custom hspeak unlump relump debug=0 install destdir='../release'
else
scons game custom hspeak unlump relump debug=0 install destdir='../release'
fi
cd vikings
"${srcdir}/release/usr/share/games/ohrrpgce/relump" vikings.rpgdir vikings.rpg
rm -rf vikings.rpgdir
cd ..
mkdir "${srcdir}/release/usr/share/games/ohrrpgce/vikings"
cp -r vikings/* "${srcdir}/release/usr/share/games/ohrrpgce/vikings"
#scons arch=64 game custom hspeak unlump relump debug=0
}
package() {
pwd
cp -r ./release/* "$pkgdir/"
#cd "$pkgname-$pkgver"
#make DESTDIR="$pkgdir/" install
#cd "${srcdir}/callipygous"
#cp -prv "${srcdir}/callipygous/vikings/*" "${pkgdir}"
}
md5sums=('SKIP')Offline
I'm assuming this version of the PKGBUILD is clear for upload, then?
Offline