summaryrefslogtreecommitdiff
path: root/graphics/gallery3
diff options
context:
space:
mode:
authorNishant Limbachia <nishant@mnspace.net>2013-03-03 13:04:30 -0600
committerRobby Workman <rworkman@slackbuilds.org>2013-03-03 13:04:30 -0600
commit2e81c14f45f4ac25b97cac2df599e7dbfa715ea8 (patch)
treef9b63f95eb222f70bbe9a534d46eac605b5973eb /graphics/gallery3
parent98c36712f2572600997edf1d3c27c28d85218c9e (diff)
downloadslackbuilds-2e81c14f45f4ac25b97cac2df599e7dbfa715ea8.tar.gz
graphics/gallery3: Added (web-based photo album organizer)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'graphics/gallery3')
-rw-r--r--graphics/gallery3/README18
-rw-r--r--graphics/gallery3/README-ONLINE3
-rw-r--r--graphics/gallery3/doinst.sh23
-rw-r--r--graphics/gallery3/gallery3.SlackBuild93
-rw-r--r--graphics/gallery3/gallery3.info10
-rw-r--r--graphics/gallery3/slack-desc19
6 files changed, 166 insertions, 0 deletions
diff --git a/graphics/gallery3/README b/graphics/gallery3/README
new file mode 100644
index 0000000000..e2aaf40b35
--- /dev/null
+++ b/graphics/gallery3/README
@@ -0,0 +1,18 @@
+gallery3 is a web-based photo album organizer. Lets you publish
+and print your photos as well as lets other users access your
+pictures.
+
+This requires a web server (e.g. httpd), PHP, and database (e.g. MySQL).
+
+Refer to README-ONLINE in DOCS for new install, upgrade, and/or
+migration instructions.
+
+Script options:
+DOCROOT - should be set to the directory in which you want to install
+gallery3 (default is /var/www/htdocs/).
+
+BASEDIR - name of the directory under DOCROOT. This will actually
+be part of our gallery3 url: www.example.com/BASEDIR/
+
+WEBUSER - default is root, but you can have any other user.
+WEBGROUP - default is apache, but you can have any other group.
diff --git a/graphics/gallery3/README-ONLINE b/graphics/gallery3/README-ONLINE
new file mode 100644
index 0000000000..fbd85cd90a
--- /dev/null
+++ b/graphics/gallery3/README-ONLINE
@@ -0,0 +1,3 @@
+gallery3 online user guide:
+
+http://codex.galleryproject.org/Gallery3:User_guide \ No newline at end of file
diff --git a/graphics/gallery3/doinst.sh b/graphics/gallery3/doinst.sh
new file mode 100644
index 0000000000..4e5be9147f
--- /dev/null
+++ b/graphics/gallery3/doinst.sh
@@ -0,0 +1,23 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config @GALLERY_INSTALL@/.htaccess.new
+config @GALLERY_INSTALL@/index.php.new
+config @GALLERY_INSTALL@/php.ini.new
+config @GALLERY_INSTALL@/robots.txt.new
+
+if [ ! -d @GALLERY_INSTALL@/var ]; then
+ mkdir @GALLERY_INSTALL@/var
+ chown -R @WEBUSER@:@WEBGROUP@ @GALLERY_INSTALL@/var
+ chmod 0777 @GALLERY_INSTALL@/var
+fi
diff --git a/graphics/gallery3/gallery3.SlackBuild b/graphics/gallery3/gallery3.SlackBuild
new file mode 100644
index 0000000000..a5e2d8c23d
--- /dev/null
+++ b/graphics/gallery3/gallery3.SlackBuild
@@ -0,0 +1,93 @@
+#!/bin/sh
+
+# Slackware Package Build Script for gallery
+# Home Page http://galleryproject.org
+
+# Copyright (c) 2009-2013, Nishant Limbachia, Hoffman Estates, IL, USA
+# (nishant _AT_ mnspace _DOT_ net)
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of script must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM="gallery3"
+VERSION=${VERSION:-3.0.5}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+ARCH=noarch # hardcode ARCH
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e # Exit on most errors
+
+### set the document root
+DOCROOT=${DOCROOT:-/var/www/htdocs}
+
+# define BASEDIR, default is gallery3.
+# this actually controls your url, default will create following url
+# www.example.com/gallery3/
+BASEDIR=${BASEDIR:-gallery3}
+
+### define web user and group
+WEBUSER=${WEBUSER:-root}
+WEBGROUP=${WEBGROUP:-apache}
+
+rm -fr $TMP/$PRGNAM $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+unzip $CWD/gallery-$VERSION.zip
+chown -R root:root $PRGNAM
+find $PRGNAM \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 -o -perm 755 \) \
+ -exec chmod 750 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 -o -perm 644 \) \
+ -exec chmod 640 {} \;
+
+mkdir -p $PKG/$DOCROOT
+cp -a $PRGNAM $PKG/$DOCROOT/$PRGNAM
+
+# move important files to .new
+mv $PKG/$DOCROOT/$PRGNAM/.htaccess $PKG/$DOCROOT/$PRGNAM/.htaccess.new
+mv $PKG/$DOCROOT/$PRGNAM/index.php $PKG/$DOCROOT/$PRGNAM/index.php.new
+mv $PKG/$DOCROOT/$PRGNAM/php.ini $PKG/$DOCROOT/$PRGNAM/php.ini.new
+mv $PKG/$DOCROOT/$PRGNAM/robots.txt $PKG/$DOCROOT/$PRGNAM/robots.txt.new
+
+# install docs
+install -m 0644 -D $TMP/$PRGNAM/README $PKG/usr/doc/$PRGNAM-$VERSION/README
+install -m 0644 -D $TMP/$PRGNAM/LICENSE $PKG/usr/doc/$PRGNAM-$VERSION/LICENSE
+install -m 0644 -D $CWD/README-ONLINE $PKG/usr/doc/$PRGNAM-$VERSION/README-ONLINE
+
+# Change ownership and perms
+chown -R $WEBUSER:$WEBGROUP $PKG/$DOCROOT/$PRGNAM
+chmod 0750 $PKG/$DOCROOT/$PRGNAM
+
+GALLERY_INSTALL="$DOCROOT/$BASEDIR"
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+sed -i "s|@GALLERY_INSTALL@|$(echo ${GALLERY_INSTALL} | sed s:/::)|g" $PKG/install/doinst.sh
+sed -i "s|@WEBUSER@|${WEBUSER}|" $PKG/install/doinst.sh
+sed -i "s|@WEBGROUP@|${WEBGROUP}|" $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/graphics/gallery3/gallery3.info b/graphics/gallery3/gallery3.info
new file mode 100644
index 0000000000..2a8f78ea7d
--- /dev/null
+++ b/graphics/gallery3/gallery3.info
@@ -0,0 +1,10 @@
+PRGNAM="gallery3"
+VERSION="3.0.5"
+HOMEPAGE="http://gallery.menalto.com/"
+DOWNLOAD="http://downloads.sourceforge.net/gallery/gallery-3.0.5.zip"
+MD5SUM="eac77314c9e437d7ef28e674edb1c018"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Nishant Limbachia"
+EMAIL="nishant@mnspace.net"
diff --git a/graphics/gallery3/slack-desc b/graphics/gallery3/slack-desc
new file mode 100644
index 0000000000..8e1880210d
--- /dev/null
+++ b/graphics/gallery3/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-----------------------------------------------------|
+gallery3: gallery3 (web-based photo album organizer)
+gallery3:
+gallery3: gallery3 is a web-based photo album organizer. Gallery gives you
+gallery3: an intuitive way to blend photo management seamlessly into your
+gallery3: own website.
+gallery3:
+gallery3: Home Page: http://galleryproject.org
+gallery3:
+gallery3:
+gallery3:
+gallery3: