summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bf1f260aee55701833414baeef6a3ed92fb86510 (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
63
64
65
66
67
68
69
70
# Maintainer: Polarian <polarian@polarian.dev>
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgname=openfire-git
pkgver=4.8.0.r16.g6816685
pkgrel=2
pkgdesc="High performance XMPP (Jabber) server."
arch=('any')
url='https://www.igniterealtime.org/projects/openfire/'
license=('APACHE')
depends=('java-runtime-headless<19')
makedepends=('maven' 'jre11-openjdk-headless' 'jdk11-openjdk' 'git')
backup=('etc/conf.d/openfire'
        'etc/openfire/openfire.xml'
        'etc/openfire/security.xml'
        'etc/openfire/crowd.properties'
        'etc/openfire/security/truststore'
        'etc/openfire/security/client.truststore'
        'etc/openfire/security/keystore')
source=("$pkgname::git+https://github.com/igniterealtime/Openfire"
        'openfire.sh'
        'openfire.conf'
        'openfire.service'
        'user.conf'
        'tmpfile.conf')
sha256sums=('SKIP'
            'c850f376d53134ccc8d1035322dea792ba9145a5ab37f1801598c60bc70d0ed1'
            'c8a612abee90bdc9a2869e562a4bbbf596159c60adcd23368833a0e2ca27c1d4'
            'bc58f7e80cbdaee8523874990bf061cfd0e6480c676102e2131fe487d2782061'
            '8bfa51cf8cc88fc69547a8f6e9e3fb242926ca2a100659363e1a6b332f223ba9'
            'c63396991984a067d05e21094a664255d6aed2bf294bddd3885a7da75472b886')
provides=('openfire')
conflicts=('openfire')

pkgver() {
    cd "$pkgname"
      git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | cut -c2-
}

build() {
  cd "$pkgname"
  make
}

package() {
  cd "$pkgdir"
  install -dm755 usr/share/openfire/resources usr/share/{doc,java}
  install -dm750 etc/openfire

  cd "$srcdir"
  install -Dm0755 openfire.sh "$pkgdir"/usr/bin/openfire
  install -Dm0644 openfire.conf "$pkgdir"/etc/conf.d/openfire
  install -Dm0644 openfire.service "$pkgdir"/usr/lib/systemd/system/openfire.service
  install -Dm0644 user.conf "$pkgdir"/usr/lib/sysusers.d/openfire.conf
  install -Dm0644 tmpfile.conf "$pkgdir"/usr/lib/tmpfiles.d/openfire.conf

  cd "$pkgname"/distribution/target/distribution-base

  cp -R conf/* "$pkgdir"/etc/openfire/

  cp -R resources/security "$pkgdir"/etc/openfire/
  ln -s /etc/openfire/security "$pkgdir"/usr/share/openfire/resources/security

  cp -R plugins "$pkgdir"/usr/share/openfire/
  cp -R resources/{database,spank,nativeAuth} "$pkgdir"/usr/share/openfire/resources/
  rm -rf "$pkgdir"/usr/share/openfire/resources/nativeAuth/{osx,win}*
  cp -R lib "$pkgdir"/usr/share/java/openfire
  cp -R documentation "$pkgdir"/usr/share/doc/openfire
}