source: dasscm/trunk/dasscm.spec@ 1122

Last change on this file since 1122 was 1122, checked in by joergs, on Nov 29, 2012 at 7:43:31 PM

also use dasscm.install.sh, like debian. cleanup

  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1#
2# Copyright (c) 2004-2012 dass IT GmbH, Koeln, Germany.
3# This file and all modifications and additions to the pristine
4# package are under the same license as the package itself.
5#
6# $Id: dasscm.spec 1122 2012-11-29 18:43:31Z joergs $
7
8Name: dasscm
9URL: https://trac.dass-it.de/pub/
10License: GPL-2.0+
11Group: Development/Tools/Version Control
12Autoreqprov: on
13Summary: DASS Configuration Management
14Version: 1.2
15Release: 0
16Requires: subversion perl
17# perl-TermReadKey:
18# replaced ReadMode('noecho') by `stty -echo`
19# to reduce dependencies
20Source: %{name}_%{version}.orig.tar.gz
21BuildRoot: %{_tmppath}/%{name}-%{version}-build
22BuildArch: noarch
23%if 0%{?suse_version}
24BuildRequires: gzip pam-modules tar
25%endif
26
27# Subversion should be installed during build
28# to have the directory /etc/subversion/ available.
29# Unfortunally, it isn't included in all distributions,
30# therefore we added some checks
31##if 0#{?suse_version} > 1100
32#BuildRequires: subversion
33##endif
34
35
36%description
37dasscm is a tool for handling configuration files with subversion
38
39%prep
40%setup -c
41
42
43
44%build
45
46
47%install
48# call install script
49./dasscm.install.sh DESTDIR=$RPM_BUILD_ROOT
50
51# handle special files, not useful on all distributions
52%if %(test -d /etc/bash_completion.d/ && echo 1 || echo 0)
53 %define use_bash_completion 1
54%endif
55%if %(test -d /etc/nagios/nrpe.d/ && echo 1 || echo 0)
56 %define use_nagios_nrpe_d 1
57%endif
58
59
60%clean
61[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
62
63# TODO: group dasscm: 4199
64# without existing group, #attr(640,root,4199) falls back to root
65# groupadd -g 4199 dasscm
66
67%files
68%defattr(-,root,root)
69%dir /var/lib/dasscm/
70%dir /var/lib/dasscm/plugin-results/
71/usr/bin/dasscm
72/usr/bin/dasscm_remote_update.sh
73%doc doc/* subversion-servers.dass-it
74
75%config(noreplace) %attr(640,root,root) /etc/dasscm.conf
76%config(noreplace) /etc/profile.d/dasscm.sh
77%if 0%{?use_bash_completion}
78%config(noreplace) /etc/bash_completion.d/dasscm.sh
79%else
80%doc etc/bash_completion.d/bash_completion_dasscm.sh
81%endif
82
83%if 0%{?use_nagios_nrpe_d}
84%config(noreplace) /etc/nagios/nrpe.d/dasscm.cfg
85%else
86%doc etc/nagios/nrpe.d/nrpe-dasscm.cfg
87%endif
88
89# /etc/sudoers.d/ should not belong to dasscm,
90# but is does currently not exist on most distributions
91%dir /etc/sudoers.d/
92# sudo requires permissions 440 and config files without any "."
93%attr(440,root,root) %config(noreplace) /etc/sudoers.d/nagios_dasscm_check
Note: See TracBrowser for help on using the repository browser.