source: dasscm/trunk/dasscm.spec@ 912

Last change on this file since 912 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
RevLine 
[200]1#
[870]2# Copyright (c) 2004-2010 dass IT GmbH, Koeln, Germany.
[200]3# This file and all modifications and additions to the pristine
4# package are under the same license as the package itself.
5#
[214]6# $Id: dasscm.spec 905 2010-06-27 10:13:59Z joergs $
[200]7
[214]8Name: dasscm
[745]9URL: https://trac.dass-it.de/pub/
[214]10License: GPL
11Group: Development/Tools/Version Control
12Autoreqprov: on
[899]13Summary: Dass Configuration Management
[747]14Version: 1.0
[214]15Release: 0
[234]16Requires: subversion perl perl-TermReadKey
[746]17Source: %{name}_%{version}.orig.tar.gz
[232]18BuildRoot: %{_tmppath}/%{name}-%{version}-build
[214]19BuildArch: noarch
[246]20%if 0%{?suse_version}
[214]21BuildRequires: gzip pam-modules tar
[232]22%endif
[264]23
[265]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
[272]28#%if 0%{?suse_version} > 1100
29#BuildRequires: subversion
30#%endif
[263]31
[200]32
33%description
[245]34dasscm is a tool for handling configuration files with subversion
[200]35
36Authors:
37--------
38 Joerg Steffens
39
40%prep
[745]41%setup -c
[200]42
43
44
45%build
46
[896]47
[200]48%install
49mkdir -p $RPM_BUILD_ROOT/usr/bin/
[882]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/
[266]52mkdir -p $RPM_BUILD_ROOT/etc/
[882]53install -m 640 etc/dasscm.conf $RPM_BUILD_ROOT/etc/
[214]54mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/
[905]55%if %(test -d /etc/bash_completion.d/ && echo 1 || echo 0)
[896]56 %define use_bash_completion 1
[898]57 mkdir -p $RPM_BUILD_ROOT/etc/bash_completion.d/
[900]58 install -m 644 etc/bash_completion.d/bash_completion_dasscm.sh $RPM_BUILD_ROOT/etc/bash_completion.d/dasscm.sh
[905]59%endif
60%if %(test -d /etc/nagios/nrpe.d/ && echo 1 || echo 0)
[902]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
[903]64%endif
[200]65
66
[265]67
68
[200]69%clean
[896]70[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
[200]71
[281]72# TODO: group dasscm: 4199
[282]73# without existing group, %attr(640,root,4199) falls back to root
[763]74# groupadd -g 4199 dasscm
[200]75
76%files
77%defattr(-,root,root)
[214]78%dir /var/lib/dasscm/
[215]79/usr/bin/dasscm
[807]80/usr/bin/dasscm_remote_update.sh
[870]81%attr(640,root,root) %config(noreplace) /etc/dasscm.conf
[265]82%doc Changes doc/* subversion-servers.dass-it
[902]83
[896]84%if 0%{?use_bash_completion}
[900]85%config /etc/bash_completion.d/dasscm.sh
[896]86%else
[899]87%doc etc/bash_completion.d/bash_completion_dasscm.sh
[896]88%endif
[902]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.