#!/bin/sh CWD=$(pwd) PRGNAM=$(basename $CWD) VERSION=$(date +%Y.%m.%d_%H.%M) BUILD=1 ARCH=$(uname -m) REPOSITORIES=/home/installs/SlackBuilds/repositories TAG=cyco TMP=/tmp/$TAG PKG=$TMP/pkg-$PRGNAM OUTPUT=/tmp PREFIX=/usr # cleaning rm -fr $PKG # get sources [ ! -e $REPOSITORIES ] && mkdir -p $REPOSITORIES if [ -e $REPOSITORIES/$PRGNAM ] ; then ( cd $REPOSITORIES/$PRGNAM svn update ) else svn checkout "http://yii.googlecode.com/svn/trunk/" $REPOSITORIES/$PRGNAM fi cd $REPOSITORIES/$PRGNAM VERSION=r$(LANG=C svn info|grep Revision | sed 's|Revision: \([0-9]*\)|\1|') mkdir -p $PKG/srv/www/htdocs cp -R $REPOSITORIES/$PRGNAM $PKG/srv/www/htdocs/ find $PKG/srv/www/htdocs -name \.svn\* -exec rm -fr {} \; mkdir -p $PKG/usr/bin cat < $PKG/usr/bin/yiic #!/bin/sh cd /srv/www/htdocs/$PRGNAM/framework/ exec yiic EOF chmod +x $PKG/usr/bin/yiic cd $PKG mkdir -p install cat < install/slack-desc $PRGNAM: $PRGNAM (The Fast, Secure and Professional PHP Framework) $PRGNAM: $PRGNAM: Yii is a high-performance PHP framework best for developing Web 2.0 applications. $PRGNAM: $PRGNAM: Yii comes with rich features: MVC, DAO/ActiveRecord, I18N/L10N, caching, $PRGNAM: authentication and role-based access control, scaffolding, testing, etc. It can $PRGNAM: reduce your development time significantly. $PRGNAM: $PRGNAM: $PRGNAM: http://www.yiiframework.com/ $PRGNAM: EOF chown -R root:root * makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz