diff options
author | Baptiste Jonglez | 2017-08-13 17:20:50 +0200 |
---|---|---|
committer | Baptiste Jonglez | 2017-08-13 17:22:10 +0200 |
commit | 65ce91afa3736298a3ca0cc516580807f34eb9f5 (patch) | |
tree | 8df346708521c34ccaf1be3d6fee382a6015ac0e | |
parent | 6b66942fadcfb7c0ee6235bf498b706e903bb4a5 (diff) | |
download | aur-65ce91afa3736298a3ca0cc516580807f34eb9f5.tar.gz |
opendune: several fixes
- install in /usr/bin instead of /opt
- correctly find data files
- add missing dependencies
- minor fixes
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | dune-data-dir.patch | 13 |
3 files changed, 46 insertions, 20 deletions
@@ -1,19 +1,22 @@ # Generated by mksrcinfo v8 -# Mon Feb 20 09:24:17 UTC 2017 +# Sun Aug 13 15:20:50 UTC 2017 pkgbase = opendune pkgdesc = Open source re-creation of the popular game Dune II pkgver = 0.8 - pkgrel = 1 + pkgrel = 2 url = http://opendune.org arch = i686 arch = x86_64 license = GPL2 depends = sdl + depends = sdl_image depends = alsa-lib - optdepends = timidity++: midi music support - provides = opendune - source = https://github.com/OpenDUNE/OpenDUNE/archive/0.8.tar.gz + depends = hicolor-icon-theme + depends = dune2-data + source = opendune-0.8.tar.gz::https://github.com/OpenDUNE/OpenDUNE/archive/0.8.tar.gz + source = dune-data-dir.patch sha256sums = fada4127715e4913553f4dbe8b5ac284ee6080377da62e65ae03f1e1d551dfbd + sha256sums = 2f56ac5554790c12e152dca4ba8ad475c143b2deb1f54c47aaa1cce0360188ae pkgname = opendune @@ -1,31 +1,41 @@ - pkgname=opendune _pkgname=OpenDUNE pkgver=0.8 -pkgrel=1 +pkgrel=2 pkgdesc="Open source re-creation of the popular game Dune II" arch=('i686' 'x86_64') url="http://opendune.org" license=('GPL2') -depends=('sdl' 'alsa-lib') -optdepends=('timidity++: midi music support') -provides=('opendune') -source=("https://github.com/OpenDUNE/OpenDUNE/archive/$pkgver.tar.gz") -sha256sums=('fada4127715e4913553f4dbe8b5ac284ee6080377da62e65ae03f1e1d551dfbd') +depends=('sdl' 'sdl_image' 'alsa-lib' 'hicolor-icon-theme' 'dune2-data') +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/OpenDUNE/OpenDUNE/archive/$pkgver.tar.gz" + "dune-data-dir.patch") +sha256sums=('fada4127715e4913553f4dbe8b5ac284ee6080377da62e65ae03f1e1d551dfbd' + '2f56ac5554790c12e152dca4ba8ad475c143b2deb1f54c47aaa1cce0360188ae') + +prepare() { + cd "$srcdir/$_pkgname-$pkgver" + # Version information + echo "${pkgver} 0 ${pkgver}" > .ottdrev + # Tell opendune where to find data files + patch -p1 < "$srcdir/dune-data-dir.patch" +} build() { - cd $srcdir/$_pkgname-$pkgver + cd "$srcdir/$_pkgname-$pkgver" sed -i "s/flags\=\"\$flags\ \-ansi\ \-pedantic\"/:/" config.lib - ./configure #--without-pulse + ./configure \ + --disable-assert \ + --prefix-dir=/usr \ + --binary-dir=bin \ + --data-dir="share/games/dune2" \ + --install-dir="$pkgdir/" make } package() { - cd $srcdir/$_pkgname-$pkgver - #make DESTDIR="$pkgdir/" install - mkdir -p $pkgdir/opt/$_pkgname/bin - mv bin/opendune $pkgdir/opt/$_pkgname/bin - mv bin/opendune.ini.sample $pkgdir/opt/$_pkgname - mkdir $pkgdir/opt/$_pkgname/data + cd "$srcdir/$_pkgname-$pkgver" + make install + rmdir "${pkgdir}/usr/share/games/dune2" + rmdir "${pkgdir}/usr/share/games" } diff --git a/dune-data-dir.patch b/dune-data-dir.patch new file mode 100644 index 00000000000..44929f023e3 --- /dev/null +++ b/dune-data-dir.patch @@ -0,0 +1,13 @@ +diff --git a/src/file.c b/src/file.c +index fbc882ca..ce6b49a6 100644 +--- a/src/file.c ++++ b/src/file.c +@@ -24,6 +24,8 @@ + /* Set DUNE_DATA_DIR at compile time. e.g. */ + /* #define DUNE_DATA_DIR "/usr/local/share/opendune" */ + ++#define DUNE_DATA_DIR "/usr/share/games/dune2" ++ + #ifndef DUNE_DATA_DIR + #ifdef TOS + #define DUNE_DATA_DIR "DATA" |