1 # Maintainer: Ivy Foster <iff@archlinux.org>
2 # Contributor: Jakob Gruber <jakob.gruber@gmail.com>
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)
14 # line-by-line: both versions, graphical, ncurses
16 bison flex lua51 mesa pcre perl python-yaml pngcrush sqlite
17 freetype2 glu libpng sdl2_image ttf-dejavu
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)
26 cp -a "stone_soup-$pkgver" "stone_soup-ncurses-$pkgver"
30 cd "stone_soup-$pkgver/source"
31 make DESTDIR="$pkgdir" \
32 EXTERNAL_FLAGS="$CFLAGS" \
33 EXTERNAL_LDFLAGS="$LDFLAGS" \
39 cd "$srcdir/stone_soup-ncurses-$pkgver/source"
40 make DESTDIR="${pkgdir}" \
41 EXTERNAL_FLAGS="$CFLAGS" \
42 EXTERNAL_LDFLAGS="$LDFLAGS" \
47 package_crawl-data() {
48 pkgdesc="Data files for $pkgdesc"
51 'crawl-ncurses: ncurses user interface'
52 'crawl-tiles: graphical user interface'
55 conflicts=(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
61 cd "stone_soup-ncurses-$pkgver/source"
62 make DESTDIR="$pkgdir" \
63 EXTERNAL_FLAGS="$CFLAGS" \
64 EXTERNAL_LDFLAGS="$LDFLAGS" \
69 install -D -m644 "../LICENSE" \
70 "$pkgdir/usr/share/licenses/crawl-data/LICENSE"
73 package_crawl-ncurses() {
74 pkgdesc="$pkgdesc (ncurses version)"
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" \
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)"
96 crawl-data hicolor-icon-theme lua51 python-yaml sqlite
97 freetype2 glu libpng sdl2_image ttf-dejavu
100 cd "stone_soup-$pkgver/source"
101 make DESTDIR="$pkgdir" \
102 EXTERNAL_FLAGS="$CFLAGS" \
103 EXTERNAL_LDFLAGS="$LDFLAGS" \
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