updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / ii-emg-hg / PKGBUILD
blob2532f71a6afa91fcedf70f6b16881b03845ab019
1 # Maintainer: Evan Gates (emg) <evan.gates@gmail.com>
3 pkgname=ii-emg-hg
4 pkgver=117
5 pkgrel=1
6 pkgdesc="A minimalist FIFO and filesystem-based IRC client. (emg's version)"
7 arch=('i686' 'x86_64')
8 url="https://bitbucket.org/emg/ii-emg/overview"
9 license=('GPL')
10 depends=('glibc')
11 makedepends=('mercurial')
12 provides=('ii')
13 conflicts=('ii')
15 _hgroot="https://bitbucket.org/emg"
16 _hgrepo="ii-emg"
18 build() {
19         cd "$srcdir"
20         msg "Connecting to Mercurial server...."
22         if [ -d $_hgrepo ] ; then
23                 cd $_hgrepo
24                 hg pull -u
25                 msg "The local files are updated."
26         else
27                 hg clone $_hgroot $_hgrepo
28         fi
30         msg "Mercurial checkout done or server timeout"
31         msg "Starting make..."
33         rm -rf "$srcdir/$_hgrepo-build"
34         cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
35         cd "$srcdir/$_hgrepo-build"
37         # switch to branch emg
38         hg up emg
40         # Use this to set the irc path in query.sh to ~/.irc if you wish
41         #  sed -i 's|IRCPATH=$HOME/irc|IRCPATH=$HOME/.irc|' query.sh
43         sed -i "s|CFLAGS = |CFLAGS = ${CFLAGS} |" config.mk
46 package() {
47         cd "$srcdir/$_hgrepo-build"
48         make PREFIX="/usr" DESTDIR="$pkgdir/" install
49         chmod 755 "$pkgdir/usr/bin/ii"
50         install -D -m644 LICENSE \
51                 "$pkgdir/usr/share/licenses/$pkgname/license.txt"
52