Blob Blame Raw
%if 0%{?rhel} <= 5
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

Name:		dpm-contrib-admintools
Version:	0.2.5
Release:	1%{?dist}
Summary:	DPM administration toolkit (contrib from GridPP)
License:	ASL 2.0
URL:		http://www.gridpp.ac.uk/wiki/DPM-admin-tools
# The source of this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
#git clone http://gitlab.cern.ch/lcgdm/dpm-contrib-admintools.git
# cd dpm-contrib-admintools && git archive --prefix dpm-contrib-admintools-0.2.5/ tags/ dpm-contrib-admintools_0_2_5  | gzip > dpm-contrib-admintools-0.2.5.tar.gz
Source0:	%{name}-%{version}.tar.gz
# Use python2 instead of unversioned python, bug #1674826

BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:	cmake
BuildRequires:	perl-generators
BuildRequires:	python2-devel

Requires:	python2-dpm%{?_isa} >= 1.8.2
%if %{?fedora}%{!?fedora:0} >= 17 || %{?rhel}%{!?rhel:0} > 7
Requires: 	python2-mysql
%else
Requires:  	MySQL-python
%endif
Requires:	python2-paramiko

%description
This package provides a set of additional administration tools for the Disk
Pool Manager (DPM) service.

They provide easy to use commands to perform common sysadmin operations.

%prep
%setup -q -n %{name}-%{version}

%build
%cmake . -DCMAKE_INSTALL_PREFIX=/ -DPYTHON_SITELIB=%{python2_sitearch}

make %{?_smp_mflags}

%install
mkdir -p %{buildroot}

make install DESTDIR=%{buildroot}


%files
%{_bindir}/*
%{python2_sitearch}/*
%{_datadir}/*
%doc LICENSE README

%changelog
* Mon Jul 15 2019 Andrea Manzi <amanzi@cern.ch> - 0.2.5-1
- new upstream release

* Thu Jun 20 2019 Petr Pisar <ppisar@redhat.com> - 0.2.4-4
- Use python2 instead of unversioned python (bug #1674826)

* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Feb 20 2018 Andrea Manzi <amanzi@cern.ch> - 0.2.4-1
- new upstream release
- fix https://bugzilla.redhat.com/show_bug.cgi?id=1545172

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 24 2017 Andrea Manzi <amanzi@cern.ch> - 0.2.3-1
- added dpm-dump
- dpm-dbck enhancements

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu May 05 2016 Andrea Manzi <amanzi@cern.ch> - 0.2.2-1
- added dpm-dbck
- fixed dpm-sql-pfn-to-dpns

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Sep 22 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.2.1-7
- Update python-mysql requires

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Fri Jul 27 2012 Ricardo Rocha <ricardo.rocha@cern.ch> - 0.2.1-1
- Update for new upstream release  

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Jun 12 2012 Ricardo Rocha <ricardo.rocha@cern.ch> - 0.2.0-5
- Updated dpm python dependency

* Mon Jun 11 2012 Ricardo Rocha <ricardo.rocha@cern.ch> - 0.2.0-4
- Added dist tag to release number

* Tue Jun 08 2012 Ricardo Rocha <ricardo.rocha@cern.ch> - 0.2.0-3
- Rebuild for fedora push

* Tue Jun 05 2012 Ricardo Rocha <ricardo.rocha@cern.ch> - 0.2.0-2
- Up release for proper make and isa dependencies fixes

* Tue May 15 2012 Ricardo Rocha <ricardo.rocha@cern.ch> - 0.2.0-1
- Update for new upstream release
- Build moved to cmake from distutils

* Tue Feb 21 2012 Ricardo Rocha <ricardo.rocha@cern.ch> - 0.1.2-1
- Initial build