updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / spyrit-hg / PKGBUILD
blob0caa6cc8f6f9680b5d4b19477f1876177d1708ba
1 # Maintainer: ClĂ©ment Mairet <clement.mairet@tigris.fr>
2 pkgname=spyrit-hg
3 pkgver=574
4 pkgrel=2
5 pkgdesc="A modern client for MUSH, MUCK, MOO and MUD textual roleplaying games, development version."
6 arch=("any")
7 url="http://spyrit.ierne.eu.org/"
8 license=("GPL")
9 depends=("python2-pyqt" "mercurial")
10 optdepends=("python-pygame: for sound notifications")
11 conflicts=("spyrit")
12 source=('001-archlinux-compat.patch'
13         '002-connect_line-setting.patch')
14 md5sums=('63c93460217455b32e5feba2815054e6'
15          '558fcf17f80d1448aee1862587536af4')
17 _hgroot="https://bitbucket.org/balinares"
18 _hgrepo="spyrit"
20 build() {
21   cd "$srcdir"
22   msg "Connecting to Mercurial server...."
24   if [ -d $_hgrepo ] ; then
25     cd $_hgrepo
26     hg pull -u >/dev/null 2>&1 || return 1
27     msg "The local files are updated."
28   else
29     hg clone $_hgroot $_hgrepo || return 1
30   fi
32   msg "Mercurial checkout done or server timeout"
33   msg "Starting build..."
35   rm -rf "$srcdir/$_hgrepo-build"
36   cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
37   cd "$srcdir/$_hgrepo-build"
39   #
40   # BUILD HERE
41   #
43   # Apply Arch patch to make Spyrit python2-aware
44   msg2 "Applying Arch Linux compatibility patch..."
45   patch -uNp1 -i ../001-archlinux-compat.patch >/dev/null 2>&1 || return 1
47   msg2 "Applying connect_line patch..."
48   # Apply connect_line patch to allow sending autoconnect text
49   patch -uNp1 -i ../002-connect_line-setting.patch >/dev/null 2>&1 || return 1
51   # Generate resources
52   msg2 "Generating resources..."
53   python2 src/resources/mkresources.py
55   # Build standalone script
56   msg2 "Bundling standalone script..."
57   python2 dist/build.py src/spyrit.py > ${pkgname}-${pkgver}.py
60 package() {
61   install -D -m755 $srcdir/$_hgrepo-build/${pkgname}-${pkgver}.py $pkgdir/usr/bin/$_hgrepo