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