Advertisement
Guest User

cataclysm-git pkgbuild as of 26.11.2013

a guest
Nov 26th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.11 KB | None | 0 0
  1. # Contributor: Maintainer <keenerd@gmail.com>
  2. pkgname=cataclysm-git
  3. pkgver=20131126
  4. pkgrel=1
  5. pkgdesc="A post-apocalyptic roguelike."
  6. #url="http://cataclysmrl.blogspot.com/"
  7. #url="http://www.cataclysm.glyphgryph.com/"
  8. url="http://en.cataclysmdda.com/"
  9. arch=('i686' 'x86_64')
  10. license=("CCPL:by-sa")
  11. depends=('ncurses')
  12. makedepends=('git')
  13. install=cataclysm-git.install
  14. source=('git://github.com/CleverRaven/Cataclysm-DDA.git')
  15. md5sums=('SKIP')
  16.  
  17. # whales's version
  18. #_gitroot="git://github.com/Whales/Cataclysm.git"
  19. #_gitname="Cataclysm"
  20.  
  21. # community fork
  22. #_gitroot="git://github.com/TheDarklingWolf/Cataclysm-DDA.git"
  23. #_gitname="Cataclysm-DDA"
  24.  
  25. # new community fork
  26. #_gitroot="git://github.com/CleverRaven/Cataclysm-DDA.git"
  27. _gitname="Cataclysm-DDA"
  28.  
  29. pkgver() {
  30.   cd "$_gitname"
  31.   git show -s --format="%ci" HEAD | sed -e 's/-//g' -e 's/ .*//'
  32. }
  33.  
  34. prepare(){
  35.   cd "$_gitname/src"
  36.   sed -i 's|"data/|"/usr/share/cataclysm/data/|g' *.cpp
  37.   sed -i 's|"./data/|"/usr/share/cataclysm/data/|g' *.cpp
  38.   sed -i 's|"data"|"/usr/share/cataclysm/data"|g' *.cpp
  39.   sed -i 's|"save"|"/var/games/cataclysm/save"|g' {game,map,overmap,mapbuffer,main_menu,itypedef,worldfactory}.cpp
  40.   sed -i 's|"save/|"/var/games/cataclysm/save/|g' {game,map,overmap,mapbuffer,main_menu,itypedef}.cpp
  41.   sed -i 's|"memorial"|"/var/games/cataclysm/memorial"|g' game.cpp
  42.   sed -i 's/0777/0754/g' {worldfactory,game,main_menu}.cpp
  43.   # Earnestly, http://ix.io/6xk/diff
  44.   # patch -Np1 -i ../foo.patch
  45.   # http://ix.io/6xl/sh
  46.   # keenerd: Btw, it won't build with -flto, it gets stuck in a loop with lto1 (lto_wrapper iirc)
  47.  
  48.   # someday...
  49.   #sed -i '1i #include <stdio.h>' {game,map,overmap}.cpp
  50.   #sed -i 's|"save/|getenv("HOME") << "/.cataclysm/save/|g' *.cpp
  51.  
  52.  
  53. }
  54. build() {
  55.     cd "$_gitname"
  56.     make PREFIX=/usr
  57. }
  58.  
  59. package() {
  60.   cd "$_gitname"
  61.   install -Dm754 -g games cataclysm "$pkgdir/usr/bin/cataclysm"
  62.   install -dm775 -g games  "$pkgdir/usr/share/cataclysm/data"
  63.   cp -r data/* "$pkgdir/usr/share/cataclysm/data"
  64.   install -dm775 -g games "$pkgdir/var/games/cataclysm"
  65.   install -dm775 -g games "$pkgdir/var/games/cataclysm/save"
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement