openmamba logo
GNU/Linux distribution
distribution community wiki forum bugs events products
software   community wiki forum bugs events products
packages subversion.spec
      Pages: < 1 >  DOWNLOAD      
%ifarch %{ix86} x86_64
%define        with_java_subpackage  1
%else
%define        with_java_subpackage  0
%endif
%define        with_perl_subpackage  1
##%define        make_check           1
%define        majversion            %(echo %version | cut -d. -f 1)
%define        swigdirs              swig_pydir=%{python_sitearch}/libsvn swig_pydir_extra=%{python_sitearch}/svn
%define        svn2cl_version        0.11
Name:          subversion
Version:       1.6.17
Release:       3mamba
Summary:       A version control system that is a compelling replacement for CVS
Group:         Development/Tools
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
URL:           http://subversion.tigris.org/
Source0:       http://subversion.tigris.org/tarballs/%{name}-%{version}.tar.bz2
Source1:       http://www.xsteve.at/prg/emacs/psvn.el
Source2:       psvn-init.el
# http://bugs.debian.org/546990
Patch0:        subversion-1.6.5-newlines.patch
Patch1:        subversion-1.6.0-deplibs.patch
Patch2:        subversion-1.6.1-rpath.patch
Patch3:        subversion-1.6.0-pie.patch
Patch4:        subversion-1.6.0-java.patch
Patch5:        subversion-1.6.6-kwallet.patch
Patch6:        subversion-1.6.0-ruby185.patch
License:       Apache License, BSD
BuildRequires: apache
BuildRequires: apache-devel
BuildRequires: gettext-devel
%if %{with_java_subpackage}
BuildRequires: jpackage-utils
%endif
BuildRequires: libapr1-devel
BuildRequires: libaprutil1-devel
BuildRequires: libmysql5-devel
BuildRequires: libneon-devel
BuildRequires: libopenssl-devel
BuildRequires: libpostgresql-devel
BuildRequires: libz-devel
BuildRequires: perl
BuildRequires: perl-Config-IniFiles
BuildRequires: python
BuildRequires: ruby-devel
#BuildRequires: sun-java
BuildRequires: swig
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libapr-devel
BuildRequires: libdb51-devel
BuildRequires: libe2fs-devel
BuildRequires: libexpat-devel
BuildRequires: libgcc
BuildRequires: libgdbm-devel
BuildRequires: libkrb5-devel
BuildRequires: libmysql5-devel
BuildRequires: libneon-devel
BuildRequires: libopenldap-devel
BuildRequires: libopenssl-devel
BuildRequires: libpostgresql-devel
BuildRequires: libpython-devel
BuildRequires: libsasl-devel
BuildRequires: libsqlite-devel
BuildRequires: libstdc++6-devel
BuildRequires: libz-devel
BuildRequires: perl-Config-IniFiles
BuildRequires: perl-devel
BuildRequires: ruby-devel
## AUTOBUILDREQ-END
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
A version control system that is a compelling replacement for CVS.

%package -n apache-mod_svn
Summary:       Subversion module for Apache Web Server
Group:         System/Servers
Requires:      apache
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}

%description -n apache-mod_svn
This package adds Subversion support to the Apache Web Server.

%package devel
Summary:       Devel package for %{name}
Group:         Development/Libraries
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}

%description devel
A version control system that is a compelling replacement for CVS.

This package contains static libraries and header files need for development.

%if %{with_java_subpackage}
%package  -n java-subversion
Group:         Development/Libraries/Java
Summary:       JNI bindings to the Subversion libraries
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      jpackage-utils
Requires:      sun-java

%description  -n java-subversion
This package includes the JNI bindings to the Subversion libraries.

%endif

%if %{with_perl_subpackage}
%package perl
Summary:       Perl bindings to the Subversion libraries
Group:         Development/Libraries/Perl
Requires:      perl
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      perl-Config-IniFiles

%description perl
A version control system that is a compelling replacement for CVS.

This package includes the Perl bindings to the Subversion libraries.
%endif

%package  -n ruby-subversion
Group:         Development/Libraries
Summary:       Ruby bindings to the Subversion libraries
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}

%description  -n ruby-subversion
This package includes the Ruby bindings to the Subversion libraries.

%package svn2cl
Group:         Development/Tools
Summary:       Create a ChangeLog from a Subversion log
Provides:      svn2cl = %{svn2cl_version}-5
Requires:      libxslt
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}

%description svn2cl
svn2cl is a simple XSL transformation and shell script wrapper forgenerating a classic GNU-style ChangeLog from a subversion repository log. It is made from several changelog-like scripts using common XSLT constructs found in different places.

%prep
%setup -q
pushd contrib/client-side/svn2cl
%patch0 -p1 -b .newlines
popd
%patch1 -p1 -b .deplibs
%patch2 -p1 -b .rpath
#patch3 -p1 -b .pie
%if %{with_java_subpackage}
%patch4 -p1
%endif
#%patch5 -p1 -b .kwallet
%patch6 -p1

sed -i -e 's|^XSL="$dir/|XSL="%{_datadir}/svn2cl/|' \
	contrib/client-side/svn2cl/svn2cl.sh
