]>
Commit | Line | Data |
---|---|---|
04edd612 | 1 | # TODO: |
bc3731ae | 2 | # - Subpackages for yum and apt plugins |
04edd612 | 3 | # - Subpackages for backends (git, etc) |
bc3731ae CM |
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? | |
b11a8e3f | 6 | Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) |
9c5d38f1 | 7 | Name: etckeeper |
b11a8e3f | 8 | Version: 0.64 |
04edd612 | 9 | Release: 0.2 |
9c5d38f1 ER |
10 | License: GPL v2 |
11 | Group: Applications/System | |
12 | Source0: http://ftp.debian.org/debian/pool/main/e/etckeeper/%{name}_%{version}.tar.gz | |
b11a8e3f | 13 | # Source0-md5: ddd3229028df8da9af03ec8128cebc9b |
9c5d38f1 | 14 | URL: http://kitenet.net/~joey/code/etckeeper/ |
4e56ce8f | 15 | BuildRequires: bzr |
9c5d38f1 ER |
16 | BuildRequires: rpm-pythonprov |
17 | BuildRequires: rpmbuild(macros) >= 1.219 | |
18 | BuildRequires: sed >= 4.0 | |
8a60c6ac | 19 | Requires: perl |
9c5d38f1 | 20 | Requires: python-modules |
d19ef4bd | 21 | Suggests: %{name}-bash-completions |
b11a8e3f | 22 | Suggests: %{name}-bzr |
d19ef4bd | 23 | Suggests: git-core >= 1.6.1-1 |
9c5d38f1 ER |
24 | Obsoletes: yum-etckeeper |
25 | BuildArch: noarch | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
b11a8e3f | 29 | The etckeeper program is a tool to let /etc be stored in a git, |
9c5d38f1 ER |
30 | mercurial, bzr or darcs repository. It hooks into APT to automatically |
31 | commit changes made to /etc during package upgrades. It tracks file | |
32 | metadata that version control systems do not normally support, but | |
33 | that is important for /etc, such as the permissions of /etc/shadow. | |
34 | It's quite modular and configurable, while also being simple to use if | |
35 | you understand the basics of working with version control. | |
36 | ||
b11a8e3f ER |
37 | The default backend is git, if want to use a another backend please |
38 | install the appropriate tool (mercurial, darcs or bzr). To use bzr as | |
39 | backend, please also install the %{name}-bzr package. | |
40 | ||
41 | To start using the package please read | |
42 | %{_docdir}/%{name}-%{version}/README | |
43 | ||
44 | %package bzr | |
45 | Summary: Support for bzr with etckeeper | |
46 | Group: Applications/System | |
47 | Requires: %{name} = %{version}-%{release} | |
48 | Requires: bzr | |
49 | ||
50 | %description bzr | |
51 | This package provides a bzr backend for etckeeper, if you want to use | |
52 | etckeeper with bzr backend, install this package. | |
53 | ||
04edd612 ER |
54 | %package -n bash-completion-%{name} |
55 | Summary: Bash completion routines for %{name} | |
d19ef4bd CM |
56 | Group: Applications/Shells |
57 | Requires: %{name} = %{version}-%{release} | |
58 | Requires: bash-completion | |
04edd612 | 59 | Obsoletes: etckeeper-bash-completions |
d19ef4bd | 60 | |
04edd612 ER |
61 | %description -n bash-completion-%{name} |
62 | Bash completion routines for etckeeper. | |
d19ef4bd | 63 | |
9c5d38f1 ER |
64 | %prep |
65 | %setup -q -n %{name} | |
9c5d38f1 | 66 | %{__sed} -i -e ' |
bc3731ae | 67 | s|HIGHLEVEL_PACKAGE_MANAGER=apt|HIGHLEVEL_PACKAGE_MANAGER=poldek|; |
9c5d38f1 ER |
68 | s|LOWLEVEL_PACKAGE_MANAGER=dpkg|LOWLEVEL_PACKAGE_MANAGER=rpm|; |
69 | ' %{name}.conf | |
70 | ||
71 | %build | |
72 | %{__make} | |
73 | ||
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
b11a8e3f | 76 | install -d $RPM_BUILD_ROOT{/etc/cron.daily,%{_localstatedir}/cache/%{name}} |
9c5d38f1 | 77 | %{__make} install \ |
b11a8e3f | 78 | INSTALL="install -p" \ |
9c5d38f1 ER |
79 | DESTDIR=$RPM_BUILD_ROOT |
80 | ||
81 | install -p debian/cron.daily $RPM_BUILD_ROOT/etc/cron.daily/%{name} | |
82 | ||
83 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
84 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
85 | %py_postclean | |
86 | ||
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
b11a8e3f ER |
90 | %if 0 |
91 | %post | |
92 | if [ $1 -gt 1 ] ; then | |
93 | %{_bindir}/%{name} update-ignore | |
94 | fi | |
95 | %endif | |
96 | ||
9c5d38f1 ER |
97 | %files |
98 | %defattr(644,root,root,755) | |
b11a8e3f | 99 | %doc INSTALL TODO README |
9c5d38f1 | 100 | %dir %{_sysconfdir}/%{name} |
9c5d38f1 | 101 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf |
bc3731ae | 102 | %dir %{_sysconfdir}/%{name}/*.d |
8a60c6ac CM |
103 | %attr(755,root,root) %{_sysconfdir}/%{name}/*.d/[0-9]* |
104 | %{_sysconfdir}/%{name}/*.d/README | |
9c5d38f1 ER |
105 | |
106 | %attr(755,root,root) /etc/cron.daily/%{name} | |
b11a8e3f ER |
107 | %attr(755,root,root) %{_bindir}/%{name} |
108 | %{_mandir}/man8/%{name}.8* | |
9c5d38f1 | 109 | |
b11a8e3f ER |
110 | %files bzr |
111 | %defattr(644,root,root,755) | |
bc3731ae CM |
112 | %dir %{py_sitescriptdir}/bzrlib |
113 | %dir %{py_sitescriptdir}/bzrlib/plugins | |
114 | %dir %{py_sitescriptdir}/bzrlib/plugins/%{name} | |
b11a8e3f ER |
115 | %{py_sitescriptdir}/bzrlib/plugins/%{name}/*.py[co] |
116 | %{py_sitescriptdir}/bzr_etckeeper-*.egg-info | |
d19ef4bd | 117 | |
04edd612 | 118 | %files -n bash-completion-%{name} |
d19ef4bd CM |
119 | %defattr(644,root,root,755) |
120 | %{_sysconfdir}/bash_completion.d/%{name} |