]>
Commit | Line | Data |
---|---|---|
bc3731ae CM |
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? | |
9c5d38f1 ER |
6 | Summary: Store /etc in git, mercurial, bzr or darcs |
7 | Name: etckeeper | |
2f39c410 | 8 | Version: 0.61 |
2fcbd43a | 9 | Release: 0.1 |
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 | |
2f39c410 | 13 | # Source0-md5: 1f5568f01ebca2546c819c8f5bdfb906 |
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 CM |
21 | Suggests: %{name}-bash-completions |
22 | Suggests: git-core >= 1.6.1-1 | |
9c5d38f1 ER |
23 | Obsoletes: etckeeper = snapshot |
24 | Obsoletes: yum-etckeeper | |
25 | BuildArch: noarch | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | The %{name} program is a tool to let /etc be stored in a git, | |
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 | ||
d19ef4bd CM |
37 | %package bash-completions |
38 | Summary: Bash completion routies for %{name} | |
39 | Group: Applications/Shells | |
40 | Requires: %{name} = %{version}-%{release} | |
41 | Requires: bash-completion | |
42 | ||
43 | %description bash-completions | |
44 | Bash completion routines for %{name} | |
45 | ||
9c5d38f1 ER |
46 | %prep |
47 | %setup -q -n %{name} | |
48 | ||
49 | %{__sed} -i -e ' | |
bc3731ae | 50 | s|HIGHLEVEL_PACKAGE_MANAGER=apt|HIGHLEVEL_PACKAGE_MANAGER=poldek|; |
9c5d38f1 ER |
51 | s|LOWLEVEL_PACKAGE_MANAGER=dpkg|LOWLEVEL_PACKAGE_MANAGER=rpm|; |
52 | ' %{name}.conf | |
53 | ||
54 | %build | |
55 | %{__make} | |
56 | ||
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | install -d $RPM_BUILD_ROOT/etc/cron.daily | |
60 | %{__make} install \ | |
61 | DESTDIR=$RPM_BUILD_ROOT | |
62 | ||
63 | install -p debian/cron.daily $RPM_BUILD_ROOT/etc/cron.daily/%{name} | |
64 | ||
65 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
66 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
67 | %py_postclean | |
68 | ||
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %files | |
73 | %defattr(644,root,root,755) | |
bc3731ae | 74 | %attr(755,root,root) %{_bindir}/%{name} |
9c5d38f1 ER |
75 | |
76 | %dir %{_sysconfdir}/%{name} | |
9c5d38f1 | 77 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf |
bc3731ae | 78 | %dir %{_sysconfdir}/%{name}/*.d |
8a60c6ac CM |
79 | %attr(755,root,root) %{_sysconfdir}/%{name}/*.d/[0-9]* |
80 | %{_sysconfdir}/%{name}/*.d/README | |
9c5d38f1 ER |
81 | |
82 | %attr(755,root,root) /etc/cron.daily/%{name} | |
9c5d38f1 | 83 | |
bc3731ae CM |
84 | %dir %{py_sitescriptdir}/bzrlib |
85 | %dir %{py_sitescriptdir}/bzrlib/plugins | |
86 | %dir %{py_sitescriptdir}/bzrlib/plugins/%{name} | |
9c5d38f1 | 87 | %{py_sitescriptdir}/bzrlib/plugins/%{name}/__init__.py[co] |
bc3731ae CM |
88 | |
89 | %doc INSTALL TODO README | |
90 | %{_mandir}/man8/%{name}.8* | |
d19ef4bd CM |
91 | |
92 | %files bash-completions | |
93 | %defattr(644,root,root,755) | |
94 | %{_sysconfdir}/bash_completion.d/%{name} |