From 63a53e9d694b3fee4b03f8224c0985e98575d0cc Mon Sep 17 00:00:00 2001 From: Nishant Limbachia Date: Sat, 13 Jul 2013 01:18:19 -0500 Subject: graphics/gallery: Updated for version 3.0.9. (renamed from gallery3) Signed-off-by: Robby Workman --- graphics/gallery/README | 18 +++++++ graphics/gallery/README-ONLINE | 3 ++ graphics/gallery/doinst.sh | 23 +++++++++ graphics/gallery/gallery.SlackBuild | 94 +++++++++++++++++++++++++++++++++++++ graphics/gallery/gallery.info | 10 ++++ graphics/gallery/slack-desc | 19 ++++++++ 6 files changed, 167 insertions(+) create mode 100644 graphics/gallery/README create mode 100644 graphics/gallery/README-ONLINE create mode 100644 graphics/gallery/doinst.sh create mode 100644 graphics/gallery/gallery.SlackBuild create mode 100644 graphics/gallery/gallery.info create mode 100644 graphics/gallery/slack-desc (limited to 'graphics/gallery') diff --git a/graphics/gallery/README b/graphics/gallery/README new file mode 100644 index 0000000000..329773f7e7 --- /dev/null +++ b/graphics/gallery/README @@ -0,0 +1,18 @@ +gallery is a web-based photo album organizer. Lets you publish +and print your photos as well as lets other users access your +pictures and comment on them. This is great solution for anyone +wanting to host their own picture gallery. + +Requires web server, PHP, and database (MySQL). + +Refer to README-ONLINE in DOCS for new install, upgrade and/or +migration instructions. + +Script options: +DOCROOT - should be set to whatever folder you want to install + gallery. The default is /var/www/htdocs +BASEDIR - name of the directory under DOCROOT. This will actually + be part of our gallery url: www.example.com/BASEDIR. + Default is gallery. +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/gallery/README-ONLINE b/graphics/gallery/README-ONLINE new file mode 100644 index 0000000000..7226720b27 --- /dev/null +++ b/graphics/gallery/README-ONLINE @@ -0,0 +1,3 @@ +gallery online user guide: + +http://codex.galleryproject.org/Gallery3:User_guide diff --git a/graphics/gallery/doinst.sh b/graphics/gallery/doinst.sh new file mode 100644 index 0000000000..4e5be9147f --- /dev/null +++ b/graphics/gallery/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/gallery/gallery.SlackBuild b/graphics/gallery/gallery.SlackBuild new file mode 100644 index 0000000000..76e618f0a1 --- /dev/null +++ b/graphics/gallery/gallery.SlackBuild @@ -0,0 +1,94 @@ +#!/bin/sh + +# Slackware Package Build Script for gallery3 +# 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="gallery" +VERSION=${VERSION:-3.0.9} +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 + +### set the document root +DOCROOT=${DOCROOT:-/var/www/htdocs} + +# define BASEDIR, default is gallery. +# this actually controls your url, default will create following url +# www.example.com/gallery/ +BASEDIR=${BASEDIR:-gallery} + +### 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/$PRGNAM-$VERSION.zip +mv gallery3 $PRGNAM +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/$BASEDIR + +# move important files to .new +mv $PKG/$DOCROOT/$BASEDIR/.htaccess $PKG/$DOCROOT/$BASEDIR/.htaccess.new +mv $PKG/$DOCROOT/$BASEDIR/index.php $PKG/$DOCROOT/$BASEDIR/index.php.new +mv $PKG/$DOCROOT/$BASEDIR/php.ini $PKG/$DOCROOT/$BASEDIR/php.ini.new +mv $PKG/$DOCROOT/$BASEDIR/robots.txt $PKG/$DOCROOT/$BASEDIR/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/$BASEDIR +chmod 0750 $PKG/$DOCROOT/$BASEDIR + +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/gallery/gallery.info b/graphics/gallery/gallery.info new file mode 100644 index 0000000000..f76eec6667 --- /dev/null +++ b/graphics/gallery/gallery.info @@ -0,0 +1,10 @@ +PRGNAM="gallery" +VERSION="3.0.9" +HOMEPAGE="http://galleryproject.org/" +DOWNLOAD="http://downloads.sourceforge.net/gallery/gallery-3.0.9.zip" +MD5SUM="f2438d40caaa7ab77a6bf2cd90f20484" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Nishant Limbachia" +EMAIL="nishant@mnspace.net" diff --git a/graphics/gallery/slack-desc b/graphics/gallery/slack-desc new file mode 100644 index 0000000000..33c99fcf9f --- /dev/null +++ b/graphics/gallery/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +gallery: gallery (web-based photo album organizer) +gallery: +gallery: gallery is a web-based photo album organizer. Gallery gives you +gallery: an intuitive way to blend photo management seamlessly into your +gallery: own website. +gallery: +gallery: Home Page: http://galleryproject.org +gallery: +gallery: +gallery: +gallery: -- cgit v1.2.3