aboutsummaryrefslogtreecommitdiffstats
path: root/main/roundcubemail
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-04-07 08:18:32 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-04-07 09:00:33 +0000
commita78c5e790c0379a90ab5d0f60fa90792f01adbdd (patch)
tree6ae6f17f505d70a194c39c94cccfa7624c004b34 /main/roundcubemail
parentf748f363d850b31732f954e2b9c3e9d44ca94704 (diff)
downloadaports-a78c5e790c0379a90ab5d0f60fa90792f01adbdd.tar.bz2
aports-a78c5e790c0379a90ab5d0f60fa90792f01adbdd.tar.xz
main/roundcubemail: upgrade to 0.5.1
Diffstat (limited to 'main/roundcubemail')
-rw-r--r--main/roundcubemail/APKBUILD45
-rw-r--r--main/roundcubemail/roundcubemail.post-upgrade21
2 files changed, 58 insertions, 8 deletions
diff --git a/main/roundcubemail/APKBUILD b/main/roundcubemail/APKBUILD
index a92a9c037d..0fee8fc5c8 100644
--- a/main/roundcubemail/APKBUILD
+++ b/main/roundcubemail/APKBUILD
@@ -1,26 +1,55 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=roundcubemail
-pkgver=0.4.2
-pkgrel=1
+pkgver=0.5.1
+pkgrel=0
pkgdesc="A PHP web-based mail client"
url="http://www.roundcube.net"
-arch="all"
+arch="noarch"
license="GPL"
install="$pkgname.post-upgrade"
depends="php php-imap php-xml php-json"
makedepends=""
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
-build ()
-{
+_src="$srcdir"/roundcubemail-$pkgver
+
+prepare() {
+ cd "$_src"
+
+ # fix permissions
+ find . -type f -print | xargs chmod a-x
+ # remove .htaccess
+ find . -name \.htaccess -print | xargs rm -f
+
+ # fixup paths to use the right paths
+ sed -i -e 's|temp/|/tmp/|' \
+ -e 's|config/|/etc/roundcube/|' \
+ -e 's|logs/|/var/log/roundcube/|' \
+ config/main.inc.php.dist || return 1
+
+ sed -i -e 's|logs/|/var/log/roundcube/|' \
+ -e 's|config/|/etc/roundcube/|' \
+ program/include/main.inc || return 1
+
+ # cleanup
+ sed -i 's/\r//' SQL/mssql.initial.sql
+ rm -rf logs temp installer
+}
+
+build() {
+ return 0
+}
+
+package() {
_instdir="$pkgdir"/usr/share/webapps/roundcube
mkdir -p "${_instdir}"
cd "${_instdir}"
- cp -ra "$srcdir"/roundcubemail-$pkgver/* .
+ cp -rp "$srcdir"/roundcubemail-$pkgver/* .
# install config in /etc/roundcube so config files are not overwritten
# on upgrades
mkdir -p "$pkgdir"/etc/
mv config "$pkgdir"/etc/roundcube
- ln -s /etc/roundcube config
+
+ install -d "$pkgdir"/var/log/roundcube
}
-md5sums="d28417f0f16ff2a251a964be153c967a roundcubemail-0.4.2.tar.gz"
+md5sums="f462d4b3999121679ec103ba2dc38e8d roundcubemail-0.5.1.tar.gz"
diff --git a/main/roundcubemail/roundcubemail.post-upgrade b/main/roundcubemail/roundcubemail.post-upgrade
index 708be312a9..2f49d6cc7a 100644
--- a/main/roundcubemail/roundcubemail.post-upgrade
+++ b/main/roundcubemail/roundcubemail.post-upgrade
@@ -24,3 +24,24 @@ if [ -L /usr/share/webapps/roundcube/config.apk-new ] && \
/usr/share/webapps/roundcube/config
fi
+# logs and temp moved
+if [ -d /usr/share/webapps/roundcube/logs ]; then
+ mv /usr/share/webapps/roundcube/logs/* \
+ /var/log/roundcube/
+
+ # clone permissions
+ chown $(stat -c %U:%G /usr/share/webapps/roundcube/logs) \
+ /var/log/roundcube
+fi
+
+if [ -d /usr/share/webapps/roundcube/temp ]; then
+ mv /usr/share/webapps/roundcube/temp/* \
+ /tmp/
+fi
+
+# display info about upgrade
+echo "*" >&2
+echo "* Please remember to manually update your database schema:" >&2
+echo "*" >&2
+ls /usr/share/webapps/roundcube/SQL/*.up*.* >&2
+exit 0