summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFanch2016-08-09 22:12:01 +0200
committerFanch2016-08-09 22:12:01 +0200
commita15b81978928bd69dcf4fce9c6ba7e0e7c417326 (patch)
tree2cc865fbd4def8d977f5dc5d95d9eedc22982d0f
downloadaur-a15b81978928bd69dcf4fce9c6ba7e0e7c417326.tar.gz
Update Version
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD51
-rw-r--r--apache.conf10
-rw-r--r--piwigo.install7
-rw-r--r--piwigo.perm.sh9
5 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ad32188d3e72
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = piwigo
+ pkgdesc = Piwigo is a photo gallery software for the web that comes with powerful features to publish and manage your collection of pictures.
+ pkgver = 2.8.2
+ pkgrel = 1
+ url = http://piwigo.org/
+ install = piwigo.install
+ arch = any
+ license = GPL
+ makedepends = wget
+ makedepends = unzip
+ depends = php
+ depends = php-gd
+ depends = mariadb
+ options = emptydirs
+ source = http://piwigo.org/download/dlcounter.php?code=latest
+ source = piwigo.perm.sh
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = piwigo
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fb2fb1c1a280
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Foppe HEMMINGA <foppe@hemminga.net>
+# Contributer: Julien Girardin <jugirardin@gmail.com>
+
+pkgname=piwigo
+pkgver=2.8.2
+pkgrel=1
+pkgdesc="Piwigo is a photo gallery software for the web that comes with powerful features to publish and manage your collection of pictures."
+arch=(any)
+url="http://piwigo.org/"
+license=("GPL")
+depends=("php" "php-gd" "mariadb")
+makedepends=("wget" "unzip")
+backup=("etc/webapps/piwigo/apache.conf")
+install=piwigo.install
+options=(emptydirs)
+
+source=('apache.conf'
+ 'piwigo.perm.sh')
+md5sums=('SKIP' 'SKIP')
+
+prepare() {
+ # I don't find a way to overide DLAGENTS from makepkg.conf to use wget and option to set the filename according to http header, so I get the package here ... Ugly ...
+
+ /usr/bin/wget -N --content-disposition http://piwigo.org/download/dlcounter.php?code=latest
+}
+
+pkgver() {
+ ls piwigo-*.zip |sed -e s/piwigo-// |sed -e s/.zip//
+}
+
+build() {
+ rm -rf piwigo
+ /usr/bin/unzip piwigo-$pkgver.zip
+}
+
+package() {
+ ### install piwigo
+ mkdir -p "${pkgdir}/usr/share/webapps"
+ cp -a piwigo "${pkgdir}/usr/share/webapps/."
+
+ ### default perm
+ install -D -m755 "${srcdir}/piwigo.perm.sh" "${pkgdir}/usr/bin/set-piwigo-perm"
+
+ ### apache conf (optionnal)
+ mkdir -p "${pkgdir}/etc/webapps/piwigo"
+ install -m644 "${srcdir}/apache.conf" "${pkgdir}/etc/webapps/piwigo/apache.conf"
+ if [ -d ${pkgdir}/etc/httpd/conf/extra/ ]
+ then
+ ln -s "${pkgdir}/etc/webapps/piwigo/apache.conf" "${pkgdir}/etc/httpd/conf/extra/piwigo.conf"
+ fi
+}
diff --git a/apache.conf b/apache.conf
new file mode 100644
index 000000000000..23217bf0b390
--- /dev/null
+++ b/apache.conf
@@ -0,0 +1,10 @@
+IfModule mod_alias.c>
+ Alias /piwigo /usr/share/webapps/piwigo/
+</IfModule>
+
+<Directory /usr/share/webapps/piwigo/>
+ Options FollowSymlinks
+ AllowOverride all
+ Require all granted
+ php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/piwigo/:/etc/webapps/piwigo:/dev/urandom"
+</Directory>
diff --git a/piwigo.install b/piwigo.install
new file mode 100644
index 000000000000..a74e87a09a84
--- /dev/null
+++ b/piwigo.install
@@ -0,0 +1,7 @@
+post_install () {
+ set-piwigo-perm
+}
+
+post_upgrade() {
+ set-piwigo-perm
+}
diff --git a/piwigo.perm.sh b/piwigo.perm.sh
new file mode 100644
index 000000000000..ebf11ca91444
--- /dev/null
+++ b/piwigo.perm.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+piwigo_path='/usr/share/webapps/piwigo'
+htuser='http'
+htgroup='http'
+
+find ${piwigo_path}/ -type f -print0 | xargs -0 chmod 0640
+find ${piwigo_path}/ -type d -print0 | xargs -0 chmod 0750
+chown -R ${htuser}:${htgroup} ${piwigo_path}/