#!/bin/sh CWD=$(pwd) PRGNAM=$(basename $CWD) VERSION=${VERSION:-3.6} ARCH="noarch" # hardcode ARCH BUILD=${BUILD:-1} TAG=${TAG:-cyco} DOCROOT=${DOCROOT:-/var/www/htdocs} PHPUSER=${PHPUSER:-apache} PHPGROUP=${PHPGROUP:-apache} TMP=${TMP:-/tmp/$TAG} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} ENABLE_PLUGINS=${ENABLE_PLUGINS:-false} set -eu rm -rf $PKG mkdir -p $TMP $OUTPUT $PKG/$DOCROOT cd $PKG/$DOCROOT/ rm -rf $PRGNAM-$VERSION [ ! -e $CWD/$PRGNAM-$VERSION.tar.gz ] && wget -c http://dl.bintray.com/novik65/generic/$PRGNAM-$VERSION.tar.gz -O $CWD/$PRGNAM-$VERSION.tar.gz tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM if [ "$ENABLE_PLUGINS" = "true" ]; then [ ! -e $CWD/plugins-$VERSION.tar.gz ] && wget -c http://dl.bintray.com/novik65/generic/plugins-$VERSION.tar.gz -O $CWD/plugins-$VERSION.tar.gz tar xvf $CWD/plugins-$VERSION.tar.gz fi chown -R root:root . find . \ \( -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 {} \; # Change ownership and perms and create a link. chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/$PRGNAM chmod 0750 $PKG/$DOCROOT/$PRGNAM mkdir -p $PKG/install cat < $PKG/install/slack-desc $PRGNAM: $PRGNAM (Yet another web front-end for rTorrent) $PRGNAM: $PRGNAM: ruTorrent is a front-end for the popular Bittorrent client rTorrent. $PRGNAM: Main features: $PRGNAM: . Lightweight server side, so it can be installed on old and low-end servers $PRGNAM: and even on some SOHO routers $PRGNAM: . Extensible - there are several plugins and everybody can create his own one $PRGNAM: . Nice look ;) $PRGNAM: $PRGNAM: https://code.google.com/p/rutorrent/ $PRGNAM: EOF cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}