slackbuilds/web/modernizr/modernizr.SlackBuild
Gwenhael Le Moine 2d3c96f8e7 replace TMP by OUTPUT
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2011-02-17 11:54:04 +07:00

52 lines
1.3 KiB
Bash
Executable file

#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=latest
BUILD=1
ARCH=$(uname -m)
TAG=cyco
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
find $CWD -name "$PRGNAM-*.js" -exec mv {} {}.bkp \;
wget -c http://www.modernizr.com/downloadfulljs/ -O $CWD/$PRGNAM-VERSIONPLACEHOLDER.js
wget -c http://www.modernizr.com/downloadjs/ -O $CWD/$PRGNAM-VERSIONPLACEHOLDER.min.js
VERSION=$(grep "var version" $CWD/$PRGNAM-VERSIONPLACEHOLDER.js | grep -o "[0-9.]*")
mv $CWD/$PRGNAM-VERSIONPLACEHOLDER.min.js $CWD/$PRGNAM-$VERSION.min.js
mv $CWD/$PRGNAM-VERSIONPLACEHOLDER.js $CWD/$PRGNAM-$VERSION.js
mkdir -p $PKG/srv/www/htdocs/$PRGNAM
cp $CWD/$PRGNAM-*.js $PKG/srv/www/htdocs/$PRGNAM
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (HTML5/CSS3 javascript library)
$PRGNAM:
$PRGNAM: Modernizr is a small and simple JavaScript library that helps you take
$PRGNAM: advantage of emerging web technologies (CSS3, HTML 5) while still
$PRGNAM: maintaining a fine level of control over older browsers that may not yet
$PRGNAM: support these new technologies.
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://modernizr.com
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
)