v=$(contrib/client-side/svn2cl/svn2cl.sh -V | sed -n '1{s/.* //;p;}')
if [ "$v" != "%{svn2cl_version}" ]; then
	echo -n "ERROR: svn2cl_version not up to date in specfile: "
	echo "'$v' <> '%{svn2cl_version}'"
	exit 1
fi

%build
# executing autogen.sh because there are problems with libtool and libs creation
#./autogen.sh
#autoheader && autoconf && ./gen-make.py --reload
./autogen.sh --release

perl -pi -e 's|/usr/bin/env perl -w|%{__perl} -w|' tools/hook-scripts/*.pl.in

export svn_cv_ruby_link="%{__cc} -shared"
export svn_cv_ruby_sitedir_libsuffix=""
export svn_cv_ruby_sitedir_archsuffix=""

## force compilation with last version of libapr and libaprutil
#unset JAVA_HOME
export CC=gcc CXX=g++
# JAVA_HOME=/opt/java/jdk
%configure \
	--with-apr=%{_bindir}/apr-1-config \
	--with-apr-util=%{_bindir}/apu-1-config \
	--with-neon=%{_prefix} \
	--with-swig \
	--with-zlib=%{_prefix} \
	--with-ssl=%{_prefix} \
	--with-neon=%{_prefix} \
	--with-apxs=%{_sbindir}/apxs \
	--with-ruby-sitedir=%{ruby_sitearch} \
	--with-sasl=%{_prefix}

%make all

make swig-py swig-py-lib %{swigdirs}
make swig-rb swig-rb-lib

%if %{with_java_subpackage}
make javahl-java javahl-javah
make javahl
%endif

%if %{with_perl_subpackage}
pushd subversion/bindings/swig/perl/native
	perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor
popd

make swig-pl swig-pl-lib

%endif

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%makeinstall

# svn-config isn't quite built correctly; it contains references to
# @SVN_DB_LIBS@ and @SVN_DB_INCLUDES@... It appears the best thing is
# to remove that.
#sed -i 's/@SVN_DB_[^@]*@//g' svn-config
#install -D -m 755 svn-config \
#   %{buildroot}%{_bindir}/svn-config

%if %{with_java_subpackage}
make install-javahl-java install-javahl-lib javahl_javadir=%{_javadir} DESTDIR=%{buildroot}
%endif

make install-swig-rb  \
       DESTDIR=%{buildroot} 

make install-swig-py  \
       DESTDIR=%{buildroot} %{swigdirs}

%if %{with_perl_subpackage}
%makeinstall_perl -C subversion/bindings/swig/perl/native
packlist=`find %{buildroot} -name .packlist`
[ -z "$packlist" ] && exit 1 || cat $packlist | \
   sed "s,%{buildroot},,g;s,.*/man/.*,&.gz,g" | \
   sort -u > .packlist && rm $packlist

strid=`echo $packlist | sed 's,.*auto\(.*\)/.packlist,\1,'`
for dir in `find %{buildroot} -type d | grep $strid`; do
   echo "%dir ${dir#%buildroot}" >> .packlist
done
%endif

find %{buildroot}%{_libdir}/perl5 -type f -perm 555 -print0 |
        xargs -0 chmod 755

