source: dasscm/trunk/dasscm.spec@ 909

Last change on this file since 909 was 905, checked in by joergs, on Jun 27, 2010 at 12:13:59 PM

bugfixes: rpm defines for nrpe and bash completion

  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1#
2# Copyright (c) 2004-2010 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 905 2010-06-27 10:13:59Z joergs $
7
8Name: dasscm
9URL: https://trac.dass-it.de/pub/
10License: GPL
11Group: Development/Tools/Version Control
12Autoreqprov: on
13Summary: Dass Configuration Management
14Version: 1.0
15Release: 0
16Requires: subversion perl perl-TermReadKey
17Source: %{name}_%{version}.orig.tar.gz
18BuildRoot: %{_tmppath}/%{name}-%{version}-build
19BuildArch: noarch
20%if 0%{?suse_version}
21BuildRequires: gzip pam-modules tar
22%endif
23
24# Subversion should be installed during build
25# to have the directory /etc/subversion/ available.
26# Unfortunally, it isn't included in all distributions,
27# therefore we added some checks
28#%if 0%{?suse_version} > 1100
29#BuildRequires: subversion
30#%endif
31
32
33%description
34dasscm is a tool for handling configuration files with subversion
35
36Authors:
37--------
38 Joerg Steffens
39
40%prep
41%setup -c
42
43
44
45%build
46
47
48%install
49mkdir -p $RPM_BUILD_ROOT/usr/bin/
50install -m 755 usr/bin/dasscm $RPM_BUILD_ROOT/usr/bin/
51install -m 755 usr/bin/dasscm_remote_update.sh $RPM_BUILD_ROOT/usr/bin/
52mkdir -p $RPM_BUILD_ROOT/etc/
53install -m 640 etc/dasscm.conf $RPM_BUILD_ROOT/etc/
54mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/
55%if %(test -d /etc/bash_completion.d/ && echo 1 || echo 0)
56 %define use_bash_completion 1
57 mkdir -p $RPM_BUILD_ROOT/etc/bash_completion.d/
58 install -m 644 etc/bash_completion.d/bash_completion_dasscm.sh $RPM_BUILD_ROOT/etc/bash_completion.d/dasscm.sh
59%endif
60%if %(test -d /etc/nagios/nrpe.d/ && echo 1 || echo 0)
61 %define use_nagios_nrpe_d 1
62 mkdir -p $RPM_BUILD_ROOT/etc/nagios/nrpe.d/
63 install -m 644 etc/nagios/nrpe.d/nrpe-dasscm.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.d/dasscm.cfg
64%endif
65
66
67
68
69%clean
70[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
71
72# TODO: group dasscm: 4199
73# without existing group, %attr(640,root,4199) falls back to root
74# groupadd -g 4199 dasscm
75
76%files
77%defattr(-,root,root)
78%dir /var/lib/dasscm/
79/usr/bin/dasscm
80/usr/bin/dasscm_remote_update.sh
81%attr(640,root,root) %config(noreplace) /etc/dasscm.conf
82%doc Changes doc/* subversion-servers.dass-it
83
84%if 0%{?use_bash_completion}
85%config /etc/bash_completion.d/dasscm.sh
86%else
87%doc etc/bash_completion.d/bash_completion_dasscm.sh
88%endif
89
90%if 0%{?use_nagios_nrpe_d}
91%config /etc/nagios/nrpe.d/dasscm.cfg
92%else
93%doc etc/nagios/nrpe.d/nrpe-dasscm.cfg
94%endif
Note: See TracBrowser for help on using the repository browser.