]> git.pld-linux.org Git - packages/etckeeper.git/blob - etckeeper.spec
- Up to 0.61
[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.61
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:  1f5568f01ebca2546c819c8f5bdfb906
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:       perl
20 Requires:       python-modules
21 Suggests:       %{name}-bash-completions
22 Suggests:       git-core >= 1.6.1-1
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
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
46 %prep
47 %setup -q -n %{name}
48
49 %{__sed} -i -e '
50         s|HIGHLEVEL_PACKAGE_MANAGER=apt|HIGHLEVEL_PACKAGE_MANAGER=poldek|;
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)
74 %attr(755,root,root) %{_bindir}/%{name}
75
76 %dir %{_sysconfdir}/%{name}
77 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
78 %dir %{_sysconfdir}/%{name}/*.d
79 %attr(755,root,root) %{_sysconfdir}/%{name}/*.d/[0-9]*
80 %{_sysconfdir}/%{name}/*.d/README
81
82 %attr(755,root,root) /etc/cron.daily/%{name}
83
84 %dir %{py_sitescriptdir}/bzrlib
85 %dir %{py_sitescriptdir}/bzrlib/plugins
86 %dir %{py_sitescriptdir}/bzrlib/plugins/%{name}
87 %{py_sitescriptdir}/bzrlib/plugins/%{name}/__init__.py[co]
88
89 %doc INSTALL TODO README
90 %{_mandir}/man8/%{name}.8*
91
92 %files bash-completions
93 %defattr(644,root,root,755)
94 %{_sysconfdir}/bash_completion.d/%{name}
This page took 0.075108 seconds and 3 git commands to generate.