fix symlink creation

added builddir cleanup
This commit is contained in:
root 2017-03-29 19:02:06 +02:00
parent 7b0799dc17
commit 4af965930b
2 changed files with 4 additions and 2 deletions

View File

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

View File

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