updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / ii-hg / PKGBUILD
blob3d1166c41967293e5b390351bbe91929259fcb99
1 # Contributor: Anthony Martin <ality@pbrane.org>
2 # Contributor: Chris Brannon <cmbrannon79 (at) gmail.com>
4 pkgname='ii-hg'
5 pkgver=81
6 pkgrel=1
7 pkgdesc="A minimalist FIFO and filesystem-based IRC client"
8 arch=(i686 x86_64)
9 url="http://wmii.de/index.php/WMII/ii"
10 license=('MIT')
11 depends=('glibc')
12 makedepends=('mercurial')
13 provides=('ii')
14 conflicts=('ii')
15 source=('config.mk')
16 md5sums=('17d6db42d3297691e4a8e98598065f59')
18 _hgroot='http://hg.suckless.org/'
19 _hgrepo='ii'
21 build() {
22     cd "$srcdir"
24     rm -rf "$_hgrepo-build"
25     if [ ! -d $_hgrepo ]; then
26         hg clone $_hgroot$_hgrepo || return 1
27     else
28         cd $_hgrepo
29         hg pull -u
30     fi
31     cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
32     cd "$srcdir/$_hgrepo-build"
33     cp ../config.mk .
35     sed -i "s|%CFLAGS%|$CFLAGS|g" config.mk
36     sed -i "s|%LDFLAGS%|$LDFLAGS|g" config.mk
38     make || return 1
39     make DESTDIR="$pkgdir" install
41     install -m755 -d  "$pkgdir/usr/share/licenses/ii-hg" || return 1
42     install -m644 LICENSE "$pkgdir/usr/share/licenses/ii-hg" || return 1
43     # make install sets permissions to 775...
44     chmod 755 "$pkgdir/usr/bin/ii"
45     rm -f "$pkgdir/usr/share/doc/ii/LICENSE" # no duplicate files, please