slackbuilds/doc/learnxinyminutes-docs/SlackBuild

52 lines
1.2 KiB
Text
Raw Normal View History

2013-07-29 10:13:01 +02:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
ARCH=noarch
2016-09-18 22:48:56 +02:00
REPOSITORIES=/home/installs/SlackBuilds/repositories/$PRGNAM
2013-07-29 10:13:01 +02:00
2020-06-25 11:23:11 +02:00
TAG=gwh
2013-07-29 10:13:01 +02:00
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
# get sources
2016-09-18 22:48:56 +02:00
[ ! -e $REPOSITORY ] && git clone https://github.com/adambard/learnxinyminutes-docs $REPOSITORY
( cd $REPOSITORY && git pull )
VERSION="$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )"
2013-07-29 10:13:01 +02:00
mkdir -p $PKG$PREFIX/doc/
2016-09-18 22:48:56 +02:00
cp -R $REPOSITORY $PKG$PREFIX/doc/$PRGNAM
2013-07-29 10:13:01 +02:00
find $PKG$PREFIX/doc/$PRGNAM -name \.git\* -exec rm -fr {} \;
2016-09-18 22:48:56 +02:00
cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
2013-07-29 10:13:01 +02:00
$PRGNAM: $PRGNAM (A book on functional programming in CoffeeScript)
2016-09-18 22:48:56 +02:00
$PRGNAM:
2013-07-29 10:13:01 +02:00
$PRGNAM: Whirlwind tours of (several, hopefully many someday) popular and
$PRGNAM: ought-to-be-more-popular programming languages, presented as valid,
$PRGNAM: commented code and explained as they go.
2016-09-18 22:48:56 +02:00
$PRGNAM:
$PRGNAM:
$PRGNAM:
2013-07-29 10:13:01 +02:00
$PRGNAM: http://learnxinyminutes.com
$PRGNAM: https://github.com/adambard/learnxinyminutes-docs
2016-09-18 22:48:56 +02:00
$PRGNAM:
2013-07-29 10:13:01 +02:00
EOF
2016-09-18 22:48:56 +02:00
chown -R root:root *
2013-07-29 10:13:01 +02:00
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
2020-07-12 09:22:26 +02:00
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz