From 4af965930b74e3792d5862c316773e5dcccdef5e Mon Sep 17 00:00:00 2001 From: root Date: Wed, 29 Mar 2017 19:02:06 +0200 Subject: [PATCH] fix symlink creation added builddir cleanup --- rpm/build.sh | 2 +- rpm/tis-tisbackup.spec | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rpm/build.sh b/rpm/build.sh index ee20430..2d226de 100755 --- a/rpm/build.sh +++ b/rpm/build.sh @@ -1,7 +1,7 @@ #!/bin/sh set -ex -rm -rf ./tis-tisbackup/ ./BUILD *.rpm ./RPMS +rm -rf ./builddir/ ./BUILD *.rpm ./RPMS mkdir -p BUILD RPMS VERSION=`git rev-list HEAD --count` diff --git a/rpm/tis-tisbackup.spec b/rpm/tis-tisbackup.spec index 35a7aca..ad1fe25 100644 --- a/rpm/tis-tisbackup.spec +++ b/rpm/tis-tisbackup.spec @@ -28,6 +28,7 @@ mkdir -p %{buildroot}/opt/tisbackup/ mkdir -p %{buildroot}/usr/lib/systemd/system/ mkdir -p %{buildroot}/etc/cron.d/ mkdir -p %{buildroot}/etc/tis +mkdir -p %{buildroot}/usr/bin/ rsync --exclude="rpm" --exclude=".git" -aP ../../../tisbackup/ %{buildroot}/opt/tisbackup/ rsync -aP ../../../tisbackup/scripts/tisbackup_gui.service %{buildroot}/usr/lib/systemd/system/ @@ -35,7 +36,7 @@ rsync -aP ../../../tisbackup/scripts/tisbackup_huey.service %{buildroot}/usr/li rsync -aP ../../../tisbackup/samples/tisbackup.cron %{buildroot}/etc/cron.d/tisbackup rsync -aP ../../../tisbackup/samples/tisbackup_gui.ini %{buildroot}/etc/tis rsync -aP ../../../tisbackup/samples/tisbackup-config.ini.sample %{buildroot}/etc/tis/tisbackup-config.ini.sample -ln -s /opt/tisbackup/tisbackup.py /usr/bin/tisbackup +ln -s /opt/tisbackup/tisbackup.py %{buildroot}/usr/bin/tisbackup %files %defattr(-,root,root) @@ -43,6 +44,7 @@ ln -s /opt/tisbackup/tisbackup.py /usr/bin/tisbackup %attr(-,root,root)/usr/lib/systemd/system/ %attr(-,root,root)/etc/tis %attr(-,root,root)/etc/cron.d/ +%attr(-,root,root)/usr/bin/ %pre