[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 928 2010-09-01 15:53:50Z joergs $
|
---|
[200] | 7 |
|
---|
[214] | 8 | Name: dasscm
|
---|
[745] | 9 | URL: https://trac.dass-it.de/pub/
|
---|
[214] | 10 | License: GPL
|
---|
| 11 | Group: Development/Tools/Version Control
|
---|
| 12 | Autoreqprov: on
|
---|
[899] | 13 | Summary: Dass Configuration Management
|
---|
[921] | 14 | Version: 1.2
|
---|
[214] | 15 | Release: 0
|
---|
[915] | 16 | Requires: subversion perl
|
---|
| 17 | # perl-TermReadKey:
|
---|
| 18 | # replaced ReadMode('noecho') by `stty -echo`
|
---|
| 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
|
---|
[272] | 31 | #%if 0%{?suse_version} > 1100
|
---|
| 32 | #BuildRequires: subversion
|
---|
| 33 | #%endif
|
---|
[263] | 34 |
|
---|
[200] | 35 |
|
---|
| 36 | %description
|
---|
[245] | 37 | dasscm is a tool for handling configuration files with subversion
|
---|
[200] | 38 |
|
---|
| 39 | Authors:
|
---|
| 40 | --------
|
---|
| 41 | Joerg Steffens
|
---|
| 42 |
|
---|
| 43 | %prep
|
---|
[745] | 44 | %setup -c
|
---|
[200] | 45 |
|
---|
| 46 |
|
---|
| 47 |
|
---|
| 48 | %build
|
---|
| 49 |
|
---|
[896] | 50 |
|
---|
[200] | 51 | %install
|
---|
| 52 | mkdir -p $RPM_BUILD_ROOT/usr/bin/
|
---|
[882] | 53 | install -m 755 usr/bin/dasscm $RPM_BUILD_ROOT/usr/bin/
|
---|
| 54 | install -m 755 usr/bin/dasscm_remote_update.sh $RPM_BUILD_ROOT/usr/bin/
|
---|
[266] | 55 | mkdir -p $RPM_BUILD_ROOT/etc/
|
---|
[882] | 56 | install -m 640 etc/dasscm.conf $RPM_BUILD_ROOT/etc/
|
---|
[214] | 57 | mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/
|
---|
[916] | 58 | mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/plugin-results/
|
---|
[905] | 59 | %if %(test -d /etc/bash_completion.d/ && echo 1 || echo 0)
|
---|
[896] | 60 | %define use_bash_completion 1
|
---|
[898] | 61 | mkdir -p $RPM_BUILD_ROOT/etc/bash_completion.d/
|
---|
[900] | 62 | install -m 644 etc/bash_completion.d/bash_completion_dasscm.sh $RPM_BUILD_ROOT/etc/bash_completion.d/dasscm.sh
|
---|
[905] | 63 | %endif
|
---|
| 64 | %if %(test -d /etc/nagios/nrpe.d/ && echo 1 || echo 0)
|
---|
[902] | 65 | %define use_nagios_nrpe_d 1
|
---|
| 66 | mkdir -p $RPM_BUILD_ROOT/etc/nagios/nrpe.d/
|
---|
| 67 | install -m 644 etc/nagios/nrpe.d/nrpe-dasscm.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.d/dasscm.cfg
|
---|
[903] | 68 | %endif
|
---|
[921] | 69 | # /etc/sudoers.d/ is still uncommon, but very useful,
|
---|
| 70 | # therefore it is always created
|
---|
| 71 | mkdir -p $RPM_BUILD_ROOT/etc/sudoers.d/
|
---|
[928] | 72 | install -m 440 etc/sudoers.d/nagios_dasscm_check $RPM_BUILD_ROOT/etc/sudoers.d/
|
---|
[200] | 73 |
|
---|
| 74 |
|
---|
[265] | 75 |
|
---|
[200] | 76 | %clean
|
---|
[896] | 77 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
---|
[200] | 78 |
|
---|
[281] | 79 | # TODO: group dasscm: 4199
|
---|
[282] | 80 | # without existing group, %attr(640,root,4199) falls back to root
|
---|
[763] | 81 | # groupadd -g 4199 dasscm
|
---|
[200] | 82 |
|
---|
| 83 | %files
|
---|
| 84 | %defattr(-,root,root)
|
---|
[214] | 85 | %dir /var/lib/dasscm/
|
---|
[916] | 86 | %dir /var/lib/dasscm/plugin-results/
|
---|
[215] | 87 | /usr/bin/dasscm
|
---|
[807] | 88 | /usr/bin/dasscm_remote_update.sh
|
---|
[870] | 89 | %attr(640,root,root) %config(noreplace) /etc/dasscm.conf
|
---|
[265] | 90 | %doc Changes doc/* subversion-servers.dass-it
|
---|
[902] | 91 |
|
---|
[896] | 92 | %if 0%{?use_bash_completion}
|
---|
[921] | 93 | %config(noreplace) /etc/bash_completion.d/dasscm.sh
|
---|
[896] | 94 | %else
|
---|
[899] | 95 | %doc etc/bash_completion.d/bash_completion_dasscm.sh
|
---|
[896] | 96 | %endif
|
---|
[902] | 97 |
|
---|
| 98 | %if 0%{?use_nagios_nrpe_d}
|
---|
[921] | 99 | %config(noreplace) /etc/nagios/nrpe.d/dasscm.cfg
|
---|
[902] | 100 | %else
|
---|
| 101 | %doc etc/nagios/nrpe.d/nrpe-dasscm.cfg
|
---|
| 102 | %endif
|
---|
[921] | 103 |
|
---|
| 104 | # /etc/sudoers.d/ should not belong to dasscm,
|
---|
| 105 | # but is does currently not exist on most distributions
|
---|
| 106 | %dir /etc/sudoers.d/
|
---|
[927] | 107 | # sudo requires permissions 440 and config files without any "."
|
---|
| 108 | %attr(440,root,root) %config(noreplace) /etc/sudoers.d/nagios_dasscm_check
|
---|