aboutsummaryrefslogtreecommitdiffstats
path: root/community/roundcubemail/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-07-26 21:32:14 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-07-27 15:30:37 +0200
commitcc204055d54f7bb963788a20b16fc4db7b5c7184 (patch)
treeb42aceeaf7306427994209c9829abe034488f7ab /community/roundcubemail/APKBUILD
parent396a022ea240f7ce622b7b8e5587d66a62a67302 (diff)
downloadaports-cc204055d54f7bb963788a20b16fc4db7b5c7184.tar.bz2
aports-cc204055d54f7bb963788a20b16fc4db7b5c7184.tar.xz
community/roundcubemail: add subpkg -openrc for running with php-fpm
Diffstat (limited to 'community/roundcubemail/APKBUILD')
-rw-r--r--community/roundcubemail/APKBUILD32
1 files changed, 28 insertions, 4 deletions
diff --git a/community/roundcubemail/APKBUILD b/community/roundcubemail/APKBUILD
index e97b0fd845..0a9e723357 100644
--- a/community/roundcubemail/APKBUILD
+++ b/community/roundcubemail/APKBUILD
@@ -1,4 +1,5 @@
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=roundcubemail
pkgver=1.3.6
@@ -28,12 +29,17 @@ depends="$_php
$_php-zip
ca-certificates
"
+pkgusers="roundcube"
+pkggroups="$pkgusers"
options="!check" # no tests provided
-install="$pkgname.post-install $pkgname.post-upgrade"
-subpackages="$pkgname-installer $pkgname-doc"
+install="$pkgname.pre-install $pkgname.post-install $pkgname.post-upgrade
+ $pkgname-openrc.post-install"
+subpackages="$pkgname-installer $pkgname-openrc $pkgname-doc"
source="https://github.com/roundcube/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz
fix-dirs.patch
config-session_key.patch
+ fpm-pool.conf
+ $pkgname.confd
"
builddir="$srcdir/$pkgname-$pkgver"
@@ -77,7 +83,7 @@ package() {
done
_mv ./$_destdir/LICENSE ./usr/share/licenses/roundcube/
- install -d ./var/log/roundcube
+ install -d -m 750 -o roundcube -g roundcube ./var/log/roundcube
}
installer() {
@@ -87,6 +93,22 @@ installer() {
_mv "$pkgdir"/$_destdir/installer "$subpkgdir"/$_destdir/
}
+openrc() {
+ pkgdesc="OpenRC init script that runs Roundcube with php-fpm"
+ depends="$pkgname=$pkgver-r$pkgrel $_php-fpm"
+
+ local confdir="$subpkgdir/etc/$_php/php-fpm.d"
+ local fpm_name="php-fpm${_php#php}"
+
+ install -m 644 -D "$srcdir"/fpm-pool.conf "$confdir"/roundcube.conf
+ install -m 644 -D "$srcdir"/$pkgname.confd "$subpkgdir"/etc/conf.d/roundcube
+
+ mkdir -p "$subpkgdir"/etc/init.d
+ ln -s $fpm_name "$subpkgdir"/etc/init.d/roundcube
+
+ install -m 700 -o roundcube -g roundcube -d "$subpkgdir"/var/tmp/roundcube
+}
+
_mv() {
local dest; for dest; do true; done # get last argument
mkdir -p "$dest"
@@ -95,4 +117,6 @@ _mv() {
sha512sums="c5e1e80034392ea4fcf780750ad2b7db43422a746462015865cbdb027e9e47b2bae7b191da19b65a7b9303c195bdfd0aa5b5a0382c09dd97d117671271cdc122 roundcubemail-1.3.6.tar.gz
d205ba8442870b26f93fb287e7fe2bd1a452ea534823869b7ef299e2dca52d64c8a3fdc9a44bd3bc731c1e400efcf745c1866974e3b908e4e54d05b47b835f3e fix-dirs.patch
-7c4b88da4d2baa53d247dcb7b130d564954a04611c13f2770f45924fafab2a0e98f8dd078cabc87f3eddd0ab03f3ca48a48f27a462676354af22566cb19d220b config-session_key.patch"
+7c4b88da4d2baa53d247dcb7b130d564954a04611c13f2770f45924fafab2a0e98f8dd078cabc87f3eddd0ab03f3ca48a48f27a462676354af22566cb19d220b config-session_key.patch
+c88d609e94c212215a24f54d2a2cb800d4a382b1044e0c875416bdda6a4e6c0cb896675918e8d24f3ed9e1b677d526d61f3ee1564cb870f674dac687696e8ba4 fpm-pool.conf
+acaa76bfbba6117172a02ad11e39f9b55838895104e75180b057f647156c04fd2e44ac695a333f2332691d19bac5ef8afaca1f89ad409800b19f78afbb40aecb roundcubemail.confd"