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