From b4be4b8a53d5a76699b9a6f72c6d67b044443bc0 Mon Sep 17 00:00:00 2001 From: Richard Grainger Date: Wed, 15 Feb 2017 16:08:53 +0000 Subject: [PATCH] Fixes #91 Improved spec file --- packaging/RHEL/osync.spec | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/packaging/RHEL/osync.spec b/packaging/RHEL/osync.spec index 542fde7..3dfc11e 100644 --- a/packaging/RHEL/osync.spec +++ b/packaging/RHEL/osync.spec @@ -1,12 +1,13 @@ %define name osync -%define gitsource https://github.com/deajan/%{name}/archive/stable.zip +%define version 1.2RC3 +%define gitsource https://github.com/deajan/%{name}/archive/v%{version}.zip %define use_systemd 1 %{?el5:%define use_systemd 0} %{?el6:%define use_systemd 0} Name: %{name} -Version: 1.2RC1 +Version: %{version} Release: 1%{?dist} Summary: robust file synchronization tool @@ -16,7 +17,7 @@ URL: https://www.netpower.fr/osync Source0: %{gitsource} BuildRequires: wget -Requires: rsync openssh-server bash wget +Requires: rsync openssh-server bash wget inotify-tools BuildArch: noarch %description @@ -28,19 +29,19 @@ A robust two way (bidirectional) file sync script based on rsync with fault tole #%configure %install -wget --no-check-certificate --timeout=5 -O %{_sourcedir}/stable.zip %{gitsource} -( cd %{_sourcedir} && unzip %{_sourcedir}/stable.zip ) +wget --no-check-certificate --timeout=5 -O %{_sourcedir}/%{name}-%{version}.zip %{gitsource} +( cd %{_sourcedir} && unzip %{_sourcedir}/%{name}-%{version}.zip ) rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_unitdir} -install -m 755 %{_sourcedir}/osync-stable/osync.sh ${RPM_BUILD_ROOT}%{_bindir} -install -m 755 %{_sourcedir}/osync-stable/osync-batch.sh ${RPM_BUILD_ROOT}%{_bindir} +install -m 755 %{_sourcedir}/%{name}-%{version}/osync.sh ${RPM_BUILD_ROOT}%{_bindir} +install -m 755 %{_sourcedir}/%{name}-%{version}/osync-batch.sh ${RPM_BUILD_ROOT}%{_bindir} install -m 0755 -d ${RPM_BUILD_ROOT}/etc/osync -install -m 0644 %{_sourcedir}/osync-stable/sync.conf.example ${RPM_BUILD_ROOT}/etc/osync +install -m 0644 %{_sourcedir}/%{name}-%{version}/sync.conf.example ${RPM_BUILD_ROOT}/etc/osync %if %use_systemd -install -m 0755 %{_sourcedir}/osync-stable/osync-srv@.service ${RPM_BUILD_ROOT}%{_unitdir} +install -m 0755 %{_sourcedir}/%{name}-%{version}/osync-srv@.service ${RPM_BUILD_ROOT}%{_unitdir} %else -install -m 0755 %{_sourcedir}/osync-stable/osync-srv ${RPM_BUILD_ROOT}/etc/init.d +install -m 0755 %{_sourcedir}/%{name}-%{version}/osync-srv ${RPM_BUILD_ROOT}/etc/init.d %endif %files @@ -57,6 +58,11 @@ install -m 0755 %{_sourcedir}/osync-stable/osync-srv ${RPM_BUILD_ROOT}/etc/init. %doc %changelog +* Wed Feb 15 2017 Richard Grainger +- Update version +- Download source archive based on version +- Add inotify-tools as dependency + * Sun Dec 18 2016 Orsiris de Jong - Add systemd / initV differentiation - Make source autodownload work