summaryrefslogtreecommitdiffstats
path: root/vcs/ii-git/PKGBUILD
blob: d927c556d2a5d72b5c5bf49867504d40f466011b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Anthony Martin <ality@pbrane.org>
# Contributor: Chris Brannon <cmbrannon79 (at) gmail.com>
# Contributor: William Giokas <1007380@gmail.com>

pkgname=ii-git
_pkgname=ii
epoch=1
pkgver=1.7.r1.g28feb9a
pkgrel=1
pkgdesc="A minimalist FIFO and filesystem-based IRC client"
arch=(i686 x86_64)
url="http://tools.suckless.org/ii/"
license=('MIT')
depends=('glibc')
makedepends=('git')
replaces=('ii-hg')
provides=('ii')
conflicts=('ii')
source=("${_pkgname}::git+http://git.suckless.org/ii#branch=master")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  git describe --tags --long | sed -E 's/([^-]+-g)/r\1/;s/-/./g;s/^v//g'
}

prepare() {
  cd "$srcdir/$_pkgname"
  # Set a descriptive version for ii-git.
  sed -i "s|^VERSION.*=.*|VERSION = ${pkgver}-${pkgrel}|g" config.mk
}

build() {
  cd "$srcdir/$_pkgname"
  make PREFIX=/usr
}

package() {
  cd "$srcdir/$_pkgname"
  make PREFIX=/usr DESTDIR="$pkgdir" install
  # We want ii to be installed with 755, not 775 perms.
  chmod 755 "$pkgdir/usr/bin/ii"
}