# 
# Copyright  (c)  2004-2010  dass IT GmbH, Koeln, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# $Id: dasscm.spec 870 2010-05-08 12:06:26Z joergs $

Name:           dasscm
URL:            https://trac.dass-it.de/pub/
License:        GPL
Group:          Development/Tools/Version Control
Autoreqprov:    on
Summary:        dass configuration management tool
Version:        1.0
Release:        0
Requires:       subversion perl perl-TermReadKey
Source:         %{name}_%{version}.orig.tar.gz
Packager:       joerg.steffens@dass-it.de
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%if 0%{?suse_version}
BuildRequires:  gzip pam-modules tar
%endif

# Subversion should be installed during build 
# to have the directory /etc/subversion/ available.
# Unfortunally, it isn't included in all distributions,
# therefore we added some checks
#%if 0%{?suse_version} > 1100
#BuildRequires:  subversion
#%endif
 

%description
dasscm is a tool for handling configuration files with subversion

Authors:
--------
       Joerg Steffens

%prep
%setup -c



%build

%install
mkdir -p $RPM_BUILD_ROOT/usr/bin/
install -m 755 dasscm $RPM_BUILD_ROOT/usr/bin/
install -m 755 dasscm_remote_update.sh $RPM_BUILD_ROOT/usr/bin/
mkdir -p $RPM_BUILD_ROOT/etc/
install -m 640 dasscm.conf $RPM_BUILD_ROOT/etc/
mkdir -p $RPM_BUILD_ROOT/var/lib/dasscm/
#if -d $RPM_BUILD_ROOT/etc/subversion/
#	install -m 644 subversion-servers.dass-it $RPM_BUILD_ROOT/etc/subversion/servers.dass-it
#fi




%clean
rm -rf $RPM_BUILD_ROOT

# TODO: group dasscm: 4199
#       without existing group, %attr(640,root,4199)  falls back to root
#       groupadd -g 4199 dasscm

%files
%defattr(-,root,root)
%dir /var/lib/dasscm/
/usr/bin/dasscm
/usr/bin/dasscm_remote_update.sh
%attr(640,root,root) %config(noreplace) /etc/dasscm.conf
%doc Changes doc/* subversion-servers.dass-it
