yochananmarqos

Untitled

May 20th, 2020
102
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgname=sdlpop
  2. pkgver=1.20
  3. pkgrel=1
  4. pkgdesc="An open-source port of Prince of Persia"
  5. arch=('i686' 'x86_64')
  6. license=('GPL3')
  7. url="https://github.com/NagyD/SDLPoP"
  8. depends=('sdl2_image' 'sdl2_mixer')
  9. source=("sdlpop-$pkgver.tar.gz::https://github.com/NagyD/SDLPoP/archive/v$pkgver.tar.gz"
  10.         "https://github.com/NagyD/SDLPoP/pull/203.patch"
  11.         "sdlpop.sh")
  12. sha256sums=('dbb75398dee2224bcee648602ad23e469b936a2b7ea962a8a01b091b989f25b6'
  13.             '16a815e98e5a54e79367a5c25f917cdf70e52d57800a2d03eca5b380fff3004f'
  14.             'cb7b7923dcfb68520c7e738e6e8bd503f56f2775b28022285397284c0c428991')
  15.  
  16. prepare() {
  17.   cd SDLPoP-$pkgver
  18.   patch -p1 -i "$srcdir/203.patch"
  19.  
  20.   cd src
  21.   sed -e 's|$ROOT|/opt/sdlpop|' SDLPoP.desktop.template > SDLPoP.desktop
  22. }
  23.  
  24. build() {
  25.   cd SDLPoP-$pkgver/src
  26.   export CFLAGS+=" $CPPFLAGS"
  27.   make
  28. }
  29.  
  30. package() {
  31.   cd SDLPoP-$pkgver
  32.   # world-writable for save/load games, config, etc.
  33.   install -dm757 "$pkgdir"/opt/sdlpop
  34.   install -m755 prince "$pkgdir"/opt/sdlpop
  35.   cp -r data doc mods SDLPoP.ini "$pkgdir"/opt/sdlpop
  36.   install -Dm755 ../sdlpop.sh "$pkgdir"/usr/bin/prince
  37.   install -Dm644 src/SDLPoP.desktop "$pkgdir"/usr/share/applications/sdlpop.desktop
  38. }
RAW Paste Data