pirogronian

Untitled

Nov 26th, 2023
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.49 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.   make -C build
  30.  
  31.   # If game is installed models don't get compiled
  32.   # As a workaround we recompile 'modelcompiler' using $srcdir/data directory
  33.   # instead of /usr/share/pioneer
  34.   # Later, we let the things as them was
  35.  
  36.   if [ -d /usr/share/pioneer ]; then
  37.     ./bootstrap cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr
  38.     make -C build modelcompiler
  39.     build/modelcompiler -b inplace
  40.  
  41.     ./bootstrap cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr
  42.   else
  43.     build/modelcompiler -b inplace
  44.   fi
  45. }
  46.  
  47. package() {
  48.   cd $pkgname
  49.  
  50.   make -C build DESTDIR="$pkgdir" install
  51. }
  52.  
Add Comment
Please, Sign In to add comment