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 |
|
---|
8 | Name: dasscm
|
---|
9 | URL: https://trac.dass-it.de/pub/
|
---|
10 | License: GPL
|
---|
11 | Group: Development/Tools/Version Control
|
---|
12 | Autoreqprov: on
|
---|
13 | Summary: Dass Configuration Management
|
---|
14 | Version: 1.0
|
---|
15 | Release: 0
|
---|
16 | Requires: subversion perl perl-TermReadKey
|
---|
17 | Source: %{name}_%{version}.orig.tar.gz
|
---|
18 | BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
---|
19 | BuildArch: noarch
|
---|
20 | %if 0%{?suse_version}
|
---|
21 | BuildRequires: 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
|
---|
34 | dasscm is a tool for handling configuration files with subversion
|
---|
35 |
|
---|
36 | Authors:
|
---|
37 | --------
|
---|
38 | Joerg Steffens
|
---|
39 |
|
---|
40 | %prep
|
---|
41 | %setup -c
|
---|
42 |
|
---|
43 |
|
---|
44 |
|
---|
45 | %build
|
---|
46 |
|
---|
47 |
|
---|
48 | %install
|
---|
49 | mkdir -p $RPM_BUILD_ROOT/usr/bin/
|
---|
50 | install -m 755 usr/bin/dasscm $RPM_BUILD_ROOT/usr/bin/
|
---|
51 | install -m 755 usr/bin/dasscm_remote_update.sh $RPM_BUILD_ROOT/usr/bin/
|
---|
52 | mkdir -p $RPM_BUILD_ROOT/etc/
|
---|
53 | install -m 640 etc/dasscm.conf $RPM_BUILD_ROOT/etc/
|
---|
54 | mkdir -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
|
---|