summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 59edaf71245e539de3f0c72934b1cb2b2c2357c1 (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
52
53
54
55
56
57
58
59
60
61
62
# Maintainer: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

_pkgname=biboumi
pkgname="$_pkgname-git"
pkgver=9.0.r27.g2bd91dc
pkgrel=2
pkgdesc="XMPP gateway to IRC"
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
url="https://biboumi.louiz.org/"
license=('ZLIB')
depends=('expat' 'libidn' 'udns' 'botan2' 'sqlite' 'postgresql-libs')
makedepends=('git' 'cmake' 'ninja' 'python-sphinx' 'python-sphinx_rtd_theme')
backup=("etc/$_pkgname/$_pkgname.cfg")
install="$_pkgname.install"
source=("$_pkgname::git+https://codeberg.org/poezio/biboumi"
        'biboumi.install'
        'sysuser.conf')
md5sums=('SKIP'
         '4d83eb74d68a2328b19c1e8df5cdb5d7'
         '07c92af3248861ce94d361e98cfb7f5c')

provides=("$_pkgname")
conflicts=("$_pkgname")

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

prepare() {
  cd $_pkgname
  mkdir -p build
}

build() {
  cd $_pkgname/build
  cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DSERVICE_USER=biboumi \
    -DSERVICE_GROUP=jabber \
    -Wno-dev \
    -G Ninja
  ninja
  ninja doc
}

package() {
  cd $_pkgname/build
  DESTDIR="$pkgdir/" ninja install

  install -dm755 "$pkgdir"/usr/share/doc/$_pkgname/
  cp -r html "$pkgdir"/usr/share/doc/$_pkgname/

  cd ..
  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$_pkgname/LICENSE
  install -Dm644 doc/*.rst "$pkgdir"/usr/share/doc/$_pkgname/
  install -Dm644 conf/biboumi.cfg "$pkgdir"/etc/$_pkgname/$_pkgname.cfg

  cd ..
  install -Dm644 sysuser.conf "$pkgdir"/usr/lib/sysusers.d/$_pkgname.conf
}