2012-04-13 14:04:35 +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
|
|
|
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
|
2012-04-13 14:04:35 +02:00
|
|
|
|
2020-06-25 11:23:11 +02:00
|
|
|
TAG=gwh
|
2012-04-13 14:04:35 +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/Book ] && git clone https://github.com/progit/progit.git $REPOSITORY/Book
|
|
|
|
( cd $REPOSITORY/Book && git pull )
|
|
|
|
VERSION="$( cd $REPOSITORY/Book && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )"
|
|
|
|
|
|
|
|
[ ! -e $REPOSITORY/Examples ] && git clone https://github.com/progit/book-examples.git $REPOSITORY/Examples
|
|
|
|
( cd $REPOSITORY/Examples && git pull )
|
|
|
|
|
|
|
|
|
2012-04-13 14:04:35 +02:00
|
|
|
[ ! -e $CWD/progit.en.pdf ] && wget -c http://progit.org/ebook/progit.pdf -O $CWD/progit.en.pdf
|
|
|
|
[ ! -e $CWD/progit.en.mobi ] && wget -c https://github.s3.amazonaws.com/media/pro-git.en.mobi -O $CWD/progit.en.mobi
|
|
|
|
[ ! -e $CWD/progit.en.epub ] && wget -c https://github.s3.amazonaws.com/media/progit.epub -O $CWD/progit.en.epub
|
|
|
|
|
|
|
|
mkdir -p $PKG$PREFIX/doc/
|
2016-09-18 22:48:56 +02:00
|
|
|
cp -R $REPOSITORY $PKG$PREFIX/doc/$PRGNAM
|
2012-04-13 14:04:35 +02:00
|
|
|
find $PKG$PREFIX/doc/$PRGNAM -name \.git\* -exec rm -fr {} \;
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
mkdir -p install
|
|
|
|
cat <<EOF > install/slack-desc
|
|
|
|
$PRGNAM: $PRGNAM (eBook, Pro Git: professional version control)
|
2016-09-18 22:48:56 +02:00
|
|
|
$PRGNAM:
|
2012-04-13 14:04:35 +02:00
|
|
|
$PRGNAM: Pro Git book, written by Scott Chacon and published by Apress.
|
2016-09-18 22:48:56 +02:00
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
2012-04-13 14:04:35 +02:00
|
|
|
$PRGNAM: http://progit.org/
|
2016-09-18 22:48:56 +02:00
|
|
|
$PRGNAM:
|
2012-04-13 14:04:35 +02:00
|
|
|
EOF
|
|
|
|
|
|
|
|
chown -R root:root *
|
|
|
|
|
2018-04-20 23:02:35 +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
|