source: dasscm/trunk/dasscm.spec@ 1199

Last change on this file since 1199 was 1168, checked in by joergs, on Feb 4, 2014 at 4:46:31 PM

added dasscm_remote_check.sh

  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1#
2# Copyright (c) 2004-2013 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 1168 2014-02-04 15:46: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#BuildRequires: nagios-nrpe
27
28# Subversion should be installed during build
29# to have the directory /etc/subversion/ available.
30# Unfortunally, it isn't included in all distributions,
31# therefore we added some checks
32##if 0#{?suse_version} > 1100
33#BuildRequires: subversion
34##endif
35
36
37%description
38dasscm is a tool for handling configuration files with subversion
39
40%prep
41%setup -c
42
43
44
45%build
46
47
48%install
49# call install script
50./dasscm.install.sh DESTDIR=$RPM_BUILD_ROOT
51
52# handle special files, not useful on all distributions
53rm -f files
54touch files
55if test -e $RPM_BUILD_ROOT/etc/bash_completion.d/dasscm.sh; then
56 echo '%config(noreplace) /etc/bash_completion.d/dasscm.sh' >> files
57else
58 echo '%doc etc/bash_completion.d/bash_completion_dasscm.sh' >> files
59fi
60
61if test -e $RPM_BUILD_ROOT/etc/nagios/nrpe.d/dasscm.cfg; then
62 test -d /etc/nagios || echo '%dir /etc/nagios' >> files
63 test -d /etc/nagios/nrpe.d || echo '%dir /etc/nagios/nrpe.d' >> files
64 echo '%config(noreplace) /etc/nagios/nrpe.d/dasscm.cfg' >> files
65else
66 echo '%doc etc/nagios/nrpe.d/nrpe-dasscm.cfg' >> files
67fi
68
69#cat files
70
71
72%clean
73[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
74
75# TODO: group dasscm: 4199
76# without existing group, #attr(640,root,4199) falls back to root
77# groupadd -g 4199 dasscm
78
79%files -f files
80%defattr(-,root,root)
81%dir /var/lib/dasscm/
82%dir /var/lib/dasscm/plugin-results/
83/usr/bin/dasscm
84/usr/bin/dasscm_remote_check.sh
85/usr/bin/dasscm_remote_update.sh
86%doc doc/* subversion-servers.dass-it
87
88%config(noreplace) %attr(640,root,root) /etc/dasscm.conf
89%config(noreplace) /etc/profile.d/dasscm.sh
90
91# /etc/sudoers.d/ should not belong to dasscm,
92# but is does currently not exist on most distributions
93%dir /etc/sudoers.d/
94# sudo requires permissions 440 and config files without any "."
95%attr(440,root,root) %config(noreplace) /etc/sudoers.d/nagios_dasscm_check
Note: See TracBrowser for help on using the repository browser.