# Maintainer: Jesus E. pkgname=micropolis pkgver=0.0.20071228 _debver=$pkgver _debrel=10 pkgrel=2 pkgdesc="Real-time, free and libre city management simulator" arch=('i686' 'x86_64') url='http://www.donhopkins.com/home/micropolis/' license=('GPL-3') depends=('sdl' 'sdl_mixer' 'libxpm' 'libxext') makedepends=('quilt') options=(!makeflags) groups=('games') source=("https://deb.debian.org/debian/pool/main/m/micropolis-activity/micropolis-activity_${pkgver}.orig.tar.gz" "https://deb.debian.org/debian/pool/main/m/micropolis-activity/micropolis-activity_${_debver}-${_debrel}.debian.tar.xz" "fhs-compliant.patch" "fix-hostname.patch") sha512sums=('fe65966c43d044e01a63a3cfe3cad48466eb1e5ec8b13c03abb52d582395a8ab527332d4d04454a4f32e85b65e55d72fe5e4d53a3f37b422d90e9208f00d9976' 'e58af94fa421801a6657b9a074dc4ed4bd9a06001dd1cc8c5a2b5bf9be546b14f1ce8c257b667f6652736e0b19ba1bd567eb792b05a720bbde57e06579f77bd6' '91d1ca40cc7bd9b093f2b1cf33172901695ab627338ea9ca4900f9d582f31d9dbc893af9ae81968b6c319f90eb1d8d847450a0066a241e4127701d55680799dd' 'd3e1a4753a8076d0a0b03c3e97d1497a9eeb68069904d20be4d5ce42683e563e63ef04299f3f58fe794332f65f8f4971ba4d525c0f40433799b880629fb9e7e6') prepare() { mv -v "$pkgname-activity" "$pkgname-$pkgver" cd "$pkgname-$pkgver" if [[ ${pkgver%.*} = ${_debver%.*} ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian . # Doesn't apply rm -v debian/patches/makefile.patch || true quilt push -av patch -Np1 -i ${srcdir}/fhs-compliant.patch patch -Np1 -i ${srcdir}/fix-hostname.patch fi } build() { cd "$pkgname-$pkgver" make } package() { cd "$pkgname-$pkgver" make PREFIX="/usr" DESTDIR="$pkgdir" install # documentation and license install -Dm644 debian/$pkgname.6 -t "$pkgdir"/usr/share/man/man6 install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname }