pirogronian

Untitled

Nov 27th, 2023
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.64 KB | Source Code | 0 0
  1. # Maintainer: Manuel Lladosa <$(base64 --decode <<<'bWFub2xvbGxyQHJpc2V1cC5uZXQK')>
  2. # Contributor: Tarn Burton <twburton at gmail dot com>
  3. pkgname='pioneer-git'
  4. pkgver=20230203.r394.g8d54d5011
  5. pkgrel=1
  6. pkgdesc="A game of lonely space adventure"
  7. arch=('x86_64')
  8. url="https://github.com/pioneerspacesim/pioneer"
  9. license=('GPL3')
  10. provides=('pioneer')
  11. conflicts=('pioneer-bin' 'pioneer')
  12. depends=('assimp' 'freetype2' 'hicolor-icon-theme' 'libsigc++' 'libvorbis' 'sdl2_image')
  13. makedepends=('git' 'cmake' 'mesa' 'glu')
  14. source=("$pkgname::git+https://github.com/pioneerspacesim/pioneer")
  15. sha256sums=('SKIP')
  16.  
  17. pkgver() {
  18.   cd $pkgname
  19.   git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
  20. }
  21.  
  22. build() {
  23.   cd $pkgname
  24.  
  25.   # https://github.com/pioneerspacesim/pioneer/issues/5387#issuecomment-1172955235
  26.   CXXFLAGS="${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS/}"
  27.  
  28.   ./bootstrap -D CMAKE_INSTALL_PREFIX:PATH=/usr \
  29.     -D PIONEER_DATA_DIR:PATH=/usr/share/pioneer/data/
  30.   make -C build
  31.  
  32.   # If game is installed models don't get compiled
  33.   # As a workaround we recompile 'modelcompiler' using $srcdir/data directory
  34.   # instead of /usr/share/pioneer
  35.   # Later, we let the things as them was
  36.  
  37.   if [ -d /usr/share/pioneer ]; then
  38.     ./bootstrap cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr \
  39.       -D PIONEER_DATA_DIR:PATH="data"
  40.     make -C build modelcompiler
  41.     build/modelcompiler -b inplace
  42.  
  43.     ./bootstrap cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr \
  44.      -D PIONEER_DATA_DIR:PATH=/usr/share/pioneer/data/
  45.   else
  46.     build/modelcompiler -b inplace
  47.   fi
  48. }
  49.  
  50. package() {
  51.   cd $pkgname
  52.  
  53.   make -C build DESTDIR="$pkgdir" install
  54. }
  55.  
Add Comment
Please, Sign In to add comment