51 lines
1.3 KiB
Bash
Executable file
51 lines
1.3 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
CWD=$(pwd)
|
|
|
|
PRGNAM=$(basename $CWD)
|
|
VERSION=latest
|
|
BUILD=1
|
|
PACKAGER=cyco
|
|
ARCH=$(uname -m)
|
|
|
|
TMP=/tmp/$PACKAGER
|
|
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$PACKAGER.txz
|
|
)
|