]> git.pld-linux.org Git - packages/etckeeper.git/blame - etckeeper.spec
cleanup bogus python-modules dep; bzr is in subpackage
[packages/etckeeper.git] / etckeeper.spec
CommitLineData
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 6Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs)
9c5d38f1 7Name: etckeeper
fe7cbb49 8Version: 1.0
434b24b3 9Release: 0.5
9c5d38f1
ER
10License: GPL v2
11Group: Applications/System
12Source0: http://ftp.debian.org/debian/pool/main/e/etckeeper/%{name}_%{version}.tar.gz
fe7cbb49 13# Source0-md5: 1d7e402b41721f2a9ea0b217b969ba89
9c5d38f1 14URL: http://kitenet.net/~joey/code/etckeeper/
4e56ce8f 15BuildRequires: bzr
9c5d38f1
ER
16BuildRequires: rpm-pythonprov
17BuildRequires: rpmbuild(macros) >= 1.219
18BuildRequires: sed >= 4.0
434b24b3 19Requires: perl-base
d19ef4bd 20Suggests: %{name}-bash-completions
b11a8e3f 21Suggests: %{name}-bzr
d19ef4bd 22Suggests: git-core >= 1.6.1-1
9c5d38f1
ER
23Obsoletes: yum-etckeeper
24BuildArch: noarch
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
b11a8e3f 28The etckeeper program is a tool to let /etc be stored in a git,
9c5d38f1
ER
29mercurial, bzr or darcs repository. It hooks into APT to automatically
30commit changes made to /etc during package upgrades. It tracks file
31metadata that version control systems do not normally support, but
32that is important for /etc, such as the permissions of /etc/shadow.
33It's quite modular and configurable, while also being simple to use if
34you understand the basics of working with version control.
35
b11a8e3f
ER
36The default backend is git, if want to use a another backend please
37install the appropriate tool (mercurial, darcs or bzr). To use bzr as
38backend, please also install the %{name}-bzr package.
39
40To start using the package please read
41%{_docdir}/%{name}-%{version}/README
42
43%package bzr
44Summary: Support for bzr with etckeeper
45Group: Applications/System
46Requires: %{name} = %{version}-%{release}
47Requires: bzr
48
49%description bzr
50This package provides a bzr backend for etckeeper, if you want to use
51etckeeper with bzr backend, install this package.
52
04edd612
ER
53%package -n bash-completion-%{name}
54Summary: Bash completion routines for %{name}
d19ef4bd
CM
55Group: Applications/Shells
56Requires: %{name} = %{version}-%{release}
57Requires: bash-completion
04edd612 58Obsoletes: etckeeper-bash-completions
d19ef4bd 59
04edd612
ER
60%description -n bash-completion-%{name}
61Bash completion routines for etckeeper.
d19ef4bd 62
9c5d38f1 63%prep
fe7cbb49
ER
64%setup -qc
65mv %{name} .tmp
66mv .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
76rm -rf $RPM_BUILD_ROOT
b11a8e3f 77install -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
84install -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
91rm -rf $RPM_BUILD_ROOT
92
b11a8e3f
ER
93%if 0
94%post
95if [ $1 -gt 1 ] ; then
96 %{_bindir}/%{name} update-ignore
97fi
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}
This page took 0.104919 seconds and 4 git commands to generate.