summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2015-06-03 09:18:14 +0200
committerFlorian Bruhin <git@the-compiler.org>2015-06-03 09:18:14 +0200
commitf5af712f76a7ed5d0869130f1f7f9da69541462b (patch)
tree4d9682d1cb2be1f523715528017bbda8d587be90
parent70b45402d4721c0d18d183b65a445c54b5c36b5f (diff)
downloadpkgbuild-f5af712f76a7ed5d0869130f1f7f9da69541462b.tar.gz
pkgbuild-f5af712f76a7ed5d0869130f1f7f9da69541462b.zip
AgenDAV fix WIP
-rw-r--r--agendav/PKGBUILD30
-rw-r--r--agendav/agendav.install13
2 files changed, 32 insertions, 11 deletions
diff --git a/agendav/PKGBUILD b/agendav/PKGBUILD
index 6394216..926573a 100644
--- a/agendav/PKGBUILD
+++ b/agendav/PKGBUILD
@@ -3,15 +3,22 @@
pkgname=agendav
pkgver=1.2.6.2
-pkgrel=2
+pkgrel=3
pkgdesc="Open source multilanguage CalDAV web client"
arch=(any)
url="http://agendav.org/"
license=('GPL')
depends=('php')
+# FIXME
+# The last 3 entries are there so we don't nuke configs from the old broken
+# package. We should probably remove them with the next update so we don't back
+# those file up every time...
backup=("etc/webapps/agendav/config.php"
"etc/webapps/agendav/caldav.php"
- "etc/webapps/agendav/database.php")
+ "etc/webapps/agendav/database.php"
+ "usr/share/webapps/agendav/web/config/config.php"
+ "usr/share/webapps/agendav/web/config/caldav.php"
+ "usr/share/webapps/agendav/web/config/database.php")
source=($pkgname-$pkgver.tar.gz::https://github.com/adobo/${pkgname}/archive/${pkgver}.tar.gz
nginx.example.conf
apache.example.conf)
@@ -23,22 +30,23 @@ sha1sums=('621a7fbb8909b4852ffa7e53dab086ca314d3cae'
package() {
cd "$srcdir/$pkgname-$pkgver"
+ mkdir -p "${pkgdir}/usr/share/webapps/agendav/web/config"
mkdir -p "${pkgdir}/etc/webapps/agendav"
install -Dm644 web/config/config.php.template \
- "${pkgdir}/usr/share/webapps/agendav/web/config/config.php"
- install -Dm644 web/config/caldav.php.template \
- "${pkgdir}/usr/share/webapps/agendav/web/config/caldav.php"
- install -Dm644 web/config/database.php.template \
- "${pkgdir}/usr/share/webapps/agendav/web/config/database.php"
-
- ln -s /usr/share/webapps/agendav/web/config/config.php \
"${pkgdir}/etc/webapps/agendav/config.php"
- ln -s /usr/share/webapps/agendav/web/config/caldav.php \
+ install -Dm644 web/config/caldav.php.template \
"${pkgdir}/etc/webapps/agendav/caldav.php"
- ln -s /usr/share/webapps/agendav/web/config/database.php \
+ install -Dm644 web/config/database.php.template \
"${pkgdir}/etc/webapps/agendav/database.php"
+ ln -s /etc/webapps/agendav/config.php \
+ "${pkgdir}/usr/share/webapps/agendav/web/config/config.php"
+ ln -s /etc/webapps/agendav/caldav.php \
+ "${pkgdir}/usr/share/webapps/agendav/web/config/caldav.php"
+ ln -s /etc/webapps/agendav/database.php \
+ "${pkgdir}/usr/share/webapps/agendav/web/config/database.php"
+
install -Dm644 "$srcdir/nginx.example.conf" \
"$pkgdir/etc/webapps/agendav/nginx.example.conf"
diff --git a/agendav/agendav.install b/agendav/agendav.install
index 92ce469..a06e289 100644
--- a/agendav/agendav.install
+++ b/agendav/agendav.install
@@ -1,3 +1,16 @@
post_install() {
echo "Check http://wiki.archlinux.org/index.php/AgenDAV for details."
}
+
+post_upgrade() {
+ echo "Since pkgrel -3, the incorrect symlinking of config files in this "
+ echo "package has been fixed. This however means pacman will install "
+ echo "the correct files as /etc/webapps/agendav/*.php.pacnew and leave a "
+ echo "broken symlink as *.php. This means AgenDAV will report no config "
+ echo "has been found."
+ echo
+ echo "Your existing config files should have been backed up in "
+ echo "/usr/share/webapps/agendav/config/web/*.php.pacbak. This means you "
+ echo "can probably fix things up by running this now:"
+ echo "FIXME"
+}