File cvs2svn.spec of Package cvs2svn

#
# spec file for package cvs2svn (Version 2.3.0)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

%{!?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))")}
%{!?py_ver:          %global pyver %(%__python -c 'import sys; print sys.version[:3]')}

Name:           cvs2svn
%if 0%{?sles_version} >= 9 && 0%{?sles_version} < 10
BuildRequires:  python25-devel
Requires:       python25
%else
BuildRequires:  python-devel >= 2.4
Requires:       python >= %{py_ver}, python < %{py_ver}.99
%endif
Version:        2.3.0
Release:        2
Requires:       rcs
Requires:       subversion
Provides:       subversion-cvs2svn = %{version}
Obsoletes:      subversion-cvs2svn < %{version}
Group:          Development/Tools/Version Control
Url:            http://cvs2svn.tigris.org/
#
PreReq:         %insserv_prereq %fillup_prereq
#
Summary:        Converts CVS repositories to Subversion repositories
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
License:        ASLv2
Group:          Development/Tools/Version Control
# http://cvs2svn.tigris.org/files/documents/1462/46528/cvs2svn-%{version}.tar.gz
Source0:        cvs2svn-%{version}.tar.bz2
Source99:       cvs2svn-rpmlintrc
Patch0:         cvs2svn.install-prefix.patch
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif
%py_requires
#

%description
Converts CVS repositories to Subversion repositories.

See /usr/share/doc/packages/cvs2svn directory for more information.



%prep
%setup -q
#
%patch0
# replace shebang for python with %__python
%__perl -ni -e 'if (1..1 && m/^#!(.+python)(\s+.+)?$/) {print "#!%__python".$2."\n";} else {print}' cvs2{svn,bzr,git}

%build

%install
%__make install DESTDIR="$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%doc {BUGS,COMMITTERS,COPYING,README,www/{faq,features,cvs2*}.html}
%doc *-example.options
%attr(755,root,root) %{_bindir}/cvs2svn
%attr(755,root,root) %{_bindir}/cvs2bzr
%attr(755,root,root) %{_bindir}/cvs2git
%dir %{python_sitelib}/cvs2svn_rcsparse
%{python_sitelib}/cvs2svn*

%changelog