archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / crawl / trunk / PKGBUILD
blob49d529af16f065f5d1bb4a0eb570a6de2029eead
1 # Maintainer: Ivy Foster <iff@archlinux.org>
2 # Contributor: Jakob Gruber <jakob.gruber@gmail.com>
4 pkgbase=crawl
5 pkgname=(crawl-data crawl-ncurses crawl-tiles)
6 pkgdesc='Dungeon Crawl Stone Soup: open-source, single-player, role-playing roguelike game of exploration and treasure-hunting'
7 url='https://crawl.develz.org/'
8 license=(custom:crawl GPL2)
10 pkgver=0.30.0
11 pkgrel=1
12 arch=(x86_64)
14 # line-by-line: both versions, graphical, ncurses
15 makedepends=(
16         bison flex lua51 mesa pcre perl python-yaml pngcrush sqlite
17         freetype2 glu libpng sdl2_image ttf-dejavu
18         ncurses
21 source=("crawl-$pkgver.tar.xz::https://github.com/crawl/crawl/releases/download/$pkgver-debian/crawl_$pkgver.orig.tar.xz")
22 # Checksum provided by packager
23 sha256sums=(efd173eb1982c6b02d33df5df6991c83cec033087f2203e23ae0eac4cdde6a73)
25 prepare() {
26         cp -a "stone_soup-$pkgver" "stone_soup-ncurses-$pkgver"
29 build() {
30         cd "stone_soup-$pkgver/source"
31         make DESTDIR="$pkgdir" \
32                 EXTERNAL_FLAGS="$CFLAGS" \
33                 EXTERNAL_LDFLAGS="$LDFLAGS" \
34                 prefix=/usr \
35                 bin_prefix=bin \
36                 TILES=y \
37                 GAME=crawl-tiles
39         cd "$srcdir/stone_soup-ncurses-$pkgver/source"
40         make DESTDIR="${pkgdir}" \
41                 EXTERNAL_FLAGS="$CFLAGS" \
42                 EXTERNAL_LDFLAGS="$LDFLAGS" \
43                 prefix=/usr \
44                 bin_prefix=bin
47 package_crawl-data() {
48         pkgdesc="Data files for $pkgdesc"
49         depends=(crawl-game)
50         optdepends=(
51                 'crawl-ncurses: ncurses user interface'
52                 'crawl-tiles: graphical user interface'
53         )
54         provides=(stone-soup)
55         conflicts=(stone-soup)
56         replaces=(stone-soup)
57         # Apparently, dbscripts [doesn't support][1] split packages with different architecture
58         # [1]: https://wiki.archlinux.org/title/DeveloperWiki:HOWTO_Be_A_Packager#Adding_a_new_Package
59 #       arch=(any)
61         cd "stone_soup-ncurses-$pkgver/source"
62         make DESTDIR="$pkgdir" \
63                 EXTERNAL_FLAGS="$CFLAGS" \
64                 EXTERNAL_LDFLAGS="$LDFLAGS" \
65                 prefix=/usr \
66                 bin_prefix=bin \
67                 install-data
69         install -D -m644 "../LICENSE" \
70                 "$pkgdir/usr/share/licenses/crawl-data/LICENSE"
73 package_crawl-ncurses() {
74         pkgdesc="$pkgdesc (ncurses version)"
75         provides=(crawl-game)
76         depends=(crawl-data hicolor-icon-theme lua51 python-yaml sqlite ncurses)
78         cd "stone_soup-ncurses-$pkgver/source"
79         make DESTDIR="$pkgdir" \
80                 EXTERNAL_FLAGS="$CFLAGS" \
81                 EXTERNAL_LDFLAGS="$LDFLAGS" \
82                 prefix=/usr \
83                 bin_prefix=bin \
84                 install install-xdg-data
86         install -D -m644 "../LICENSE" \
87                 "$pkgdir/usr/share/licenses/crawl-ncurses/LICENSE"
89         rm -rf "$pkgdir/usr/share/crawl"
92 package_crawl-tiles() {
93         pkgdesc="$pkgdesc (graphical version)"
94         provides=(crawl-game)
95         depends=(
96                 crawl-data hicolor-icon-theme lua51 python-yaml sqlite
97                 freetype2 glu libpng sdl2_image ttf-dejavu
98         )
100         cd "stone_soup-$pkgver/source"
101         make DESTDIR="$pkgdir" \
102                 EXTERNAL_FLAGS="$CFLAGS" \
103                 EXTERNAL_LDFLAGS="$LDFLAGS" \
104                 prefix=/usr \
105                 bin_prefix=bin \
106                 TILES=y \
107                 GAME=crawl-tiles \
108                 install install-xdg-data
110         install -D -m644 "../LICENSE" \
111                 "$pkgdir/usr/share/licenses/crawl-tiles/LICENSE"
113         cd "$pkgdir/usr/share/crawl/"
114         mv dat/tiles .; rm -rf dat/*; mv tiles dat
115         rm -rf docs settings