Name:       nordugrid-arc-ur-logger
Version:    5.0.0
Release:    1%{?dist}
Summary:    Nordugrid ARC deprecated ur-logger accounting tools
Group:      System Environment/Base
License:    ASL 2.0

%global pkgdir arc

URL:        http://trac.grid.org.ua/repos/workarea/arc-misc/arc-ur-logger
#           The source was created from a svn checkout
#           svn export https://trac.grid.org.ua/repos/workarea/arc-misc/arc-ur-logger arc-ur-logger
#           tar -z -c -f arc-ur-logger.tar.gz arc-ur-logger
Source0:    arc-ur-logger.tar.gz  

BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:  noarch

Conflicts:  nordugrid-arc-arex <= 4.2.0
Requires:   nordugrid-arc-arex >= 5.0.0
Requires:   voms-clients 

%description
This package provides deprecated ARC ur-logger accounting tools removed from
Nordugrid ARC since version 5.0.0 in favor of Jura.

%prep
%setup -q -n arc-ur-logger

%build
# notning to build

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_libexecdir}/%{pkgdir}/
mkdir -p %{buildroot}%{_mandir}/man8/
mkdir -p %{buildroot}%{_sysconfdir}/cron.d/

install -pm 755 arc-ur-logger \
    arc-ur-registrant \
    %{buildroot}%{_libexecdir}/arc/

install -pm 644 arc-ur-logger.8.in     %{buildroot}%{_mandir}/man8/arc-ur-logger.8
install -pm 644 arc-ur-registrant.8.in %{buildroot}%{_mandir}/man8/arc-ur-registrant.8

install -pm 644 arc-ur-registrant.cron %{buildroot}%{_sysconfdir}/cron.d/arc-ur-registrant

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%attr(755,root,root) %{_libexecdir}/%{pkgdir}/arc-ur-logger 
%attr(755,root,root) %{_libexecdir}/%{pkgdir}/arc-ur-registrant 
%{_sysconfdir}/cron.d/arc-ur-registrant
%{_mandir}/man8/arc-ur-logger.8*
%{_mandir}/man8/arc-ur-registrant.8*
%doc urlogger.pdf

%changelog
* Thu Apr 2 2015 Andrii Salnikov <manf@grid.org.ua> - 5.0.0-1
- ur-logger has been deprecated, so standalone package time comes
* Fri May  2 2014 Andrii Salnikov <manf@grid.org.ua> - 4.1.0-1
- Initial standalone packege of ur-logger