From 3248f94688ae734049d93255f9bf59146c2aa8b0 Mon Sep 17 00:00:00 2001 From: Denis Cardon Date: Wed, 29 Mar 2017 19:51:37 +0200 Subject: [PATCH] first deb packaging really usable --- deb/control | 2 +- deb/createdeb.sh | 30 +++++++++++++----------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/deb/control b/deb/control index 1bd0be9..84041e2 100644 --- a/deb/control +++ b/deb/control @@ -3,7 +3,7 @@ Version: VERSION Section: base Priority: optional Architecture: all -Depends: unzip ssh rsync python-paramiko python-pyvmomi python-pexpect +Depends: unzip, ssh, rsync, python-paramiko, python-pyvmomi, python-pexpect, python-flask,python-simplejson Maintainer: Tranquil-IT-Systems Description: TISBackup backup management Homepage: http://www.tranquil-it-systems.fr diff --git a/deb/createdeb.sh b/deb/createdeb.sh index 70d9883..03ed786 100755 --- a/deb/createdeb.sh +++ b/deb/createdeb.sh @@ -1,34 +1,30 @@ #!/usr/bin/env bash -#svn --username svnuser up -#VERSION=$(svn info |awk '/Revi/{print $2}') -VERSION=0.1 -VERSION=$VERSION-$(git rev-parse --short HEAD) +VERSION=`git rev-list HEAD --count` + rm -f *.deb rm -Rf builddir mkdir builddir mkdir builddir/DEBIAN cp ./control ./builddir/DEBIAN -#cp ./files/postinst ./builddir/DEBIAN -#cp ./files/prerm ./builddir/DEBIAN +cp ./files/postinst ./builddir/DEBIAN sed "s/VERSION/$VERSION/" -i ./builddir/DEBIAN/control mkdir -p builddir/opt/tisbackup/ mkdir -p ./builddir/usr/lib/systemd/system/ +mkdir -p ./builddir/etc/tis +mkdir -p ./builddir/etc/cron.d/ -#cp ../scripts/tisbackup_gui.service ./builddir/usr/lib/systemd/system/ -rsync -aP --exclude=deb ../ ./builddir/opt/tisbackup - -#tis-arpwatch -#chmod 755 ./builddir/opt/tis-nagios/*.py -#chmod 755 ./builddir/etc/init.d/tis-arpwatch +rsync -aP --exclude="rpm" --exclude=".git" --exclude=deb ../ ./builddir/opt/tisbackup +rsync -aP ../scripts/tisbackup_gui.service ./builddir/usr/lib/systemd/system/ +rsync -aP ../scripts/tisbackup_huey.service ./builddir/usr/lib/systemd/system/ +rsync -aP ../samples/tisbackup.cron ./builddir/etc/cron.d/tisbackup +rsync -aP ../samples/tisbackup_gui.ini ./builddir/etc/tis +rsync -aP ../samples/tisbackup-config.ini.sample ./builddir/etc/tis/tisbackup-config.ini.sample +ln -s /opt/tisbackup/tisbackup.py ./builddir/usr/bin/tisbackup +chmod 755 /opt/tisbackup/tisbackup.py dpkg-deb --build builddir tis-tisbackup-${VERSION}.deb -#echo "== Copie du .deb sur le serveur tisdeb ==" -#scp *.deb root@srvinstallation:/var/www/srvinstallation/tisdeb/binary - -#echo "== Scan du répertoire ==" -#ssh root@srvinstallation /var/www/srvinstallation/tisdeb/updateRepo.sh