2024-01-05 17:42:52 +01:00
|
|
|
%define backuppc_uid 65417
|
|
|
|
%define backuppc_gid 65417
|
|
|
|
%define servercgidir %(apxs -q cgidir 2>/dev/null)
|
|
|
|
%define serverhtdocsdir %(apxs -q htdocsdir 2>/dev/null)
|
|
|
|
|
|
|
|
Name: BackupPC
|
2024-01-05 17:42:52 +01:00
|
|
|
Version: 4.4.0
|
2024-01-05 17:42:52 +01:00
|
|
|
Release: 1mamba
|
|
|
|
Summary: A system for backing up Linux, WinXX PCs, Macs and laptops to a server's disk
|
|
|
|
Group: System/Management
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
2024-01-05 17:42:52 +01:00
|
|
|
URL: https://backuppc.sourceforge.net/
|
2024-01-05 17:42:52 +01:00
|
|
|
Source: http://downloads.sourceforge.net/sourceforge/backuppc/BackupPC-%{version}.tar.gz
|
2024-01-05 17:42:52 +01:00
|
|
|
Source1: backuppc.tmpfiles
|
2024-01-05 17:42:52 +01:00
|
|
|
License: GPL
|
2024-01-05 17:42:52 +01:00
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: libperl
|
|
|
|
BuildRequires: perl-BackupPC-XS
|
|
|
|
BuildRequires: perl-File-Listing
|
|
|
|
BuildRequires: perl-devel
|
|
|
|
## AUTOBUILDREQ-END
|
|
|
|
BuildRequires: perl-BackupPC-XS
|
2024-01-05 17:42:52 +01:00
|
|
|
Requires: httpd
|
2024-01-05 17:42:52 +01:00
|
|
|
Requires: perl-BackupPC-XS
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
2024-01-05 17:42:52 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
BackupPC is a high-performance, enterprise-grade backup system for backing up Linux, WinXX PCs, Macs and laptops to a server's disk. Features include clever pooling of identical files, no client-side software, and a powerful Apache/CGI user interface.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
perl configure.pl \
|
|
|
|
--batch \
|
|
|
|
--cgi-dir=%servercgidir \
|
|
|
|
--html-dir=%serverhtdocsdir/BackupPC \
|
|
|
|
--html-dir-url=/BackupPC \
|
|
|
|
--backuppc-user=backuppc \
|
2024-01-05 17:42:52 +01:00
|
|
|
--install-dir %{_datadir}/backuppc \
|
2024-01-05 17:42:52 +01:00
|
|
|
--dest-dir %{buildroot} \
|
2024-01-05 17:42:52 +01:00
|
|
|
--data-dir /var/lib/backuppc \
|
2024-01-05 17:42:52 +01:00
|
|
|
--no-set-perms \
|
2024-01-05 17:42:52 +01:00
|
|
|
--run-dir /run/BackupPC \
|
2024-01-05 17:42:52 +01:00
|
|
|
--uid-ignore
|
|
|
|
|
2024-01-05 17:42:52 +01:00
|
|
|
install -D -m0644 systemd/backuppc.service %{buildroot}%{_unitdir}/backuppc.service
|
|
|
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/backuppc.conf
|
2024-01-05 17:42:52 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%pre
|
|
|
|
if [ $1 -ge 1 ]; then
|
2024-01-05 17:42:52 +01:00
|
|
|
/usr/sbin/groupadd backuppc -g %{backuppc_gid} 2>/dev/null
|
|
|
|
/usr/sbin/useradd -u %{backuppc_uid} -c 'BackupPC user' -d /var/lib/backuppc -g backuppc -s /bin/false backuppc 2>/dev/null
|
|
|
|
fi
|
|
|
|
%tmpfiles_create_package backuppc %{SOURCE1}
|
|
|
|
:
|
|
|
|
|
|
|
|
%post
|
|
|
|
%systemd_post backuppc
|
|
|
|
:
|
2024-01-05 17:42:52 +01:00
|
|
|
|
|
|
|
%preun
|
2024-01-05 17:42:52 +01:00
|
|
|
%systemd_preun backuppc
|
2024-01-05 17:42:52 +01:00
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
/usr/sbin/userdel backuppc 2>/dev/null
|
|
|
|
/usr/sbin/groupdel backuppc 2>/dev/null
|
|
|
|
fi
|
2024-01-05 17:42:52 +01:00
|
|
|
:
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart backuppc
|
|
|
|
:
|
2024-01-05 17:42:52 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2024-01-05 17:42:52 +01:00
|
|
|
%dir %{_sysconfdir}/BackupPC
|
2024-01-05 17:42:52 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/BackupPC/config.pl
|
|
|
|
%config(noreplace) %{_sysconfdir}/BackupPC/hosts
|
2024-01-05 17:42:52 +01:00
|
|
|
%{_sysconfdir}/BackupPC/config.pl.sample
|
|
|
|
%{_sysconfdir}/BackupPC/hosts.sample
|
|
|
|
%{_unitdir}/backuppc.service
|
|
|
|
%{_tmpfilesdir}/backuppc.conf
|
2024-01-05 17:42:52 +01:00
|
|
|
%attr(-,backuppc,nobody) %{servercgidir}/BackupPC_Admin
|
|
|
|
%attr(-,backuppc,nobody) %{serverhtdocsdir}/BackupPC
|
2024-01-05 17:42:52 +01:00
|
|
|
%attr(-,backuppc,backuppc) %{_datadir}/backuppc
|
|
|
|
%dir /var/lib/backuppc
|
2024-01-05 17:42:52 +01:00
|
|
|
%doc LICENSE
|
|
|
|
#%doc ChangeLog README
|
|
|
|
|
|
|
|
%changelog
|
2024-01-05 17:42:52 +01:00
|
|
|
* Fri Feb 19 2021 Automatic Build System <autodist@mambasoft.it> 4.4.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 17:42:52 +01:00
|
|
|
* Mon Apr 22 2013 Automatic Build System <autodist@mambasoft.it> 3.3.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Sun Aug 08 2010 Automatic Build System <autodist@mambasoft.it> 3.2.0-1mamba
|
|
|
|
- automatic update by autodist
|
|
|
|
|
|
|
|
* Thu Feb 04 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.0-2mamba
|
|
|
|
- rebuilt to eliminate executable requirements
|
|
|
|
|
|
|
|
* Tue Apr 28 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.0-1mamba
|
|
|
|
- package created by autospec
|