source: dasscm/trunk/dasscm.spec@ 1104

Last change on this file since 1104 was 977, checked in by joergs, on Dec 20, 2011 at 9:25:39 PM

build fix, cleanup

  • Property svn:keywords set to Id
File size: 3.4 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 977 2011-12-20 20:25:39Z 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
[921]14Version: 1.2
[214]15Release: 0
[915]16Requires: subversion perl
17# perl-TermReadKey:
18# replaced ReadMode('noecho') by `stty -echo`
19# to reduce dependencies
[746]20Source: %{name}_%{version}.orig.tar.gz
[232]21BuildRoot: %{_tmppath}/%{name}-%{version}-build
[214]22BuildArch: noarch
[246]23%if 0%{?suse_version}
[214]24BuildRequires: gzip pam-modules tar
[232]25%endif
[264]26
[265]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
[272]31#%if 0%{?suse_version} > 1100
32#BuildRequires: subversion
33#%endif
[263]34
[200]35
36%description
[245]37dasscm is a tool for handling configuration files with subversion
[200]38
39Authors:
40--------
41 Joerg Steffens
42
43%prep
[745]44%setup -c
[200]45
46
47
48%build
49
[896]50
[200]51%install
52mkdir -p $RPM_BUILD_ROOT/usr/bin/
[882]53install -m 755 usr/bin/dasscm $RPM_BUILD_ROOT/usr/bin/
54install -m 755 usr/bin/dasscm_remote_update.sh $RPM_BUILD_ROOT/usr/bin/
[932]55mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/
56mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/plugin-results/
57
[266]58mkdir -p $RPM_BUILD_ROOT/etc/
[882]59install -m 640 etc/dasscm.conf $RPM_BUILD_ROOT/etc/
[932]60mkdir -p $RPM_BUILD_ROOT/etc/profile.d/
61install -m 644 etc/profile.d/dasscm.sh $RPM_BUILD_ROOT/etc/profile.d/
62
[905]63%if %(test -d /etc/bash_completion.d/ && echo 1 || echo 0)
[896]64 %define use_bash_completion 1
[898]65 mkdir -p $RPM_BUILD_ROOT/etc/bash_completion.d/
[900]66 install -m 644 etc/bash_completion.d/bash_completion_dasscm.sh $RPM_BUILD_ROOT/etc/bash_completion.d/dasscm.sh
[905]67%endif
68%if %(test -d /etc/nagios/nrpe.d/ && echo 1 || echo 0)
[902]69 %define use_nagios_nrpe_d 1
70 mkdir -p $RPM_BUILD_ROOT/etc/nagios/nrpe.d/
71 install -m 644 etc/nagios/nrpe.d/nrpe-dasscm.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.d/dasscm.cfg
[903]72%endif
[921]73# /etc/sudoers.d/ is still uncommon, but very useful,
74# therefore it is always created
75mkdir -p $RPM_BUILD_ROOT/etc/sudoers.d/
[928]76install -m 440 etc/sudoers.d/nagios_dasscm_check $RPM_BUILD_ROOT/etc/sudoers.d/
[200]77
78
[265]79
[200]80%clean
[896]81[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
[200]82
[281]83# TODO: group dasscm: 4199
[282]84# without existing group, %attr(640,root,4199) falls back to root
[763]85# groupadd -g 4199 dasscm
[200]86
87%files
88%defattr(-,root,root)
[214]89%dir /var/lib/dasscm/
[916]90%dir /var/lib/dasscm/plugin-results/
[215]91/usr/bin/dasscm
[807]92/usr/bin/dasscm_remote_update.sh
[977]93%doc doc/* subversion-servers.dass-it
[902]94
[933]95%config(noreplace) %attr(640,root,root) /etc/dasscm.conf
96 /etc/profile.d/dasscm.sh
[896]97%if 0%{?use_bash_completion}
[933]98%config(noreplace) /etc/bash_completion.d/dasscm.sh
[896]99%else
[933]100%doc etc/bash_completion.d/bash_completion_dasscm.sh
[896]101%endif
[902]102
103%if 0%{?use_nagios_nrpe_d}
[933]104%config(noreplace) /etc/nagios/nrpe.d/dasscm.cfg
[902]105%else
[933]106%doc etc/nagios/nrpe.d/nrpe-dasscm.cfg
[902]107%endif
[921]108
109# /etc/sudoers.d/ should not belong to dasscm,
110# but is does currently not exist on most distributions
111%dir /etc/sudoers.d/
[927]112# sudo requires permissions 440 and config files without any "."
113%attr(440,root,root) %config(noreplace) /etc/sudoers.d/nagios_dasscm_check
Note: See TracBrowser for help on using the repository browser.