mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
community/openfire: move files from /var to /usr
According to the FHS /var is meant for "variable" data which files installed by the package manager by definition are not. It seems the software actually expects it all to be in /var so for now we're symlinking it back, but at least now there are just directories and symlinks there and the actual files are where they belong in /usr
This commit is contained in:
parent
2b67af33f5
commit
7562d541e5
@ -1,17 +1,17 @@
|
||||
# Contributor: Taner Tas <taner76@gmail.com>
|
||||
# Maintainer: Taner Tas <taner76@gmail.com>
|
||||
maintainer="Taner Tas <taner76@gmail.com>"
|
||||
pkgname=openfire
|
||||
pkgver=4.8.1
|
||||
pkgrel=0
|
||||
pkgdesc="Openfire is a cross-platform real-time collaboration server based on the XMPP (Jabber) protocol."
|
||||
pkgrel=1
|
||||
pkgdesc="Openfire is a cross-platform real-time collaboration server based on the XMPP (Jabber) protocol"
|
||||
url="https://www.igniterealtime.org/projects/openfire/"
|
||||
# x86, armhf, armv7: blocked by openjdk>=11
|
||||
# riscv64: blocked by maven
|
||||
arch="all !x86 !armhf !armv7 !riscv64"
|
||||
arch="noarch !x86 !armhf !armv7 !riscv64"
|
||||
license="Apache-2.0"
|
||||
depends="java-jre-headless"
|
||||
makedepends="maven"
|
||||
subpackages="$pkgname-plugins::noarch $pkgname-openrc"
|
||||
subpackages="$pkgname-plugins $pkgname-openrc $pkgname-doc"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/igniterealtime/Openfire/archive/refs/tags/v$pkgver.tar.gz
|
||||
$pkgname.initd
|
||||
@ -26,7 +26,6 @@ install="
|
||||
openfire.post-upgrade
|
||||
"
|
||||
options="net !check" # No test suite
|
||||
_ofhome="/var/lib/openfire"
|
||||
builddir="$srcdir/Openfire-$pkgver"
|
||||
|
||||
# secfixes:
|
||||
@ -39,48 +38,56 @@ build() {
|
||||
}
|
||||
|
||||
package() {
|
||||
install -dm0755 "$pkgdir/$_ofhome"
|
||||
install -dm0755 "$pkgdir/$_ofhome"/plugins
|
||||
mkdir -p \
|
||||
"$pkgdir"/usr/share/openfire/resources \
|
||||
"$pkgdir"/usr/share/doc \
|
||||
"$pkgdir"/usr/share/java
|
||||
install -dm0755 "$pkgdir"/etc/openfire
|
||||
|
||||
cp -r distribution/target/distribution-base/conf "$pkgdir/$_ofhome"/
|
||||
cp -r distribution/target/distribution-base/lib "$pkgdir/$_ofhome"/
|
||||
cp -r distribution/target/distribution-base/resources "$pkgdir/$_ofhome"/
|
||||
cp -r distribution/target/distribution-base/plugins/admin "$pkgdir/$_ofhome"/plugins/
|
||||
cp -r distribution/target/distribution-base/conf "$pkgdir"/etc/openfire
|
||||
|
||||
cp -r distribution/target/distribution-base/resources/security "$pkgdir"/etc/openfire/
|
||||
ln -s /etc/openfire/securiy "$pkgdir"/usr/share/openfire/resources/security
|
||||
|
||||
cp -r distribution/target/distribution-base/plugins "$pkgdir"/usr/share/openfire/
|
||||
cp -r distribution/target/distribution-base/resources/database "$pkgdir"/usr/share/openfire/resources/
|
||||
cp -r distribution/target/distribution-base/resources/spank "$pkgdir"/usr/share/openfire/resources/
|
||||
cp -r distribution/target/distribution-base/lib "$pkgdir"/usr/share/java/openfire
|
||||
cp -r distribution/target/distribution-base/documentation "$pkgdir"/usr/share/doc/openfire
|
||||
|
||||
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
|
||||
chmod 0700 "$pkgdir"/usr/share/openfire \
|
||||
"$pkgdir"/etc/openfire/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
|
||||
cd "$pkgdir"/etc/openfire/security
|
||||
for i in client.truststore keystore truststore
|
||||
do
|
||||
mv "$i" "$i".default
|
||||
chmod 0600 "$i".default
|
||||
done
|
||||
|
||||
chown -R $pkgusers:$pkggroups "$pkgdir/$_ofhome"
|
||||
# Link everything to where OpenFire expects it
|
||||
mkdir -p "$pkgdir"/var/lib/openfire/plugins
|
||||
ln -s /etc/openfire "$pkgdir"/var/lib/openfire/conf
|
||||
ln -s /var/log/openfire "$pkgdir"/var/lib/openfire/logs
|
||||
ln -s /usr/share/openfire/plugins/admin "$pkgdir"/var/lib/openfire/plugins/admin
|
||||
ln -s /usr/share/openfire/resources "$pkgdir"/var/lib/openfire/resources
|
||||
|
||||
chown -R $pkgusers:$pkggroups "$pkgdir"/var/lib/openfire
|
||||
|
||||
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 distribution/target/distribution-base/plugins/*.jar "$subpkgdir/$_ofhome"/plugins/
|
||||
chown -R $pkgusers:$pkggroups "$subpkgdir/$_ofhome"
|
||||
install -dm755 "$subpkgdir"/usr/share/openfire/plugins
|
||||
cp distribution/target/distribution-base/plugins/*.jar "$subpkgdir"/usr/share/openfire/plugins/
|
||||
chown -R $pkgusers:$pkggroups "$subpkgdir"/usr/share/openfire
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user