68 lines
1.2 KiB
Text
68 lines
1.2 KiB
Text
|
#!/bin/sh
|
|||
|
|
|||
|
# variables
|
|||
|
TAG=cyco
|
|||
|
TMP=/tmp/$TAG
|
|||
|
CWD=$(pwd)
|
|||
|
OUTPUT=/tmp
|
|||
|
|
|||
|
PRGNAM=$(basename $CWD)
|
|||
|
PKG=$TMP/pkg-$PRGNAM
|
|||
|
|
|||
|
VERSION=$(date +%Y.%m.%d_%H.%M)
|
|||
|
|
|||
|
ARCH=$(uname -m)
|
|||
|
BUILD=1
|
|||
|
|
|||
|
PREFIX=/usr
|
|||
|
|
|||
|
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
|
|||
|
|
|||
|
# nettoyage pr<70>alable
|
|||
|
rm -fr $PKG $TMP/$PRGNAM
|
|||
|
|
|||
|
mkdir -p $PKG
|
|||
|
|
|||
|
# mise en place
|
|||
|
GIT_URL="https://github.com/syncthing/syncthing-gtk.git"
|
|||
|
[ ! -e $REPOSITORY ] && git clone "$GIT_URL" $REPOSITORY
|
|||
|
( cd $REPOSITORY && git pull )
|
|||
|
VERSION="$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )"
|
|||
|
|
|||
|
cp -R $REPOSITORY $TMP/$PRGNAM
|
|||
|
cd $TMP/$PRGNAM/
|
|||
|
|
|||
|
python ./setup.py build
|
|||
|
|
|||
|
# installation
|
|||
|
python ./setup.py install --root=$PKG
|
|||
|
|
|||
|
mkdir -p $PKG/usr/doc/$PRGNAM
|
|||
|
cp -R LICENSE README.md $PKG/usr/doc/$PRGNAM
|
|||
|
|
|||
|
mv $PKG$PREFIX/share/man $PKG$PREFIX/
|
|||
|
|
|||
|
# correction
|
|||
|
cd $PKG
|
|||
|
chown -R root:root *
|
|||
|
|
|||
|
# embaumement
|
|||
|
mkdir -p $PKG/install
|
|||
|
cat <<EOF > $PKG/install/slack-desc
|
|||
|
$PRGNAM: $PRGNAM ( GTK3 & python based GUI for Syncthing)
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM: https://github.com/syncthing/syncthing-gtk
|
|||
|
EOF
|
|||
|
|
|||
|
# empaquetage
|
|||
|
cd $PKG
|
|||
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz
|