first deb packaging really usable

This commit is contained in:
Denis Cardon 2017-03-29 19:51:37 +02:00
parent 926797a62f
commit 3248f94688
2 changed files with 14 additions and 18 deletions

View File

@ -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 <admin@tranquil-it-systems.fr>
Description: TISBackup backup management
Homepage: http://www.tranquil-it-systems.fr

View File

@ -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