author | Antonio Rojas
<arojas@archlinux.org> 2018-06-09 10:55:35 UTC |
committer | Antonio Rojas
<arojas@archlinux.org> 2018-06-09 10:55:35 UTC |
parent | 0426c52674dac08b2554957fbcace1f90ae01f16 |
PKGBUILD | +22 | -6 |
diff --git a/PKGBUILD b/PKGBUILD index be3cf57..de84e8b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -6,7 +6,7 @@ pkgname=uqm pkgver=0.7.0 -pkgrel=4 +pkgrel=5 pkgdesc="The Ur-Quan Masters, a port of Star Control 2" arch=('x86_64') url="http://sc2.sf.net/" @@ -28,15 +28,31 @@ md5sums=('f9018ea0493d7dac6a9e1006b00af7df' '44c83b9b9d102b99210af0036749a318' '06d0a72aa18e7edce6cd3c7a3a747c44') -package() { - cd $srcdir/$pkgname-$pkgver - - cp $srcdir/config.state . +prepare() { + cd $pkgname-$pkgver + cp ../config.state . sed -e "/INPUT_install_prefix/ s|replaceme|$pkgdir/usr|" \ - -i config.state + -i config.state ./build.sh uqm reprocess_config + # fix build (Fedora) + cd src/uqm/comm/ + for d in */ ; do + cd $d + mv strings.h ustrings.h + cd .. + done + find . -type f -name '*.c' | xargs sed -i s/strings.h/ustrings.h/g + find . -type f -name '*.h' | xargs sed -i s/STRINGS/USTRINGS/g +} + +build() { + cd $pkgname-$pkgver ./build.sh uqm +} + +package() { + cd $pkgname-$pkgver ./build.sh uqm install install -Dm644 $srcdir/$pkgname-$pkgver-content.uqm \