mirror of
https://codeberg.org/gwh/slackbuilds.git
synced 2024-11-16 19:51:19 +01:00
add Dancer
This commit is contained in:
parent
a3d87cdc8d
commit
b46e13cbe1
1 changed files with 87 additions and 0 deletions
87
d/Dancer/Dancer.SlackBuild
Executable file
87
d/Dancer/Dancer.SlackBuild
Executable file
|
@ -0,0 +1,87 @@
|
|||
#!/bin/sh -x
|
||||
|
||||
# variables
|
||||
PACKAGER=cyco
|
||||
TMP=/tmp/$PACKAGER
|
||||
CWD=$(pwd)
|
||||
OUTPUT=/tmp/
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
PKG=$TMP/pkg-$PRGNAM
|
||||
|
||||
VERSION=git$(date +%Y.%m.%d_%H.%M)
|
||||
|
||||
DOCS="AUTHORS MANIFEST examples/ CHANGES MANIFEST.SKIP README LICENSE TODO"
|
||||
ARCH=$(uname -m)
|
||||
BUILD=1
|
||||
|
||||
PREFIX=/usr
|
||||
|
||||
REPOSITORIES=/home/cycojesus/projets/packages/repositories
|
||||
# nettoyage préalable
|
||||
rm -fr $PKG $TMP/$PRGNAM-$VERSION
|
||||
|
||||
mkdir -p $PKG
|
||||
|
||||
# mise en place
|
||||
cd $TMP
|
||||
if [ ! -e $REPOSITORIES/$PRGNAM ] ; then
|
||||
mkdir -p $REPOSITORIES
|
||||
( cd $REPOSITORIES
|
||||
git clone git://github.com/sukria/Dancer.git $PRGNAM
|
||||
)
|
||||
else
|
||||
( cd $REPOSITORIES/$PRGNAM
|
||||
git pull
|
||||
)
|
||||
fi
|
||||
cp -R $REPOSITORIES/$PRGNAM $TMP/$PRGNAM-$VERSION
|
||||
cd $TMP/$PRGNAM-$VERSION
|
||||
|
||||
# configuration
|
||||
perl Makefile.PL
|
||||
|
||||
# compilation
|
||||
make -j3 PREFIX=$PREFIX
|
||||
|
||||
# installation
|
||||
make install DESTDIR=$PKG
|
||||
mv $PKG$PREFIX/share/man $PKG$PREFIX/
|
||||
rm -fr $PKG$PREFIX/share/
|
||||
|
||||
# correction
|
||||
cd $PKG
|
||||
chown -R root:root *
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM
|
||||
cd $TMP/$PRGNAM-$VERSION
|
||||
cp -R $DOCS $PKG/usr/doc/$PRGNAM
|
||||
|
||||
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
|
||||
|
||||
# Strip binaries
|
||||
( cd $PKG
|
||||
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
)
|
||||
|
||||
|
||||
# embaumement
|
||||
mkdir -p $PKG/install
|
||||
cat <<EOF > $PKG/install/slack-desc
|
||||
$PRGNAM: $PRGNAM (Perl Web 'sinatra-like' Web framework)
|
||||
$PRGNAM:
|
||||
$PRGNAM: The easiest way to write web applications in Perl.
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM: see /usr/doc/$PRGNAM-$VERSION for more details
|
||||
$PRGNAM:
|
||||
$PRGNAM: http://perldancer.org/
|
||||
EOF
|
||||
|
||||
# empaquetage
|
||||
cd $PKG
|
||||
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$PACKAGER.txz
|
Loading…
Reference in a new issue