slackbuilds/UNUSED/doc/ruby-best-practices/SlackBuild

52 lines
976 B
Text
Raw Normal View History

2010-03-18 04:51:09 +01:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=git$(date +"%Y.%m.%d_%H.%M")
BUILD=1
2010-03-18 04:51:09 +01:00
ARCH=$(uname -m)
2016-09-18 22:48:56 +02:00
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
2010-03-18 04:51:09 +01:00
2020-06-25 11:23:11 +02:00
TAG=gwh
TMP=/tmp/$TAG
2010-03-18 04:51:09 +01:00
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
# get sources
2016-09-18 22:55:37 +02:00
[ ! -e $REPOSITORY ] && git clone http://github.com/sandal/rbp-book.git $REPOSITORY
2016-09-18 22:48:56 +02:00
( cd $REPOSITORY && git pull )
VERSION="$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )"
2010-03-18 04:51:09 +01:00
mkdir -p $PKG$PREFIX/doc/
2016-09-18 22:48:56 +02:00
cp -R $REPOSITORY $PKG$PREFIX/doc/$PRGNAM
2010-03-18 04:51:09 +01: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
2010-03-18 04:51:09 +01:00
$PRGNAM: $PRGNAM (Ruby Best Practices book)
2016-09-18 22:48:56 +02:00
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
2010-03-18 04:51:09 +01:00
$PRGNAM: http://rubybestpractices.com/
2016-09-18 22:48:56 +02:00
$PRGNAM:
2010-03-18 04:51:09 +01:00
EOF
2016-09-18 22:48:56 +02:00
chown -R root:root *
2010-03-18 04:51:09 +01: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