summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Bruhin2015-06-03 09:18:14 +0200
committerFlorian Bruhin2015-06-03 09:18:14 +0200
commitca4df8bd5543539320461cfcdbf6eff59963f335 (patch)
tree678d7399f522a9f75d3c1f81c4aa9080a67b3e93
parentd988913841f9a9f89ed9386833a210d9f80b4281 (diff)
downloadaur-ca4df8bd5543539320461cfcdbf6eff59963f335.tar.gz
AgenDAV fix WIP
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD30
-rw-r--r--agendav.install13
3 files changed, 36 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5dd5e3704a9..e3ba88d0dbd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = agendav
pkgdesc = Open source multilanguage CalDAV web client
pkgver = 1.2.6.2
- pkgrel = 2
+ pkgrel = 3
url = http://agendav.org/
install = agendav.install
arch = any
@@ -10,6 +10,9 @@ pkgbase = agendav
backup = etc/webapps/agendav/config.php
backup = etc/webapps/agendav/caldav.php
backup = etc/webapps/agendav/database.php
+ backup = usr/share/webapps/agendav/web/config/config.php
+ backup = usr/share/webapps/agendav/web/config/caldav.php
+ backup = usr/share/webapps/agendav/web/config/database.php
source = agendav-1.2.6.2.tar.gz::https://github.com/adobo/agendav/archive/1.2.6.2.tar.gz
source = nginx.example.conf
source = apache.example.conf
diff --git a/PKGBUILD b/PKGBUILD
index 639421675a4..926573ae8c5 100644
--- a/PKGBUILD
+++ b/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.install b/agendav.install
index 92ce469e638..a06e289f26c 100644
--- a/agendav.install
+++ b/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"
+}