%define name smeserver-rsyncd %define version 1.0 %define release 1 Summary: SMEserver rpm for rsyncd Name: %{name} Version: %{version} Release: %{release} License: GNU GPL version 2 URL: http://www.contribs.org Distribution: SME Server Group: SMEServer/addon Source: %{name}-%{version}.tar.gz Packager: Jean-Philippe Pialasse BuildRoot: /var/tmp/%{name}-%{version} BuildArchitectures: noarch BuildRequires: e-smith-devtools Requires: e-smith-release >= 10 AutoReqProv: no %description SMEserver rpm for setting up rsyncd %changelog * Sat Apr 03 2021 Jean-Philippe Pialasse 1.0-1.sme - initial build for SME 10 %prep %setup #%patch1 -p1 %build perl createlinks %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist echo "%doc " >> %{name}-%{version}-filelist %clean cd .. rm -rf %{name}-%{version} %pre %preun %post #new installs if [ $1 = 1 ] ; then /bin/touch /home/e-smith/db/dungog # DBS=`find /home/e-smith/db/navigation -type f -name "navigation.*"` # for db in $DBS ; do # /sbin/e-smith/db $db set dungog-rsync panel Description "Rsync" DescriptionWeight 4863 Heading "dungog.net" HeadingWeight 4000 2>/dev/null # done fi /bin/chmod 644 /etc/crontab /etc/e-smith/events/actions/initialize-default-databases echo '' echo 'Remote server syntax changed for secure transfers from dungog-rsync-1.2-4' echo 'you now need to enter the user as well as the server' echo 'this removes the requirement of having the same user on both servers' echo 'but you may need to update your existing rules' echo '' %postun #uninstalls if [ $1 = 0 ] ; then /sbin/e-smith/expand-template /etc/crontab /bin/rm -rf /usr/bin/dungogrsync-????? # DBS=`find /home/e-smith/db/navigation -type f -name "navigation.*"` # for db in $DBS ; do # /sbin/e-smith/db $db delete dungog-rsync 2>/dev/null # done fi #&upgrades %files -f %{name}-%{version}-filelist %defattr(-,root,root)