diff options
author | Taner Tas <taner76@gmail.com> | 2018-09-03 22:25:30 +0300 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-09-04 10:36:49 +0000 |
commit | c045c835e171568e0c695a1f623270c584214545 (patch) | |
tree | a42c08a5d942e23b9d77a1591cd34d3b46e37642 /testing/openfire | |
parent | a6caef63909ff1fc535a9c3a236cd50ba0e612b1 (diff) | |
download | aports-c045c835e171568e0c695a1f623270c584214545.tar.bz2 aports-c045c835e171568e0c695a1f623270c584214545.tar.xz |
testing/openfire: new aport
https://www.igniterealtime.org/projects/openfire/
Openfire is a cross-platform real-time collaboration server based on the XMPP (Jabber) protocol.
Diffstat (limited to 'testing/openfire')
-rw-r--r-- | testing/openfire/APKBUILD | 86 | ||||
-rw-r--r-- | testing/openfire/openfire.confd | 6 | ||||
-rw-r--r-- | testing/openfire/openfire.initd | 24 | ||||
-rw-r--r-- | testing/openfire/openfire.logrotate | 8 | ||||
-rwxr-xr-x | testing/openfire/openfire.post-install | 18 | ||||
l--------- | testing/openfire/openfire.post-upgrade | 1 | ||||
-rwxr-xr-x | testing/openfire/openfire.pre-install | 6 |
7 files changed, 149 insertions, 0 deletions
diff --git a/testing/openfire/APKBUILD b/testing/openfire/APKBUILD new file mode 100644 index 0000000000..32f6cb9dce --- /dev/null +++ b/testing/openfire/APKBUILD @@ -0,0 +1,86 @@ +# Contributor: Taner Tas <taner76@gmail.com> +# Maintainer: Taner Tas <taner76@gmail.com> +pkgname=openfire +pkgver=4.2.3 +pkgrel=0 +pkgdesc="Openfire is a cross-platform real-time collaboration server based on the XMPP (Jabber) protocol." +url="https://www.igniterealtime.org/projects/openfire/" +arch="all" +license="Apache-2.0" +depends="openjdk8-jre-lib" +makedepends="apache-ant openjdk8" +subpackages="$pkgname-plugins::noarch $pkgname-openrc" +source=" + https://www.igniterealtime.org/downloadServlet?filename=$pkgname/${pkgname}_src_${pkgver//./_}.tar.gz + $pkgname.initd + $pkgname.confd + $pkgname.logrotate + " +pkgusers="openfire" +pkggroups="openfire" +install=" + $pkgname.pre-install + openfire.post-install + openfire.post-upgrade + " +options="!check" # No test suite +builddir="$srcdir/${pkgname}_src" +_ofhome="/var/lib/openfire" + +build() { + cd "$builddir" + rm -rf src/resources/nativeAuth + cd build + ant openfire plugins +} + +package() { + cd "$builddir" + install -dm0755 "$pkgdir/$_ofhome" + install -dm0755 "$pkgdir/$_ofhome"/plugins + + cp -r target/openfire/conf "$pkgdir/$_ofhome"/ + cp -r target/openfire/lib "$pkgdir/$_ofhome"/ + cp -r target/openfire/resources "$pkgdir/$_ofhome"/ + cp -r target/openfire/plugins/admin "$pkgdir/$_ofhome"/plugins/ + + find "$pkgdir" -type f -exec chmod 0644 {} \; + find "$pkgdir" -type d -exec chmod 0755 {} \; + find "$pkgdir" -type d -exec chmod u-s,g-s {} \; + + chmod 0700 "$pkgdir/$_ofhome"/conf \ + "$pkgdir/$_ofhome"/resources/security + + cd "$pkgdir/$_ofhome"/conf + for i in openfire.xml security.xml + do + mv "$i" "$i".default + chmod 0600 "$i".default + done + + cd "$pkgdir/$_ofhome"/resources/security + for i in client.truststore keystore truststore + do + mv "$i" "$i".default + chmod 0600 "$i".default + done + + chown -R $pkgusers:$pkggroups "$pkgdir/$_ofhome" + + install -Dm0755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -Dm0644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname + install -Dm0644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname + +} + +plugins() { + cd "$builddir" + install -dm755 "$subpkgdir/$_ofhome"/plugins + cp target/openfire/plugins/*.jar "$subpkgdir/$_ofhome"/plugins/ + chown -R $pkgusers:$pkggroups "$subpkgdir/$_ofhome" +} + +sha512sums="8b968c94fcd779544c90de34172b00d472dc2e42142f2aa5eda01f0e0c3dda903a3b9b6d82286916bb1ae8f97fb12f0a94aeb42fad1df0b2dd47e951e03b8523 openfire_src_4_2_3.tar.gz +95a486898b84c4b7b0e3a60ceb7ccbb5d383451228b9c5090dc58513afc9513095e6c124e2ef170912376a7179d058b106d3bbd69db7b7204ff5f1be13823bdc openfire.initd +e952b1dbf10df6c8303f6e71ae08853a1901cbf92f059c3dc927e0085365e6c4752d2c5ddaa9ce1da944a164ee0f29b1057e10a61840814bff3722020253b5bf openfire.confd +e17684600700c85d366549b7ac9fec64b9abcd1fd53e131e2d5b9d53514865ad0eacb25618dfc6c264af25fb880e761cdd7349bdcbc22c1f65a6fa7444dcd2a7 openfire.logrotate" diff --git a/testing/openfire/openfire.confd b/testing/openfire/openfire.confd new file mode 100644 index 0000000000..d6888b0f8d --- /dev/null +++ b/testing/openfire/openfire.confd @@ -0,0 +1,6 @@ +JAVA_HOME=/usr/lib/jvm/default-jvm +OPENFIRE_HOME=/var/lib/openfire +OPENFIRE_CMD="$JAVA_HOME/bin/java" +OPENFIRE_ARGS="-server -Xmx256m -DopenfireHome=$OPENFIRE_HOME \ + -Dopenfire.lib.dir=$OPENFIRE_HOME/lib -classpath $OPENFIRE_HOME/lib/startup.jar \ + -jar $OPENFIRE_HOME/lib/startup.jar" diff --git a/testing/openfire/openfire.initd b/testing/openfire/openfire.initd new file mode 100644 index 0000000000..1a370c9d88 --- /dev/null +++ b/testing/openfire/openfire.initd @@ -0,0 +1,24 @@ +#!/sbin/openrc-run + +depend() { + need net + provide jabber-server +} + +start() { + ebegin "Starting Openfire Server" + start-stop-daemon \ + --user openfire \ + --background \ + --make-pidfile \ + --pidfile /run/openfire.pid \ + --start \ + --exec $OPENFIRE_CMD -- $OPENFIRE_ARGS > /var/log/openfire.log 2>&1 + eend +} + +stop() { + ebegin "Stopping Openfire Server" + start-stop-daemon --pidfile /run/openfire.pid --stop + eend +} diff --git a/testing/openfire/openfire.logrotate b/testing/openfire/openfire.logrotate new file mode 100644 index 0000000000..aa26432c49 --- /dev/null +++ b/testing/openfire/openfire.logrotate @@ -0,0 +1,8 @@ +/var/lib/openfire/log/* { + size 1M + missingok + notifempty + copytruncate + rotate 7 + compress +} diff --git a/testing/openfire/openfire.post-install b/testing/openfire/openfire.post-install new file mode 100755 index 0000000000..9b2a66fae8 --- /dev/null +++ b/testing/openfire/openfire.post-install @@ -0,0 +1,18 @@ +#!/bin/sh + +_ofhome=/var/lib/openfire + +for conf in "$_ofhome"/conf/openfire.xml \ + "$_ofhome"/conf/security.xml \ + "$_ofhome"/resources/security/client.truststore \ + "$_ofhome"/resources/security/keystore \ + "$_ofhome"/resources/security/truststore +do + if [ -f "$conf" ] + then + printf "$conf exists. Not creating new one. \n\n" + else + printf "Copying new $conf \n" + cp -av "$conf".default "$conf" || printf "Copying new $conf failed. \n\n" + fi +done diff --git a/testing/openfire/openfire.post-upgrade b/testing/openfire/openfire.post-upgrade new file mode 120000 index 0000000000..d373752edb --- /dev/null +++ b/testing/openfire/openfire.post-upgrade @@ -0,0 +1 @@ +openfire.post-install
\ No newline at end of file diff --git a/testing/openfire/openfire.pre-install b/testing/openfire/openfire.pre-install new file mode 100755 index 0000000000..929ee1b5a2 --- /dev/null +++ b/testing/openfire/openfire.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S openfire 2>/dev/null +adduser -S -D -H -h /var/lib/openfire -G openfire -g openfire openfire 2>/dev/null + +exit 0 |