diff --git a/Makefile b/Makefile index 019b73c..f994d99 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ -NAME := ${REPO_NAME} +NAME := ftpsync SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$$$d/Makefile.common ] ; then if [ -f $$$$d/CVS/Root -a -w $$$$d/Makefile.common ] ; then cd $$$$d ; cvs -Q update ; fi ; echo "$$$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) diff --git a/README.md b/README.md index 92697dd..cbe4242 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ -# Template-for-SMEServer-Core-upstream +# Ftpsync -Template to use for creating a repo for an SMEServer core upstream package (non perl) \ No newline at end of file +SME build of the debian ftpsync scrip found at https://salsa.debian.org/mirror-team/archvsync Scripts in this repository are written for the purposes of maintaining a Debian archive mirror (and shortly, a Debian bug mirror), but they should be easily generalizable. + +Two main scripts are : +- ftpsync : Used to sync an archive using rsync +- runmirrors : Used to notify leaf nodes of available updates diff --git a/archvsync-20180513.tar.gz b/archvsync-20180513.tar.gz new file mode 100644 index 0000000..66520b1 --- /dev/null +++ b/archvsync-20180513.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:490a4fb11f47e2e43d3a28dfa2c634ec6534f988680cda44d4519a289e9d6ab0 +size 37200 diff --git a/ftpsync.spec b/ftpsync.spec new file mode 100644 index 0000000..8d685f4 --- /dev/null +++ b/ftpsync.spec @@ -0,0 +1,71 @@ +%define name ftpsync +%define version 1.0.20180513 +%define release 1 +Summary: This is what ftpsync does. +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +Source: archvsync-20180513.tar.gz +License: GNU GPL version 2 +Group: SMEserver/addon +BuildRoot: %{_tmppath}/%{name}-buildroot +Prefix: %{_prefix} +BuildArchitectures: noarch +BuildRequires: smeserver-devtools +Requires: smeserver-release >= 11.0 +Requires: rsync +AutoReqProv: no + +%description +${REPO_DESCRIPTION} + +%changelog +* Mon Dec 02 2024 Jean-Philippe Pialasse 1.0.20180513-1.sme +- Initial code for SME Server + +%prep + +%setup -q -n archvsync-20180513 + +%build + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr/share/doc/%{name}/examples +mkdir -p $RPM_BUILD_ROOT/usr/share/man/{man1,man5} +mandir=$RPM_BUILD_ROOT/usr/share/man +man1dir=${mandir}/man1 +man5dir=${mandir}/man5 +cp doc/ftpsync.1.md ${man1dir}/ftpsync.1 +cp doc/ftpsync-cron.1.md ${man1dir}/ftpsync-cron.1 +cp doc/rsync-ssl-tunnel.1.md ${man1dir}/rsync-ssl-tunnel.1 +cp doc/runmirrors.1.md ${man1dir}/runmirrors.1 +cp doc/ftpsync.conf.5.md ${man5dir}/ftpsync.conf.5 +cp doc/runmirrors.conf.5.md ${man5dir}/runmirrors.conf.5 +cp doc/runmirrors.mirror.5.md ${man5dir}/runmirrors.mirror.5 +cp -a etc/* $RPM_BUILD_ROOT/usr/share/doc/%{name}/examples/ +cp -a bin $RPM_BUILD_ROOT/usr/ + +rm -f %{name}-%{version}-filelist +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ + |sed -e 's/\.1/.1.gz/'\ + |sed -e 's/\.5/.5.gz/'\ + > %{name}-%{version}-filelist +#echo "%doc COPYING" >> %{name}-%{version}-filelist +#--dir 'attr(755,user,grp)' \ +#--file 'attr(755,root,root)' \ + +%clean +cd .. +rm -rf %{name}-%{version} + +%pre + +%preun + +%post + +%postun +#uninstall +%files -f %{name}-%{version}-filelist +%defattr(-,root,root)