2017-03-01 11:56:49 +01:00
|
|
|
#!/bin/sh
|
2014-03-16 07:20:55 +01:00
|
|
|
|
|
|
|
# variables
|
|
|
|
CWD=$(pwd)
|
|
|
|
|
|
|
|
PRGNAM=$(basename $CWD)
|
2018-06-28 16:00:05 +02:00
|
|
|
ARCH="AppImage"
|
2014-03-16 07:20:55 +01:00
|
|
|
BUILD=1
|
|
|
|
|
|
|
|
TAG=cyco
|
|
|
|
TMP=/tmp/$TAG
|
|
|
|
PKG=$TMP/pkg-$PRGNAM
|
|
|
|
OUTPUT=/tmp
|
|
|
|
|
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
# nettoyage préalable
|
|
|
|
rm -fr $PKG $TMP/$PRGNAM
|
|
|
|
|
2018-06-28 16:00:05 +02:00
|
|
|
mkdir -p $PKG/opt/$PRGNAM
|
2014-03-16 07:20:55 +01:00
|
|
|
|
|
|
|
# mise en place
|
2018-06-28 16:00:05 +02:00
|
|
|
cd $PKG/opt/$PRGNAM
|
2014-03-16 07:20:55 +01:00
|
|
|
|
2018-06-28 16:00:05 +02:00
|
|
|
wget -c https://download.nextcloud.com/desktop/daily/Linux/latest.AppImage -O ${PRGNAM}.AppImage
|
|
|
|
chmod +x ${PRGNAM}.AppImage
|
|
|
|
VERSION=$( ./${PRGNAM}.AppImage --help | grep version | sed 's/Nextcloud version //' | sed 's/ (build /_/' | tr -d \))
|
2014-03-16 07:20:55 +01:00
|
|
|
|
2018-06-28 16:00:05 +02:00
|
|
|
mkdir -p $PKG$PREFIX/bin/
|
|
|
|
( cd $PKG$PREFIX/bin/
|
|
|
|
# ln -s ../../opt/$PRGNAM/${PRGNAM}.AppImage $PRGNAM
|
|
|
|
ln -s ../../opt/$PRGNAM/${PRGNAM}.AppImage nextcloud
|
|
|
|
)
|
2014-03-16 07:20:55 +01:00
|
|
|
|
|
|
|
# correction
|
|
|
|
cd $PKG
|
|
|
|
chown -R root:root *
|
|
|
|
|
|
|
|
# embaumement
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat <<EOF > $PKG/install/slack-desc
|
2016-08-25 19:12:27 +02:00
|
|
|
$PRGNAM: $PRGNAM (NextCloud Desktop Syncing Client)
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM: nextcloud themed desktop client
|
2014-03-16 07:20:55 +01:00
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
2016-08-25 19:12:27 +02:00
|
|
|
$PRGNAM: https://github.com/nextcloud/client_theming
|
2014-03-16 07:20:55 +01:00
|
|
|
$PRGNAM:
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# empaquetage
|
|
|
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz
|