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