[200] | 1 | #
|
---|
[1122] | 2 | # Copyright (c) 2004-2012 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 1122 2012-11-29 18:43:31Z 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
|
---|
[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
|
---|
[1122] | 31 | ##if 0#{?suse_version} > 1100
|
---|
[272] | 32 | #BuildRequires: subversion
|
---|
[1122] | 33 | ##endif
|
---|
[263] | 34 |
|
---|
[200] | 35 |
|
---|
| 36 | %description
|
---|
[245] | 37 | dasscm is a tool for handling configuration files with subversion
|
---|
[200] | 38 |
|
---|
| 39 | %prep
|
---|
[745] | 40 | %setup -c
|
---|
[200] | 41 |
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 | %build
|
---|
| 45 |
|
---|
[896] | 46 |
|
---|
[200] | 47 | %install
|
---|
[1122] | 48 | # call install script
|
---|
| 49 | ./dasscm.install.sh DESTDIR=$RPM_BUILD_ROOT
|
---|
[932] | 50 |
|
---|
[1122] | 51 | # handle special files, not useful on all distributions
|
---|
[905] | 52 | %if %(test -d /etc/bash_completion.d/ && echo 1 || echo 0)
|
---|
[896] | 53 | %define use_bash_completion 1
|
---|
[905] | 54 | %endif
|
---|
| 55 | %if %(test -d /etc/nagios/nrpe.d/ && echo 1 || echo 0)
|
---|
[902] | 56 | %define use_nagios_nrpe_d 1
|
---|
[903] | 57 | %endif
|
---|
[200] | 58 |
|
---|
| 59 |
|
---|
| 60 | %clean
|
---|
[896] | 61 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
---|
[200] | 62 |
|
---|
[281] | 63 | # TODO: group dasscm: 4199
|
---|
[1122] | 64 | # without existing group, #attr(640,root,4199) falls back to root
|
---|
[763] | 65 | # groupadd -g 4199 dasscm
|
---|
[200] | 66 |
|
---|
| 67 | %files
|
---|
| 68 | %defattr(-,root,root)
|
---|
[214] | 69 | %dir /var/lib/dasscm/
|
---|
[916] | 70 | %dir /var/lib/dasscm/plugin-results/
|
---|
[215] | 71 | /usr/bin/dasscm
|
---|
[807] | 72 | /usr/bin/dasscm_remote_update.sh
|
---|
[977] | 73 | %doc doc/* subversion-servers.dass-it
|
---|
[902] | 74 |
|
---|
[933] | 75 | %config(noreplace) %attr(640,root,root) /etc/dasscm.conf
|
---|
[1122] | 76 | %config(noreplace) /etc/profile.d/dasscm.sh
|
---|
[896] | 77 | %if 0%{?use_bash_completion}
|
---|
[933] | 78 | %config(noreplace) /etc/bash_completion.d/dasscm.sh
|
---|
[896] | 79 | %else
|
---|
[933] | 80 | %doc etc/bash_completion.d/bash_completion_dasscm.sh
|
---|
[896] | 81 | %endif
|
---|
[902] | 82 |
|
---|
| 83 | %if 0%{?use_nagios_nrpe_d}
|
---|
[933] | 84 | %config(noreplace) /etc/nagios/nrpe.d/dasscm.cfg
|
---|
[902] | 85 | %else
|
---|
[933] | 86 | %doc etc/nagios/nrpe.d/nrpe-dasscm.cfg
|
---|
[902] | 87 | %endif
|
---|
[921] | 88 |
|
---|
| 89 | # /etc/sudoers.d/ should not belong to dasscm,
|
---|
| 90 | # but is does currently not exist on most distributions
|
---|
| 91 | %dir /etc/sudoers.d/
|
---|
[927] | 92 | # sudo requires permissions 440 and config files without any "."
|
---|
| 93 | %attr(440,root,root) %config(noreplace) /etc/sudoers.d/nagios_dasscm_check
|
---|