aboutsummaryrefslogtreecommitdiffstats
path: root/PKGBUILD
blob: 75e03c4efbebb71db1ee15228296dcb03b86d37f (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
45
pkgname=weechat-git
pkgver=1.2.r16.gc540db0
pkgrel=1

pkgdesc="Fast, light & extensible IRC client (curses UI)"
url="http://www.weechat.org/"
arch=('i686' 'x86_64')
license=('GPL3')

depends=('gnutls' 'ncurses-git' 'libgcrypt')
optdepends=('perl' 'python2' 'lua' 'tcl' 'ruby' 'aspell')
makedepends=('git' 'cmake' 'pkgconfig' 'perl' 'python2' 'lua' 'tcl' 'ruby' 'aspell')

provides=('weechat')
conflicts=('weechat')

options=(!makeflags)

source=("git+https://github.com/weechat/weechat.git")

md5sums=('SKIP')

pkgver(){
	cd weechat
	git describe --long | sed -E 's/^v//;s/-rc/rc/;s/([^-]*-g)/r\1/;s/-/./g'
}

build() {
	cd weechat

	# https://github.com/weechat/weechat/issues/287
	export CFLAGS="$CFLAGS -fPIC"

	cmake -DCMAKE_INSTALL_PREFIX=/usr \
	      -DPYTHON_EXECUTABLE=/usr/bin/python2 \
	      -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so\
	      -DENABLE_MAN=ON \
	      -DENABLE_DOC=OFF \
	      -DWEECHAT_HOME=~/.config/weechat
	make
}

package() {
	make -C weechat DESTDIR="$pkgdir" install
}