[arch-commits] Commit in openfire/trunk (PKGBUILD openfire.install user.conf)

Massimiliano Torromeo mtorromeo at archlinux.org
Mon Feb 9 09:49:40 UTC 2015


    Date: Monday, February 9, 2015 @ 10:49:39
  Author: mtorromeo
Revision: 127357

upgpkg: openfire 3.9.3-2

No user removal at uninstall time

Added:
  openfire/trunk/user.conf
Modified:
  openfire/trunk/PKGBUILD
  openfire/trunk/openfire.install

------------------+
 PKGBUILD         |   39 ++++++++++++++++++++++-----------------
 openfire.install |   14 +-------------
 user.conf        |    1 +
 3 files changed, 24 insertions(+), 30 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-02-09 09:44:04 UTC (rev 127356)
+++ PKGBUILD	2015-02-09 09:49:39 UTC (rev 127357)
@@ -4,7 +4,7 @@
 
 pkgname=openfire
 pkgver=3.9.3
-pkgrel=1
+pkgrel=2
 pkgdesc="High performance XMPP (Jabber) server."
 arch=('any')
 url='http://www.igniterealtime.org/projects/openfire/'
@@ -17,10 +17,10 @@
 	'etc/conf.d/openfire' 'etc/openfire/security/keystore' 'etc/openfire/security/truststore' \
 	'etc/openfire/security/client.truststore')
 source=("http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_src_${pkgver//./_}.tar.gz" \
-	'openfire.conf' 'openfire.service')
+	'openfire.conf' 'openfire.service' 'user.conf')
 
 build() {
-	cd "$srcdir/openfire_src/build"
+	cd "$srcdir"/openfire_src/build
 	rm -rf ../src/resources/nativeAuth/
 	ant openfire
 # 	ant plugins
@@ -27,27 +27,32 @@
 }
 
 package() {
-	cd "$srcdir/openfire_src/target/openfire"
+	cd "$pkgdir"
+	install -dm755 usr/lib usr/share/openfire/resources etc/openfire var/log/openfire
 
-	install -dm755 "$pkgdir/usr/lib" "$pkgdir/usr/share/openfire/resources"
-	install -dm750 "$pkgdir/etc/openfire" "$pkgdir/var/log/openfire"
+	cd "$srcdir"
+	install -Dm644 openfire.conf "$pkgdir"/etc/conf.d/openfire
+	install -Dm644 openfire.service "$pkgdir"/usr/lib/systemd/system/openfire.service
+	install -Dm644 user.conf "$pkgdir"/usr/lib/sysusers.d/openfire.conf
 
-	install -Dm644 "$srcdir/openfire.conf" "$pkgdir/etc/conf.d/openfire"
-	install -Dm644 "$srcdir/openfire.service" "$pkgdir/usr/lib/systemd/system/openfire.service"
-
+	cd openfire_src/target/openfire
 	rm -rf bin logs
 
-	cp -R conf/* "$pkgdir/etc/openfire/"
-	ln -s /etc/openfire "$pkgdir/usr/share/openfire/conf"
+	cp -R conf/* "$pkgdir"/etc/openfire/
+	ln -s /etc/openfire "$pkgdir"/usr/share/openfire/conf
 
-	cp -R resources/security "$pkgdir/etc/openfire/"
-	ln -s /etc/openfire/security "$pkgdir/usr/share/openfire/resources/security"
+	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} "$pkgdir/usr/share/openfire/resources/"
-	cp -R lib "$pkgdir/usr/lib/openfire"
+	cp -R plugins "$pkgdir"/usr/share/openfire/
+	cp -R resources/{database,spank} "$pkgdir"/usr/share/openfire/resources/
+	cp -R lib "$pkgdir"/usr/lib/openfire
+
+	cd "$pkgdir"
+	chown -Rh 115:115 var/log/openfire usr/share/openfire etc/openfire
 }
 
 sha256sums=('37001835a3007f115214aa83f2a48f8c33bbf3576937f4d964d9eb3de3933ad2'
             'c8a612abee90bdc9a2869e562a4bbbf596159c60adcd23368833a0e2ca27c1d4'
-            '772332b66a90935ddb8075eb10eab9b95a84caa45908bb3fa5861d7fa148399c')
+            '772332b66a90935ddb8075eb10eab9b95a84caa45908bb3fa5861d7fa148399c'
+            'f44b92b2b17cee66293caa10f50eeb83475390591c25ab4f7c8be3878465c137')

Modified: openfire.install
===================================================================
--- openfire.install	2015-02-09 09:44:04 UTC (rev 127356)
+++ openfire.install	2015-02-09 09:49:39 UTC (rev 127357)
@@ -1,15 +1,3 @@
 post_install() {
-  getent group openfire >/dev/null 2>&1 || groupadd -r openfire &>/dev/null;
-  getent passwd openfire >/dev/null 2>&1 || useradd -rg openfire -d /usr/share/openfire -s /bin/false openfire &>/dev/null
-
-  chown -R openfire:openfire var/log/openfire usr/share/openfire etc/openfire
+  systemd-sysusers openfire.conf
 }
-
-post_upgrade() {
-  post_install
-}
-
-pre_remove() {
-  getent passwd openfire >/dev/null 2>&1 && userdel openfire &> /dev/null
-  getent group openfire >/dev/null 2>&1 && groupdel openfire &> /dev/null
-}

Added: user.conf
===================================================================
--- user.conf	                        (rev 0)
+++ user.conf	2015-02-09 09:49:39 UTC (rev 127357)
@@ -0,0 +1 @@
+u openfire 115 "openfire user" /usr/share/openfire



More information about the arch-commits mailing list