2 # - Subpackages for yum and apt plugins
3 # - Subpackages for backends (git, 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 a SCM system (git, mercurial, bzr or darcs)
11 Group: Applications/System
12 Source0: http://ftp.debian.org/debian/pool/main/e/etckeeper/%{name}_%{version}.tar.gz
13 # Source0-md5: 1d7e402b41721f2a9ea0b217b969ba89
14 Patch0: type-mksh.patch
15 URL: http://kitenet.net/~joey/code/etckeeper/
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.219
19 BuildRequires: sed >= 4.0
22 Suggests: %{name}-bash-completions
24 Suggests: git-core >= 1.6.1-1
25 Obsoletes: yum-etckeeper
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 The etckeeper program is a tool to let /etc be stored in a git,
31 mercurial, bzr or darcs repository. It hooks into APT to automatically
32 commit changes made to /etc during package upgrades. It tracks file
33 metadata that version control systems do not normally support, but
34 that is important for /etc, such as the permissions of /etc/shadow.
35 It's quite modular and configurable, while also being simple to use if
36 you understand the basics of working with version control.
38 The default backend is git, if want to use a another backend please
39 install the appropriate tool (mercurial, darcs or bzr). To use bzr as
40 backend, please also install the %{name}-bzr package.
42 To start using the package please read
43 %{_docdir}/%{name}-%{version}/README
46 Summary: Support for bzr with etckeeper
47 Group: Applications/System
48 Requires: %{name} = %{version}-%{release}
52 This package provides a bzr backend for etckeeper, if you want to use
53 etckeeper with bzr backend, install this package.
55 %package -n bash-completion-%{name}
56 Summary: Bash completion routines for %{name}
57 Group: Applications/Shells
58 Requires: %{name} = %{version}-%{release}
59 Requires: bash-completion
60 Obsoletes: etckeeper-bash-completions
62 %description -n bash-completion-%{name}
63 Bash completion routines for etckeeper.
71 s|HIGHLEVEL_PACKAGE_MANAGER=apt|HIGHLEVEL_PACKAGE_MANAGER=poldek|;
72 s|LOWLEVEL_PACKAGE_MANAGER=dpkg|LOWLEVEL_PACKAGE_MANAGER=rpm|;
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT{/etc/cron.daily,%{_localstatedir}/cache/%{name}}
82 LOWLEVEL_PACKAGE_MANAGER=rpm \
83 HIGHLEVEL_PACKAGE_MANAGER=poldek \
84 INSTALL="install -p" \
85 DESTDIR=$RPM_BUILD_ROOT
87 install -p debian/cron.daily $RPM_BUILD_ROOT/etc/cron.daily/%{name}
89 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
90 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
94 rm -rf $RPM_BUILD_ROOT
98 if [ $1 -gt 1 ] ; then
99 %{_bindir}/%{name} update-ignore
104 %defattr(644,root,root,755)
105 %doc INSTALL TODO README
106 %dir %{_sysconfdir}/%{name}
107 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
108 %dir %{_sysconfdir}/%{name}/*.d
109 %attr(755,root,root) %{_sysconfdir}/%{name}/*.d/[0-9]*
110 %{_sysconfdir}/%{name}/*.d/README
112 %attr(755,root,root) /etc/cron.daily/%{name}
113 %attr(755,root,root) %{_bindir}/%{name}
114 %{_mandir}/man8/%{name}.8*
116 %dir %attr(750,root,root) %{_localstatedir}/cache/%{name}
119 %defattr(644,root,root,755)
120 %dir %{py_sitescriptdir}/bzrlib
121 %dir %{py_sitescriptdir}/bzrlib/plugins
122 %dir %{py_sitescriptdir}/bzrlib/plugins/%{name}
123 %{py_sitescriptdir}/bzrlib/plugins/%{name}/*.py[co]
124 %{py_sitescriptdir}/bzr_etckeeper-*.egg-info
126 %files -n bash-completion-%{name}
127 %defattr(644,root,root,755)
128 %{_sysconfdir}/bash_completion.d/%{name}