source: dasscm/trunk/dasscm.spec@ 915

Last change on this file since 915 was 915, checked in by joergs, on Jul 16, 2010 at 6:28:10 PM

replaced ReadMode('noecho') by to reduce dependencies

  • Property svn:keywords set to Id
File size: 2.6 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 915 2010-07-16 16:28:10Z 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
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
39Authors:
40--------
41 Joerg Steffens
42
43%prep
44%setup -c
45
46
47
48%build
49
50
51%install
52mkdir -p $RPM_BUILD_ROOT/usr/bin/
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/
55mkdir -p $RPM_BUILD_ROOT/etc/
56install -m 640 etc/dasscm.conf $RPM_BUILD_ROOT/etc/
57mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/
58%if %(test -d /etc/bash_completion.d/ && echo 1 || echo 0)
59 %define use_bash_completion 1
60 mkdir -p $RPM_BUILD_ROOT/etc/bash_completion.d/
61 install -m 644 etc/bash_completion.d/bash_completion_dasscm.sh $RPM_BUILD_ROOT/etc/bash_completion.d/dasscm.sh
62%endif
63%if %(test -d /etc/nagios/nrpe.d/ && echo 1 || echo 0)
64 %define use_nagios_nrpe_d 1
65 mkdir -p $RPM_BUILD_ROOT/etc/nagios/nrpe.d/
66 install -m 644 etc/nagios/nrpe.d/nrpe-dasscm.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.d/dasscm.cfg
67%endif
68
69
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
80%defattr(-,root,root)
81%dir /var/lib/dasscm/
82/usr/bin/dasscm
83/usr/bin/dasscm_remote_update.sh
84%attr(640,root,root) %config(noreplace) /etc/dasscm.conf
85%doc Changes doc/* subversion-servers.dass-it
86
87%if 0%{?use_bash_completion}
88%config /etc/bash_completion.d/dasscm.sh
89%else
90%doc etc/bash_completion.d/bash_completion_dasscm.sh
91%endif
92
93%if 0%{?use_nagios_nrpe_d}
94%config /etc/nagios/nrpe.d/dasscm.cfg
95%else
96%doc etc/nagios/nrpe.d/nrpe-dasscm.cfg
97%endif
Note: See TracBrowser for help on using the repository browser.