]> git.pld-linux.org Git - packages/etckeeper.git/blob - etckeeper.spec
9df72cea40e22981022dcf9ef8c5f17a50b4f6fe
[packages/etckeeper.git] / etckeeper.spec
1 #TODO:
2 # - Subpackages for yum and apt plugins
3 # - Subpackages for backends (git, bzr, etc)
4 # - Write PLD %pre and %post macros that trigger pre-install and post-install runs
5 # - %{py_sitescriptdir}/bzrlib/plugins also created by qbzr package?
6 Summary:        Store /etc in git, mercurial, bzr or darcs
7 Name:           etckeeper
8 Version:        0.53
9 Release:        0.1
10 License:        GPL v2
11 Group:          Applications/System
12 Source0:        http://ftp.debian.org/debian/pool/main/e/etckeeper/%{name}_%{version}.tar.gz
13 # Source0-md5:  a5bb4613ce954a03e5db9b9cfff3351a
14 URL:            http://kitenet.net/~joey/code/etckeeper/
15 BuildRequires:  bzr
16 BuildRequires:  rpm-pythonprov
17 BuildRequires:  rpmbuild(macros) >= 1.219
18 BuildRequires:  sed >= 4.0
19 Requires:       git-core >= 1.6.1-1
20 Requires:       python-modules
21 Obsoletes:      etckeeper = snapshot
22 Obsoletes:      yum-etckeeper
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 The %{name} program is a tool to let /etc be stored in a git,
28 mercurial, bzr or darcs repository. It hooks into APT to automatically
29 commit changes made to /etc during package upgrades. It tracks file
30 metadata that version control systems do not normally support, but
31 that is important for /etc, such as the permissions of /etc/shadow.
32 It's quite modular and configurable, while also being simple to use if
33 you understand the basics of working with version control.
34
35 %prep
36 %setup -q -n %{name}
37
38 %{__sed} -i -e '
39         s|HIGHLEVEL_PACKAGE_MANAGER=apt|HIGHLEVEL_PACKAGE_MANAGER=poldek|;
40         s|LOWLEVEL_PACKAGE_MANAGER=dpkg|LOWLEVEL_PACKAGE_MANAGER=rpm|;
41 ' %{name}.conf
42
43 %build
44 %{__make}
45
46 %install
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT/etc/cron.daily
49 %{__make} install \
50         DESTDIR=$RPM_BUILD_ROOT
51
52 install -p debian/cron.daily $RPM_BUILD_ROOT/etc/cron.daily/%{name}
53
54 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
55 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
56 %py_postclean
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %files
62 %defattr(644,root,root,755)
63 %attr(755,root,root) %{_bindir}/%{name}
64
65 %dir %{_sysconfdir}/%{name}
66 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
67 %dir %{_sysconfdir}/%{name}/*.d
68 %{_sysconfdir}/%{name}/*.d/*
69 %{_sysconfdir}/bash_completion.d/%{name}
70
71 %attr(755,root,root) /etc/cron.daily/%{name}
72
73 %dir %{py_sitescriptdir}/bzrlib
74 %dir %{py_sitescriptdir}/bzrlib/plugins
75 %dir %{py_sitescriptdir}/bzrlib/plugins/%{name}
76 %{py_sitescriptdir}/bzrlib/plugins/%{name}/__init__.py[co]
77
78 %doc INSTALL TODO README
79 %{_mandir}/man8/%{name}.8*
This page took 0.119446 seconds and 3 git commands to generate.