rm -rf tools/*/*.in tools/test-scripts

#for f in emacs/site-lisp xemacs/site-packages/lisp; do
#	mkdir -p %{buildroot}%{_datadir}/$f
#	install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/$f
#done

#install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/emacs/site-lisp

mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/svn2cl
mkdir -p %{buildroot}%{_mandir}/man1
pushd contrib/client-side/svn2cl
	install -pm 755 svn2cl.sh %{buildroot}%{_bindir}/svn2cl
	install -pm 644 *.xsl %{buildroot}%{_datadir}/svn2cl
	install -pm 644 svn2cl.1 %{buildroot}%{_mandir}/man1/
popd

%find_lang %{name}

#%if %{make_check}
##heck
#export LANG=C LC_ALL=C
#ake check check-swig-pl check-swig-py CLEANUP=yes
# check-swig-rb omitted: it runs svnserve
#endif

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
rm -f .packlist

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%post -n apache-mod_svn
if [ $1 -eq 1 ]; then
   #install
   # please note: the modules order matters
   apxs -e -a -n dav_svn %{_libdir}/apache/mod_dav_svn.so > /dev/null
   apxs -e -a -n authz_svn %{_libdir}/apache/mod_authz_svn.so > /dev/null
   %{_initrddir}/httpd condrestart
fi
:

%postun -n apache-mod_svn
if [ $1 -eq 0 ]; then
   #erase
   sed -i "/mod_authz_svn.so/d" %{_sysconfdir}/httpd/httpd.conf
   sed -i "/mod_dav_svn.so/d" %{_sysconfdir}/httpd/httpd.conf
   %{_initrddir}/httpd condrestart
fi
:
%if %{with_java_subpackage}
%post -n java-subversion -p /sbin/ldconfig

%postun -n java-subversion -p /sbin/ldconfig
%endif

%post -n ruby-subversion -p /sbin/ldconfig

%postun -n ruby-subversion -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/*
%exclude %{_bindir}/svn2cl
%{_libdir}/libsvn_*.so.*
%exclude %{_libdir}/libsvn_swig_ruby-1.so*
%{python_sitearch}/svn
%{python_sitearch}/libsvn
%{_mandir}/man1/*
%exclude %{_mandir}/man1/svn2cl.1*
%{_mandir}/man5/*
%{_mandir}/man8/*
%doc COPYING
%doc subversion/LICENSE

%files -n apache-mod_svn
%defattr(-,root,root)
%{_libdir}/apache/*.so

%files devel
%defattr(-,root,root)
%dir %{_includedir}/subversion-%{majversion}
%{_includedir}/subversion-%{majversion}/*
%{_libdir}/libsvn_*.so
%{_libdir}/libsvn_*.a
%{_libdir}/libsvn_*.la
%exclude %{_libdir}/libsvn_swig_ruby-1.*a
%exclude %{_libdir}/libsvn_swig_ruby-1.so*
%doc BUGS CHANGES README

%if %{with_java_subpackage}
%files -n java-subversion
%defattr(-,root,root)
%{_libdir}/libsvnjavahl-1.*a
%{_libdir}/libsvnjavahl-1.so*
%{_javadir}/svn-javahl.jar
%endif

%files -n ruby-subversion
%defattr(-,root,root)
%{_libdir}/libsvn_swig_ruby-1.*a
%{_libdir}/libsvn_swig_ruby-1.so*
%dir %{ruby_sitearch}/svn
%{ruby_sitearch}/svn/*

%if %{with_perl_subpackage}
%files perl -f .packlist
%defattr(-,root,root)
%endif

%files svn2cl
%defattr(-,root,root)
%{_bindir}/svn2cl
%{_datadir}/svn2cl
%{_mandir}/man1/svn2cl.1.gz
#%doc contrib/client-side/svn2cl/NEWS contrib/client-side/svn2cl/README
#%doc contrib/client-side/svn2cl/TODO contrib/client-side/svn2cl/authors.xml
#%doc contrib/client-side/svn2cl/svn2html.css

%changelog
* Sat Aug 13 2011 Silvan Calarco <silvan.calarco@...> 1.6.17-3mamba
- update to 1.6.17 (rebase from milestone1-contrib adding java and ruby subpackages)

* Wed Dec 16 2009 gil <puntogil@...> 1.6.6-1mamba
- update to 1.6.6

* Wed Jul 29 2009 gil <puntogil@...> 1.6.3-1mamba
- update to 1.6.3

* Fri Apr 10 2009 gil <puntogil@...> 1.5.5-1mamba
- update to 1.5.5

* Thu Apr 09 2009 gil <puntogil@...> 1.4.6-3mamba
- edit spec file

* Thu Apr 09 2009 gil <puntogil@...> 1.4.6-2mamba
- edit spec file
- added java ruby bindings subpackages

* Sat Mar 21 2009 Silvan Calarco <silvan.calarco@...> 1.6.0-1mamba
- automatic update to 1.6.0 by autodist

* Fri Feb 27 2009 Silvan Calarco <silvan.calarco@...> 1.5.6-1mamba
- automatic update to 1.5.6 by autodist

* Tue Dec 23 2008 Silvan Calarco <silvan.calarco@...> 1.5.5-1mamba
- automatic update to 1.5.5 by autodist

* Thu Nov 06 2008 Silvan Calarco <silvan.calarco@...> 1.5.4-2mamba
- automatic rebuild by autodist

* Sat Oct 25 2008 Silvan Calarco <silvan.calarco@...> 1.5.4-1mamba
- automatic update to 1.5.4 by autodist

* Tue Oct 21 2008 Silvan Calarco <silvan.calarco@...> 1.5.3-1mamba
- automatic update to 1.5.3 by autodist

* Sun Sep 07 2008 Silvan Calarco <silvan.calarco@...> 1.5.2-1mamba
- automatic update to 1.5.2 by autodist

* Sun Feb 10 2008 Silvan Calarco <silvan.calarco@...> 1.4.6-1mamba
- update to 1.4.6

* Fri Jul 07 2006 Stefano Cotta Ramusino <stefano.cotta@...> 1.3.2-2qilnx
- added perl bindings subpackage
- added missing build requirement

* Tue Jun 13 2006 Stefano Cotta Ramusino <stefano.cotta@...> 1.3.2-1qilnx
- update to version 1.3.2 by autospec
- added missing build requirements

* Mon Aug 29 2005 Davide Madrisan <davide.madrisan@...> 1.2.3-1qilnx
- update to version 1.2.3 by autospec
- update dynamic linker run time bindings
- svn-config now provided by devel package

* Thu Jul 07 2005 Silvan Calarco <silvan.calarco@...> 1.2.1-1qilnx
- update to version 1.2.1 by autospec

* Mon Feb 07 2005 Silvan Calarco <silvan.calarco@...> 1.1.3-1qilnx
- package created by autospec