1 %include /usr/lib/rpm/macros.perl
2 Summary: A high-performance, enterprise-grade system for backing up PCs
7 Group: Networking/Utilities
8 Source0: http://dl.sourceforge.net/backuppc/BackupPC-%{version}.tar.gz
9 # Source0-md5: d60aacbf46eb83a7e4ffbbe9e4f72c11
10 Patch0: %{name}-debian.patch
11 URL: http://backuppc.sourceforge.net/
12 BuildRequires: perl >= 5.6.0
13 BuildRequires: perl-devel
14 BuildRequires: perl-Digest-MD5
15 BuildRequires: perl-Compress-Zlib
16 BuildRequires: fakeroot
18 Requires: samba-clients
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 BackupPC is disk based and not tape based. This particularity allows
27 features not found in any other backup solution:
28 * Clever pooling scheme minimizes disk storage and disk I/O.
29 Identical files across multiple backups of the same or different PC are
30 stored only once (using hard links), resulting in substantial savings
31 in disk storage and disk writes.
32 * Optional compression provides additional reductions in storage.
33 CPU impact of compression is low since only new files (those not already
34 in the pool) need to be compressed.
35 * A powerful http/cgi user interface allows administrators to view log files,
36 configuration, current status and allows users to initiate and cancel
37 backups and browse and restore files from backups very quickly.
38 * No client-side software is needed. On WinXX the smb protocol is used.
39 On linux or unix clients, rsync or tar (over ssh/rsh/nfs) can be used
40 * Flexible restore options. Single files can be downloaded from any backup
41 directly from the CGI interface. Zip or Tar archives for selected files
42 or directories can also be downloaded from the CGI interface.
43 * BackupPC supports mobile environments where laptops are only intermittently
44 connected to the network and have dynamic IP addresses (DHCP).
45 * Flexible configuration parameters allow multiple backups to be performed
47 * and more to discover in the manual...
50 %setup -q -n BackupPC-%{version}
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,backuppc,httpd/httpd.conf}
58 fakeroot DEBIANDEST=$RPM_BUILD_ROOT %{__perl} configure.pl
60 pod2man --section=8 --center="BackupPC manual" doc/BackupPC.pod backuppc.8
61 perl -e "s/.IX Title.*/.SH NAME\nbackuppc \\- BackupPC manual/g" -p -i.tmp backuppc.8
62 rm -f $RPM_BUILD_ROOT/usr/share/backuppc/doc/*
63 mv -f $RPM_BUILD_ROOT/var/lib/backuppc/conf/* $RPM_BUILD_ROOT/etc/backuppc
64 mv -f $RPM_BUILD_ROOT/usr/share/backuppc/cgi-bin/* $RPM_BUILD_ROOT/usr/share/backuppc/cgi-bin/index.cgi
65 install --mode=644 conf/hosts $RPM_BUILD_ROOT/etc/backuppc
66 install --mode=644 debian/localhost.pl $RPM_BUILD_ROOT/etc/backuppc
67 install --mode=644 debian/apache.conf $RPM_BUILD_ROOT/etc/httpd/httpd.conf/93_backuppc.conf
68 rmdir $RPM_BUILD_ROOT/var/lib/backuppc/conf/
69 mkdir $RPM_BUILD_ROOT/var/lib/backuppc/pc/localhost/
70 (cd $RPM_BUILD_ROOT/usr/share/backuppc/cgi-bin; ln -s ../image)
73 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
78 %attr(750,root,root) %dir %{_var}/backuppc
79 %attr(750,root,root) %dir %{_sysconfdir}/backuppc
80 %config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) %{_sysconfdir}/backuppc/*
81 %attr(755,root,root) %{_bindir}/*