archrelease: copy trunk to community-any
[arch-community.git] / profanity / trunk / PKGBUILD
blob4861e886de40d48a4713d069533958e004a8666f
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: BartÅ‚omiej Piotrowski <bpiotrowski@archlinux.org>
3 # Contributor: jason ryan <jasonwryan@gmail.com>
4 # Contributor: Christian Rebischke <chris.rebischke@archlinux.org>
6 pkgbase=profanity
7 pkgname=('profanity' 'profanity-gtk')
8 pkgver=0.13.1
9 pkgrel=4
10 epoch=1
11 pkgdesc='Console based XMPP client'
12 url='http://www.profanity.im'
13 arch=('x86_64')
14 license=('GPL3')
15 _clidepends=(
16   'libcurl.so' 'libncursesw.so' 'expat' 'glib2' 'libotr'
17   'libnotify.so' 'libgpgme.so' 'python' 'libgcrypt' 'libsignal-protocol-c'
18   'glibc' 'libreadline.so' 'libassuan' 'libgpg-error' 'libstrophe.so'
19   )
20 _gtkdepends=(
21   'libgtk-3.so' 'libxss' 'libx11' 'gdk-pixbuf2' 'cairo'
22   )
23 makedepends=(
24   ${_clidepends[@]} ${_gtkdepends[@]} 'autoconf-archive'
25   )
26 checkdepends=('cmocka')
27 source=(https://github.com/profanity-im/profanity/archive/${pkgver}/${pkgbase}-${pkgver}.tar.gz)
28 sha256sums=('4b1d376115cde47fff2a266aaf3c14eaa62c191d2409f65d611d776a2d28bf7e')
29 sha512sums=('8d7bf0f54266d972470f4f982276036f57f9bc3febd4de46c332e86eaaf932d62b8be8858b3572811849b1a501e508f9652f93ee0499d99da13171f88ba26925')
30 b2sums=('cf7e7daa8f5c2175c615adfb056c33ee7c35c60cdc84cb0016854cf2413113e44713f928b1ca49f96e8aa2a81e6285f5299382bc1abcf44fad9dcc5a79d05974')
32 prepare() {
33   cd ${pkgname}-${pkgver}
35   mkdir -p m4
36   autoreconf -fiv
37   cp -a "${srcdir}"/${pkgname}-${pkgver}{,-gtk}
40 build() {
41   echo "Building non-gtk variant..."
42   (cd ${pkgname}-${pkgver}
43     ./configure \
44       --prefix=/usr \
45       --disable-icons-and-clipboard \
46       --without-xscreensaver \
47       --enable-notifications \
48       --enable-python-plugins \
49       --enable-c-plugins \
50       --enable-plugins \
51       --enable-otr \
52       --enable-omemo \
53       --enable-pgp
54     sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
55     make
56   )
57   echo "Building gtk variant..."
58   (cd ${pkgname}-${pkgver}-gtk
59     ./configure \
60       --prefix=/usr \
61       --enable-icons-and-clipboard \
62       --with-xscreensaver \
63       --enable-notifications \
64       --enable-python-plugins \
65       --enable-c-plugins \
66       --enable-plugins \
67       --enable-otr \
68       --enable-omemo \
69       --enable-pgp
70     sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
71     make
72   )
75 package_profanity() {
76   depends=(
77     ${_clidepends[@]}
78   )
79   cd ${pkgbase}-${pkgver}
80   make DESTDIR="${pkgdir}" install
83 package_profanity-gtk() {
84   pkgdesc+=' (gtk support)'
85   depends=(
86     ${_clidepends[@]} ${_gtkdepends[@]}
87   )
88   provides=('profanity')
89   conflicts=('profanity')
90   cd ${pkgbase}-${pkgver}-gtk
91   make DESTDIR="${pkgdir}" install
94 # vim: ts=2 sw=2 et: