71 lines
1.7 KiB
Bash
Executable file
71 lines
1.7 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
CWD=$(pwd)
|
|
|
|
PRGNAM=$(basename $CWD)
|
|
VERSION=trunk$(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
|
|
( cd $REPOSITORIES
|
|
if [ -e $REPOSITORIES/$PRGNAM ] ; then
|
|
( cd $REPOSITORIES/$PRGNAM
|
|
svn up
|
|
)
|
|
else
|
|
svn co https://fatfree.svn.sourceforge.net/svnroot/fatfree $REPOSITORIES/$PRGNAM
|
|
fi
|
|
)
|
|
|
|
mkdir -p $PKG/srv/www/htdocs $PKG$PREFIX/doc/
|
|
cp -R $REPOSITORIES/$PRGNAM $PKG/srv/www/htdocs/
|
|
find $PKG/srv/www/htdocs -name \.svn\* -exec rm -fr {} \;
|
|
|
|
if [ ! -e $CWD/fatfree.sourceforge.net ]; then
|
|
( cd $CWD
|
|
wget -cpk http://fatfree.sourceforge.net/
|
|
)
|
|
fi
|
|
cp -R $CWD/fatfree.sourceforge.net $PKG$PREFIX/doc/$PRGNAM
|
|
|
|
mkdir -p $PKG$PREFIX/doc/$PRGNAM/demos $CWD/demos/
|
|
for i in fatfree-url.zip fatfree-oop.zip fatfree-ini.zip fatfree-i18n.zip fatfree-blog.zip; do
|
|
wget -c http://sourceforge.net/projects/fatfree/files/$i/download -O $CWD/demos/$i
|
|
cp $CWD/demos/$i $PKG$PREFIX/doc/$PRGNAM/demos
|
|
done
|
|
|
|
( cd $PKG
|
|
mkdir -p install
|
|
cat <<EOF > install/slack-desc
|
|
$PRGNAM: $PRGNAM (PHP Web framwork)
|
|
$PRGNAM:
|
|
$PRGNAM: FAT-FREE is a powerful and lightweight PHP 5.3+ Web application framework
|
|
$PRGNAM: designed to help you build dynamic and robust Web sites - fast! Unlike
|
|
$PRGNAM: other PHP frameworks, Fat-Free aims to be usable - not usual.
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM: http://fatfree.sourceforge.net/
|
|
$PRGNAM:
|
|
EOF
|
|
|
|
chown -R root:root *
|
|
|
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
|
)
|