SHARE
TWEET

PKGBUILD.mars

sbir Mar 20th, 2014 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Alexander R. <sbir at list dot ru>
  2. # Contributor: Sven-Hendrik Haase <sh at lutzhaase dot com>
  3. pkgname=mars-shooter-git
  4. pkgver=20140320
  5. pkgrel=1
  6. pkgdesc="A ridiculous space shooter with nice graphics"
  7. arch=(i686 x86_64)
  8. url="http://mars-game.sourceforge.net/"
  9. license=('GPL')
  10. depends=('sfml' 'taglib' 'fribidi')
  11. makedepends=('cmake' 'git')
  12. provides=('mars-shooter')
  13. conflicts=('mars-shooter')
  14. source=('window.patch' 'fribidi.patch')
  15. md5sums=('91bf2b38ed6defbf95e48e476ed29c62' '6c7311430769931e09a0e879b9289916')
  16.  
  17. _gitroot=git://github.com/thelaui/M.A.R.S..git
  18. _gitname=mars
  19.  
  20. build() {
  21.   cd "$srcdir"
  22.   msg "Connecting to GIT server...."
  23.  
  24.   if [[ -d "$_gitname" ]]; then
  25.     cd "$_gitname" && git pull origin
  26.     msg "The local files are updated."
  27.   else
  28.     git clone "$_gitroot" "$_gitname"
  29.   fi
  30.  
  31.   msg "GIT checkout done or server timeout"
  32.   msg "Starting build..."
  33.  
  34.   rm -rf "$srcdir/$_gitname-build"
  35.   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  36.  
  37.   cd "$srcdir"
  38.   patch -u $_gitname-build/src/System/window.cpp window.patch
  39.   cd "$srcdir/$_gitname-build"
  40.   patch -p2 < ../fribidi.patch
  41.  
  42.   cmake .
  43.   make
  44. }
  45.  
  46. package() {
  47.   cd "$srcdir/$_gitname-build"
  48.  
  49.   mkdir -p $pkgdir/usr/share/marsshooter
  50.   mkdir -p $pkgdir/usr/bin/
  51.   cp -r credits.txt data/* license.txt $pkgdir/usr/share/marsshooter
  52.   cp mars $pkgdir/usr/bin/mars-shooter
  53.   find $pkgdir -name *.svn | xargs rm -rf
  54.  
  55.   sed -i 's/Exec=.*/Exec=mars-shooter/g' resources/mars.desktop
  56.   install -Dm644 resources/mars.desktop $pkgdir/usr/share/applications/mars.desktop
  57.   install -Dm644 resources/mars.png $pkgdir/usr/share/pixmaps/mars.png
  58. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top