[200] | 1 | #
|
---|
[1159] | 2 | # Copyright (c) 2004-2013 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 1159 2013-10-19 22:26:05Z joergs $
|
---|
[200] | 7 |
|
---|
[214] | 8 | Name: dasscm
|
---|
[745] | 9 | URL: https://trac.dass-it.de/pub/
|
---|
[1122] | 10 | License: GPL-2.0+
|
---|
[214] | 11 | Group: Development/Tools/Version Control
|
---|
| 12 | Autoreqprov: on
|
---|
[1122] | 13 | Summary: DASS Configuration Management
|
---|
[921] | 14 | Version: 1.2
|
---|
[214] | 15 | Release: 0
|
---|
[915] | 16 | Requires: subversion perl
|
---|
[1122] | 17 | # perl-TermReadKey:
|
---|
| 18 | # replaced ReadMode('noecho') by `stty -echo`
|
---|
[915] | 19 | # to reduce dependencies
|
---|
[746] | 20 | Source: %{name}_%{version}.orig.tar.gz
|
---|
[232] | 21 | BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
---|
[214] | 22 | BuildArch: noarch
|
---|
[246] | 23 | %if 0%{?suse_version}
|
---|
[214] | 24 | BuildRequires: gzip pam-modules tar
|
---|
[232] | 25 | %endif
|
---|
[1123] | 26 | #BuildRequires: nagios-nrpe
|
---|
[264] | 27 |
|
---|
[265] | 28 | # Subversion should be installed during build
|
---|
| 29 | # to have the directory /etc/subversion/ available.
|
---|
| 30 | # Unfortunally, it isn't included in all distributions,
|
---|
| 31 | # therefore we added some checks
|
---|
[1122] | 32 | ##if 0#{?suse_version} > 1100
|
---|
[272] | 33 | #BuildRequires: subversion
|
---|
[1122] | 34 | ##endif
|
---|
[263] | 35 |
|
---|
[200] | 36 |
|
---|
| 37 | %description
|
---|
[245] | 38 | dasscm is a tool for handling configuration files with subversion
|
---|
[200] | 39 |
|
---|
| 40 | %prep
|
---|
[745] | 41 | %setup -c
|
---|
[200] | 42 |
|
---|
| 43 |
|
---|
| 44 |
|
---|
| 45 | %build
|
---|
| 46 |
|
---|
[896] | 47 |
|
---|
[200] | 48 | %install
|
---|
[1122] | 49 | # call install script
|
---|
| 50 | ./dasscm.install.sh DESTDIR=$RPM_BUILD_ROOT
|
---|
[932] | 51 |
|
---|
[1122] | 52 | # handle special files, not useful on all distributions
|
---|
[1123] | 53 | rm -f files
|
---|
| 54 | touch files
|
---|
| 55 | if test -e $RPM_BUILD_ROOT/etc/bash_completion.d/dasscm.sh; then
|
---|
| 56 | echo '%config(noreplace) /etc/bash_completion.d/dasscm.sh' >> files
|
---|
| 57 | else
|
---|
| 58 | echo '%doc etc/bash_completion.d/bash_completion_dasscm.sh' >> files
|
---|
| 59 | fi
|
---|
[200] | 60 |
|
---|
[1123] | 61 | if test -e $RPM_BUILD_ROOT/etc/nagios/nrpe.d/dasscm.cfg; then
|
---|
| 62 | test -d /etc/nagios || echo '%dir /etc/nagios' >> files
|
---|
| 63 | test -d /etc/nagios/nrpe.d || echo '%dir /etc/nagios/nrpe.d' >> files
|
---|
| 64 | echo '%config(noreplace) /etc/nagios/nrpe.d/dasscm.cfg' >> files
|
---|
| 65 | else
|
---|
| 66 | echo '%doc etc/nagios/nrpe.d/nrpe-dasscm.cfg' >> files
|
---|
| 67 | fi
|
---|
[200] | 68 |
|
---|
[1123] | 69 | #cat files
|
---|
| 70 |
|
---|
| 71 |
|
---|
[200] | 72 | %clean
|
---|
[896] | 73 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
---|
[200] | 74 |
|
---|
[281] | 75 | # TODO: group dasscm: 4199
|
---|
[1122] | 76 | # without existing group, #attr(640,root,4199) falls back to root
|
---|
[763] | 77 | # groupadd -g 4199 dasscm
|
---|
[200] | 78 |
|
---|
[1123] | 79 | %files -f files
|
---|
[200] | 80 | %defattr(-,root,root)
|
---|
[214] | 81 | %dir /var/lib/dasscm/
|
---|
[916] | 82 | %dir /var/lib/dasscm/plugin-results/
|
---|
[215] | 83 | /usr/bin/dasscm
|
---|
[807] | 84 | /usr/bin/dasscm_remote_update.sh
|
---|
[977] | 85 | %doc doc/* subversion-servers.dass-it
|
---|
[902] | 86 |
|
---|
[933] | 87 | %config(noreplace) %attr(640,root,root) /etc/dasscm.conf
|
---|
[1122] | 88 | %config(noreplace) /etc/profile.d/dasscm.sh
|
---|
[902] | 89 |
|
---|
[921] | 90 | # /etc/sudoers.d/ should not belong to dasscm,
|
---|
| 91 | # but is does currently not exist on most distributions
|
---|
| 92 | %dir /etc/sudoers.d/
|
---|
[927] | 93 | # sudo requires permissions 440 and config files without any "."
|
---|
| 94 | %attr(440,root,root) %config(noreplace) /etc/sudoers.d/nagios_dasscm_check
|
---|