Added remote destination directory checking and auto creation if doesn't exist.
[matthijs/upstream/backupninja.git] / backupninja.spec
1 %define name    backupninja
2 %define version 0.9.0
3
4 Summary:    Backupninja backup tool
5 Name:       %{name}
6 Version:    %{version}
7 Release:    1
8 License:    GPL
9 Group:      Applications/System
10 URL:        http://dev.riseup.net/backupninja/
11 Source:     %{name}-%{version}.tar.gz
12 Requires:   bash, gawk, rdiff-backup, gzip
13 Provides:   %{name}
14 Packager:   Petr Klima <Petr.Klima@madeta-group.cz>
15 BuildRoot:  %{_tmppath}/%{name}-%{version}
16 Prefix:     %{_prefix}
17
18 %description
19 Modular rdiff.backup tool
20
21 %prep
22 #rm -rf ${buildroot}
23 %setup -q
24
25 %build
26 %configure
27 # this is necessary MAKEINSTALL rewrites @sysconfigdir@ atc.
28 %{__make}
29
30 %install
31 %makeinstall
32 mkdir -p "%{buildroot}%{_sysconfdir}/backup.d"
33 mkdir -p "%{buildroot}%{_localstatedir}/backups"
34 mkdir -p "%{buildroot}%{_localstatedir}/log"
35 touch "%{buildroot}%{_localstatedir}/log/backupninja.log"
36
37 %clean
38 #rm -fr %{buildroot}
39
40 %files
41 %defattr(0750,root,root)
42 %{_sbindir}/*
43 %{_datadir}/backupninja/*
44 %{_sysconfdir}/cron.d/backupninja
45 %{_sysconfdir}/logrotate.d/backupninja
46
47 %defattr(0600,root,root)
48 %config(noreplace) %{_sysconfdir}/backupninja.conf
49 %dir %{_sysconfdir}/backup.d
50 %dir %{_localstatedir}/backups
51 %ghost %{_localstatedir}/log/backupninja.log
52
53 %defattr(0644,root,root)
54 %doc AUTHORS COPYING ChangeLog INSTALL NEWS README
55 %{_mandir}/*
56
57 %changelog
58 * Mon Apr 29 2002 Petr Klima <Petr.Klima@madeta-group.cz> 0.7.0
59 - first RPM release