1 # Maintainer: cantabile <cantabile dot desu at gmail dot com>
2 # Contributor: Corrado 'bardo' Primier <corrado.primier@mail.polimi.it>
7 pkgdesc='A tetris clone with a lot of cool features'
9 url='http://www.wkiri.com/projects/atris/'
11 depends=('desktop-file-utils' 'sdl_ttf' 'ttf-dejavu')
14 source=("http://ftp.debian.org/debian/pool/main/a/${pkgname}/${pkgname}_${pkgver}.dfsg.1.orig.tar.gz"
15 "http://ftp.de.debian.org/debian/pool/main/a/${pkgname}/${pkgname}_${pkgver}.dfsg.1-7.1.diff.gz"
17 'add-delay-when-paused.patch')
18 backup=('var/games/atris/Atris.Players'
19 'var/games/atris/Atris.Scores')
24 mkdir -p "${srcdir}/debian-patch"
26 patch -N -d "${srcdir}/debian-patch" -i "${srcdir}/${pkgname}_${pkgver}.dfsg.1-7.1.diff"
28 cd "${srcdir}/${pkgname}-${pkgver}"
30 patch -Np0 -i "${srcdir}/debian-patch/00-atris-1.0.7.configure.in_pathfix.diff"
31 patch -Np0 -i "${srcdir}/debian-patch/01-atris-1.0.7.Makefile.am_pathfix.diff"
32 patch -Np0 -i "${srcdir}/debian-patch/02-atris-1.0.7.proper_statedir.diff"
33 # don't use the freefont patch - it has the wrong dir and I want dejavu.
34 patch -Np0 -i "${srcdir}/use-dejavu.diff"
35 patch -Np0 -i "${srcdir}/debian-patch/04-atris-1.0.7.window_mode_fix.diff"
36 patch -Np0 -i "${srcdir}/debian-patch/05-atris-1.0.7.atrisrc.perms.fix.diff"
37 # without this patch, atris would use 100% cpu when paused (without flames).
38 # thanks to Janno for solving the problem.
39 patch -Np2 -i "${srcdir}/add-delay-when-paused.patch"
41 # thanks to this, it builds on x86_64:
42 # http://linux.derkeiler.com/Newsgroups/linux.redhat/2005-03/0373.html
66 --datadir=/usr/share \
67 --mandir=/usr/share/man \
72 sed -i '/TryExec/iIcon=atris' "$srcdir/debian-patch/atris.desktop"
76 cd "$srcdir/${pkgname}-${pkgver}"
78 # we create var/games/ and var/games/atris because the default
79 # permissions and ownership won't do
80 install -d -m 775 -g games "$pkgdir/var/games"
81 install -d -m 775 -g games "$pkgdir/var/games/atris"
83 make DESTDIR="$pkgdir" install
85 # we make usr/bin/atris setgid and group 'games' so it can
86 # write in var/games/atris
87 chgrp games "$pkgdir/usr/bin/atris"
88 chmod 2755 "$pkgdir/usr/bin/atris"
90 make install_gamedocs target="$pkgdir/usr/share/doc/atris/"
92 # install desktop and icon files
93 install -D -m 644 "$srcdir/debian-patch/atris.desktop" \
94 "$pkgdir/usr/share/applications/atris.desktop"
95 install -D -m 644 "$srcdir/${pkgname}-${pkgver}/icon.xpm" \
96 "$pkgdir/usr/share/pixmaps/atris.xpm"
98 # install the manuals — makepkg compresses them for us
99 install -D -m 644 "$srcdir/debian-patch/atris.1" \
100 "$pkgdir/usr/share/man/man1/atris.1"
101 install -D -m 644 "$srcdir/debian-patch/atris.de.1" \
102 "$pkgdir/usr/share/man/de/man1/atris.1"
104 # default would be 666, the debian package makes them 664
106 chmod 664 "$pkgdir"/var/games/atris/Atris.{Players,Scores}
109 # vim:set ts=2 sw=2 et:
110 md5sums=('0634240c8dda338ae2a3ad81514ed2b5'
111 '004b9586a525dfb2a870108c7dc8457f'
112 '57b7aa9aec0b48c3921d44a2c05eb3bc'
113 '23c8892dbb5162374be4376c6b8c4a4d')