summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5ba1573d19d258644a92cc9355a998d495c28abf (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
46
47
48
49
50
51
# Maintainer: Shengyu Zhang <arch at srain.im>

pkgname=srain-dev
pkgver=0.679.28fac2b
pkgrel=1
pkgdesc="Modern, beautiful IRC client written in GTK+ 3, develop and debug version"
arch=('i686' 'x86_64')
license=('GPL')
url="https://srain.im"
makedepends=('git' 'make' 'gcc' 'pkg-config' 'gettext' 'imagemagick')
depends=('gtk3' 'python' 'curl' 'libnotify' 'libconfig' 'gdb')
optdepends=(
    'glib-networking: TLS connection support'
    'python-sphinx: for generating documentation'
    'python-urllib3: avatar and pastebin support'
    'python-requests: avatar and pastebin support'
    )
conflicts=('srain')
provides=('srain')
source=("git+https://github.com/SilverRainZ/srain.git#branch=dev")
sha256sums=('SKIP')

_prefix='/usr'

pkgver() {
    cd ${pkgname%-dev}
    echo "0.$(git rev-list --count HEAD).$(git describe --always)"
}

build() {
    cd ${pkgname%-dev}

    ./configure --prefix=${_prefix} --config-dir=/etc --enable-debug
    make
    make doc
}

package() {
    cd ${pkgname%-dev}

    make DESTDIR=${pkgdir} install
    make DESTDIR=${pkgdir} install-doc
    mv ${pkgdir}${_prefix}/bin/srain{,-dev}

    cat << EOF > ${pkgdir}${_prefix}/bin/srain
!/bin/sh
gdb ${pkgdir}${_prefix}/bin/srain-dev -ex 'r' -ex 'bt' -ex 'q'
EOF

    chmod 755 ${pkgdir}${_prefix}/bin/srain
}