summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: be26f637afe20033df93b4fc99481c50d1a986d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# maintainer: so wieso <sowieso@dukun.de>
pkgname=starbound-client-server-gog
pkgver=1.0.5
pkgrel=2
pkgdesc="Starbound, an extraterrestrial sandbox adventure game (client + server, GOG-Version)"
url="http://playstarbound.com/"
license=('custom')
arch=('i686' 'x86_64')
depends=('')
optdepends=('sdl2: needed for client')
source=("gog://gog_starbound_2.5.0.6.sh"
        "starbound"
	"starbound_server"
	"starbound_server.service"
       )
        
md5sums=('e38aaceaa3247e2674e3ff5265663525'
         'b1edfe9aec35bc36d7fc8eb010cfdb05'
         '879b2f89d5a1fdc74c9ea27766cd6613'
	 '80ebdcf3780e0ca8c93feaf5ee8d4eec')
install=$pkgname.install

# Download the GoG install script manually and place it in next to PKGBUILD, or setup a dlagent
DLAGENTS+=("gog::/usr/bin/echo %u - This is is not a real URL, you need to download the GOG file manually to \"$PWD\" or setup a gog:// DLAGENT. Read the wiki for more information.")
options=('!strip')
# Prevent compressing final package
PKGEXT='.pkg.tar'

package(){
  staticdir="$pkgdir/usr/share/starbound"
  configdir="$pkgdir/etc/conf.d/starbound/"
  mkdir -p "$staticdir"
  mkdir -p "$configdir"
  mkdir -p "$pkgdir/usr/share/licenses/starbound"
  mkdir -p "$pkgdir/usr/bin"
  mkdir -p "$pkgdir/usr/share/"{applications,pixmaps}
  cp -r "$srcdir"/data/noarch/game/{assets,linux,tiled} "$staticdir"
  cp -r "$srcdir"/data/noarch/game/{storage,mods} "$configdir"
  ln -s /etc/conf.d/starbound/mods "$staticdir/"
  ln -s /etc/conf.d/starbound/storage "$staticdir/"
  cp "$srcdir/data/noarch/docs/End User License Agreement.txt" "$pkgdir/usr/share/licenses/starbound/"
  cp starbound{,_server} "$pkgdir/usr/bin"
  chmod +x "$pkgdir/usr/bin"/starbound{,_server} 

  install -Dm644 starbound_server.service "${pkgdir}/usr/lib/systemd/system/starbound_server.service"

  cat > "$pkgdir/usr/share/applications/starbound.desktop" <<EODesktopfile
[Desktop Entry]
Encoding=UTF-8
Value=1.0
Type=Application
Name=Starbound
GenericName=Starbound
Comment=Starbound, an extraterrestrial sandbox adventure game
Icon=starbound.png
Exec=starbound
Categories=Game;
Path=/tmp
EODesktopfile
  cp "$srcdir/data/noarch/support/icon.png" "$pkgdir/usr/share/pixmaps/starbound.png"

}