]> git.pld-linux.org Git - packages/BackupPC.git/blob - BackupPC.spec
- updates made by Michał Panasiewicz
[packages/BackupPC.git] / BackupPC.spec
1 # TODO:
2 # - make it simply build...
3 # - make pre/post for apache
4 # - add all needed files to %files
5 %include        /usr/lib/rpm/macros.perl
6 Summary:        A high-performance, enterprise-grade system for backing up PCs
7 Summary(pl):    Wysoko wydajny, profesjonalnej klasy system do kopii zapasowych z PC
8 Name:           backuppc
9 Version:        2.1.0
10 Release:        0.5
11 License:        GPL
12 Group:          Networking/Utilities
13 Source0:        http://dl.sourceforge.net/backuppc/BackupPC-%{version}.tar.gz
14 # Source0-md5:  4e201f00842c88cf241e0429643c6ec4
15 Patch0:         %{name}-usernotexist.patch
16 URL:            http://backuppc.sourceforge.net/
17 #BuildRequires: fakeroot
18 BuildRequires:  perl-base
19 BuildRequires:  perl-devel >= 1:5.6.0
20 BuildRequires:  perl-Compress-Zlib
21 BuildRequires:  perl-Digest-MD5
22 Requires:       samba-client
23 # lets check if it's really needed
24 #Requires:      sperl
25 Requires:       tar > 1.13
26 Requires:       webserver
27 Obsoletes:      BackupPC
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _backuppcdir    %{_datadir}/%{name}
32
33 %description
34 BackupPC is disk based and not tape based. This particularity allows
35 features not found in any other backup solution:
36 - Clever pooling scheme minimizes disk storage and disk I/O. Identical
37   files across multiple backups of the same or different PC are stored
38   only once (using hard links), resulting in substantial savings in disk
39   storage and disk writes.
40 - Optional compression provides additional reductions in storage. CPU
41   impact of compression is low since only new files (those not already
42   in the pool) need to be compressed.
43 - A powerful http/cgi user interface allows administrators to view log
44   files, configuration, current status and allows users to initiate and
45   cancel backups and browse and restore files from backups very quickly.
46 - No client-side software is needed. On WinXX the SMB protocol is
47   used. On Linux or unix clients, rsync or tar (over ssh/rsh/NFS) can be
48   used.
49 - Flexible restore options. Single files can be downloaded from any
50   backup directly from the CGI interface. Zip or Tar archives for
51   selected files or directories can also be downloaded from the CGI
52   interface.
53 - BackupPC supports mobile environments where laptops are only
54   intermittently connected to the network and have dynamic IP addresses
55   (DHCP).
56 - Flexible configuration parameters allow multiple backups to be
57   performed in parallel.
58 - and more to discover in the manual...
59
60 %description -l pl
61 BackupPC jest oparty na dyskach, a nie ta¶mach. Ta osobliwo¶æ daje
62 mo¿liwo¶ci, których nie maj± inne rozwi±zania problemu kopii
63 zapasowych:
64 - Inteligentny schemat ¶ci±gania minimalizuje zajmowane miejsce i
65   ilo¶æ operacji wej¶cia/wyj¶cia na dysku. Takie same pliki s±
66   przechowywane tylko raz (przy u¿yciu twardych dowi±zañ), co daje
67   znacz±c± oszczêdno¶æ w miejscu na dysku i czasie zapisu.
68 - Opcjonalna kompresja pozwala na dalsze ograniczenie rozmiaru.
69   Obci±¿enie procesora jest ma³e, poniewa¿ tylko nowe pliki musz± byæ
70   kompresowane.
71 - Potê¿ny interfejs u¿ytkownika HTTP/CGI pozwala administratorom
72   przegl±daæ pliki logów, konfiguracjê i aktualny stan oraz u¿ytkownikom
73   rozpoczynaæ lub przerywaæ tworzenie kopii oraz szybko przegl±daæ i
74   odtwarzaæ pliki z kopii zapasowych.
75 - Nie jest wymagane oprogramowanie po stronie klienta. Na WinXX
76   u¿ywany jest protokó³ SMB. Na klientach linuksowych lub uniksowych
77   mo¿na u¿ywaæ rsynca lub tara (po ssh/rsh/NFS).
78 - Dostêpne s± elastyczne opcje odzyskiwania. Mo¿na ¶ci±gaæ pojedyncze
79   pliki z kopii bezpo¶rednio z interfejsu CGI. Tak¿e archiwa zip lub tar
80   z wybranymi plikami lub katalogami mog± byæ ¶ci±gane z poziomu
81   interfejsu CGI.
82 - BackupPC obs³uguje ¶rodowiska przeno¶ne, gdzie laptopy s± pod³±czane
83   do sieci tylko z przerwami i maj± dynamiczne adresy IP (z DHCP).
84 - Elastyczna konfiguracja parametrów pozwala na wykonywanie wielu
85   kopii równolegle.
86 - Wiele wiêcej mo¿na odkryæ w manualu...
87
88 %prep
89 %setup -q -n BackupPC-%{version}
90 %patch0 -p1
91
92 %build
93 sed -i -e 's#!/bin/perl#!%{__perl}#' configure.pl
94 sed -i -e 's#!/bin/perl#!%{__perl}#' {bin,cgi-bin,doc}/*
95 sed -i -e 's#!/bin/perl#!%{__perl}#' */src/*
96 sed -i -e 's#!/bin/perl#!%{__perl}#' */*/*/*.pm
97
98 pod2man --section=8 --center="BackupPC manual" doc/BackupPC.pod backuppc.8
99 perl -e "s/.IX Title.*/.SH NAME\nbackuppc \\- BackupPC manual/g" -p -i.tmp backuppc.8
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,%{name},httpd/httpd.conf} \
104         $RPM_BUILD_ROOT%{_var}/lib/%{name}/pc/localhost
105
106 # Does not work, yet... some voodoo-magic is needed
107 #echo "y" | fakeroot DEBIANDEST=$RPM_BUILD_ROOT configure.pl
108 %{__perl} configure.pl \
109         --batch \
110         --bin-path perl=%{__perl} \
111         --bin-path tar=/bin/tar \
112         --bin-path smbclient=%{_bindir}/smbclient \
113         --bin-path nmblookup=%{_bindir}/nmblookup \
114         --bin-path rsync=%{_bindir}/rsync \
115         --bin-path ping=/bin/ping \
116         --bin-path df=/bin/df \
117         --bin-path ssh=%{_bindir}/ssh \
118         --bin-path sendmail=%{_sbindir}/sendmail \
119         --bin-path hostname=/bin/hostname \
120         --bin-path split=%{_bindir}/split \
121         --bin-path cat=/bin/cat \
122         --bin-path gzip=/bin/gzip \
123         --bin-path bzip2=%{_bindir}/bzip2 \
124         --cgi-dir %{_datadir}/BackupPC/cgi-bin \
125         --data-dir %{_var}/lib/BackupPC \
126         --dest-dir $RPM_BUILD_ROOT \
127         --hostname localhost \
128         --html-dir %{_usr}/share/BackupPC/www/html \
129         --html-dir-url /BackupPC \
130         --install-dir  %{_usr} \
131         --uid-ignore
132 #       --config-path %{_sysconfdir}/backuppc \
133
134 #mv -f $RPM_BUILD_ROOT/var/lib/backuppc/conf/* $RPM_BUILD_ROOT%{_sysconfdir}/backuppc
135 #mv -f $RPM_BUILD_ROOT%{_datadir}/backuppc/cgi-bin/BackupPC_Admin $RPM_BUILD_ROOT%{_datadir}/backuppc/cgi-bin/index.cgi
136 #install conf/hosts $RPM_BUILD_ROOT%{_sysconfdir}/backuppc
137 #install debian/localhost.pl $RPM_BUILD_ROOT%{_sysconfdir}/backuppc
138 #install debian/apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/93_backuppc.conf
139
140 # Cleanups:
141 #rm -f $RPM_BUILD_ROOT%{_datadir}/backuppc/doc/*
142 #rmdir $RPM_BUILD_ROOT/var/lib/backuppc/conf
143
144 # Linking cgi:
145 #cd $RPM_BUILD_ROOT%{_datadir}/backuppc/cgi-bin
146 #ln -s ../image
147
148 %clean
149 rm -rf $RPM_BUILD_ROOT
150
151 %files
152 %defattr(644,root,root,755)
153 %doc doc/*.html
154 #%attr(750,root,root) %dir %{_sysconfdir}/backuppc
155 #%config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) %{_sysconfdir}/backuppc/*
156 #%config(noreplace) %verify(not md5 size mtime) %attr(640,root,root) %{_sysconfdir}/httpd/httpd.conf/93_backuppc.conf
157 #%attr(755,root,root) %{_bindir}/*
158 %attr(750,root,root) %dir %{_var}/lib/backuppc
This page took 0.116418 seconds and 3 git commands to generate.