subversion/subversion.spec

548 lines
17 KiB
RPMSpec
Raw Permalink Normal View History

%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.9.1
Release: 1mamba
Summary: A version control system that is a compelling replacement for CVS
Group: Development/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://subversion.apache.org/
Source0: http://mirror.nohup.it/apache/subversion/subversion-%{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
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libapr-devel
BuildRequires: libaprutil-devel
BuildRequires: libdb51-devel
BuildRequires: libdbus-devel
BuildRequires: libexpat-devel
BuildRequires: libffi-devel
BuildRequires: libgcc
BuildRequires: libgcrypt-devel
BuildRequires: libglib-devel
BuildRequires: libgnome-keyring-devel
BuildRequires: libgpg-error-devel
BuildRequires: libmagic-devel
BuildRequires: libpython-devel
BuildRequires: libsasl-devel
BuildRequires: libserf-devel
BuildRequires: libsqlite-devel
BuildRequires: libstdc++6-devel
BuildRequires: libuuid-devel
BuildRequires: libz-devel
BuildRequires: perl-devel
BuildRequires: ruby-devel
## AUTOBUILDREQ-END
BuildRequires: apache
BuildRequires: apache-devel
BuildRequires: gettext-devel
%if %{with_java_subpackage}
BuildRequires: jpackage-utils
BuildRequires: jdk
%endif
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: swig
BuildRequires: apache-devel >= 2.4.10
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}
%if %{with_java_subpackage}
Requires: java-subversion = %{?epoch:%epoch:}%{version}-%{release}
%endif
%if %{with_perl_subpackage}
Requires: perl-subversion = %{?epoch:%epoch:}%{version}-%{release}
%endif
Requires: python-subversion = %{?epoch:%epoch:}%{version}-%{release}
Requires: ruby-subversion = %{?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: jdk
%description -n java-subversion
This package includes the JNI bindings to the Subversion libraries.
%endif
%if %{with_perl_subpackage}
%package -n perl-subversion
Summary: Perl bindings to the Subversion libraries
Group: Development/Libraries/Perl
Requires: perl
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: perl-Config-IniFiles
Provides: subversion-perl
Obsoletes: subversion-perl
%description -n perl-subversion
A version control system that is a compelling replacement for CVS.
This package includes the Perl bindings to the Subversion libraries.
%endif
%package -n python-subversion
Group: Development/Libraries/Python
Summary: JNI bindings to the Subversion libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n python-subversion
This package includes the Python bindings to the Subversion libraries.
%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
sed -i 's,Makefile.PL.in$,& libsvn_swig_perl,' Makefile.in
%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++
%configure \
--with-apr=%{_bindir}/apr-1-config \
--with-apr-util=%{_bindir}/apu-1-config \
--with-neon=%{_prefix} \
--with-jdk=%{_jvmdir}/jdk \
--without-jikes \
--with-swig \
--with-zlib=%{_prefix} \
--with-ssl=%{_prefix} \
--with-neon=%{_prefix} \
--with-apxs=apxs \
--with-ruby-sitedir=%{ruby_sitearch} \
--with-sasl=%{_prefix} \
--with-serf \
--with-apache-libexecdir=%{_libdir}/apache
%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}
make install-swig-pl-lib \
DESTDIR=%{buildroot}
%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}%{_prefix}/lib/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 %{_libdir}/apache/mod_dav.so > /dev/null
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
systemctl -q reload-or-try-restart httpd
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
systemctl -q reload-or-try-restart httpd
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}/svn*
%{_libdir}/libsvn_auth_gnome_keyring-1.so.*
%{_libdir}/libsvn_client-1.so.*
%{_libdir}/libsvn_delta-1.so.*
%{_libdir}/libsvn_diff-1.so.*
%{_libdir}/libsvn_fs-1.so.*
%{_libdir}/libsvn_fs_base-1.so.*
%{_libdir}/libsvn_fs_fs-1.so.*
%{_libdir}/libsvn_fs_util-1.so.*
%{_libdir}/libsvn_fs_x-1.so.*
%{_libdir}/libsvn_ra-1.so.*
%{_libdir}/libsvn_ra_local-1.so.*
%{_libdir}/libsvn_ra_serf-1.so.*
%{_libdir}/libsvn_ra_svn-1.so.*
%{_libdir}/libsvn_repos-1.so.*
%{_libdir}/libsvn_subr-1.so.*
%{_libdir}/libsvn_wc-1.so.*
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%doc 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
%{_datadir}/pkgconfig/libsvn_*.pc
%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.so.*
%dir %{ruby_sitearch}/svn
%{ruby_sitearch}/svn/*
%if %{with_perl_subpackage}
%files -n perl-subversion -f .packlist
%defattr(-,root,root)
%{_libdir}/libsvn_swig_perl-1.so.*
%endif
%files -n python-subversion
%defattr(-,root,root)
%{_libdir}/libsvn_swig_py-1.so.*
%{python_sitearch}/svn
%{python_sitearch}/libsvn
#%files svn2cl
#%defattr(-,root,root)
#%{_bindir}/svn2cl
#%{_datadir}/svn2cl
#%{_mandir}/man1/svn2cl.1.gz
%changelog
* Fri Sep 04 2015 Automatic Build System <autodist@mambasoft.it> 1.9.1-1mamba
- automatic version update by autodist
* Tue Aug 18 2015 Automatic Build System <autodist@mambasoft.it> 1.9.0-1mamba
- automatic version update by autodist
* Wed Apr 15 2015 Automatic Build System <autodist@mambasoft.it> 1.8.13-1mamba
- automatic version update by autodist
* Fri Dec 19 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8.11-2mamba
- also enable mod_dav on install to fix https://www.centos.org/forums/viewtopic.php?t=27767
* Tue Dec 16 2014 Automatic Build System <autodist@mambasoft.it> 1.8.11-1mamba
- automatic version update by autodist
* Fri Aug 22 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8.10-2mamba
- rebuilt with apache 2.4.10
* Tue Aug 12 2014 Automatic Build System <autodist@mambasoft.it> 1.8.10-1mamba
- automatic version update by autodist
* Thu May 15 2014 Automatic Build System <autodist@mambasoft.it> 1.8.9-1mamba
- automatic version update by autodist
* Fri Feb 21 2014 Automatic Build System <autodist@mambasoft.it> 1.8.8-1mamba
- automatic version update by autodist
* Sat Dec 14 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8.5-3mamba
- build with libserf to fix http* download
- new package python-subversion
* Wed Nov 27 2013 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 1.8.5-2mamba
- add perl bindings dependencies upon libsvn_swig_perl-1.so
* Tue Nov 26 2013 Automatic Build System <autodist@mambasoft.it> 1.8.5-1mamba
- automatic version update by autodist
* Wed Oct 30 2013 Automatic Build System <autodist@mambasoft.it> 1.8.4-1mamba
- automatic version update by autodist
* Fri Aug 30 2013 Automatic Build System <autodist@mambasoft.it> 1.8.3-1mamba
- automatic update by autodist
* Thu Jul 25 2013 Automatic Build System <autodist@mambasoft.it> 1.8.1-1mamba
- automatic version update by autodist
* Wed Jun 19 2013 Automatic Build System <autodist@mambasoft.it> 1.8.0-1mamba
- automatic version update by autodist
* Sun Jun 02 2013 Automatic Build System <autodist@mambasoft.it> 1.7.10-1mamba
- automatic version update by autodist
* Fri Apr 05 2013 Automatic Build System <autodist@mambasoft.it> 1.7.9-1mamba
- automatic version update by autodist
* Fri Dec 21 2012 Automatic Build System <autodist@mambasoft.it> 1.7.8-1mamba
- automatic version update by autodist
* Mon Nov 12 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.7.7-2mamba
- perl 5.16 mass rebuild
* Wed Oct 10 2012 Automatic Build System <autodist@mambasoft.it> 1.7.7-1mamba
- automatic version update by autodist
* Wed Aug 22 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.7.6-2mamba
- require jdk, not sun-java
* Wed Aug 15 2012 Automatic Build System <autodist@mambasoft.it> 1.7.6-1mamba
- automatic version update by autodist
* Tue Jun 26 2012 Automatic Build System <autodist@mambasoft.it> 1.7.5-1mamba
- automatic version update by autodist
* Tue Apr 10 2012 Automatic Build System <autodist@mambasoft.it> 1.7.4-1mamba
- update to 1.7.4
* Sat Aug 13 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.17-3mamba
- update to 1.6.17 (rebase from milestone1-contrib adding java and ruby subpackages)
* Wed Dec 16 2009 gil <puntogil@libero.it> 1.6.6-1mamba
- update to 1.6.6
* Wed Jul 29 2009 gil <puntogil@libero.it> 1.6.3-1mamba
- update to 1.6.3
* Fri Apr 10 2009 gil <puntogil@libero.it> 1.5.5-1mamba
- update to 1.5.5
* Thu Apr 09 2009 gil <puntogil@libero.it> 1.4.6-3mamba
- edit spec file
* Thu Apr 09 2009 gil <puntogil@libero.it> 1.4.6-2mamba
- edit spec file
- added java ruby bindings subpackages
* Sat Mar 21 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.0-1mamba
- automatic update to 1.6.0 by autodist
* Fri Feb 27 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 1.5.6-1mamba
- automatic update to 1.5.6 by autodist
* Tue Dec 23 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.5.5-1mamba
- automatic update to 1.5.5 by autodist
* Thu Nov 06 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.5.4-2mamba
- automatic rebuild by autodist
* Sat Oct 25 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.5.4-1mamba
- automatic update to 1.5.4 by autodist
* Tue Oct 21 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.5.3-1mamba
- automatic update to 1.5.3 by autodist
* Sun Sep 07 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.5.2-1mamba
- automatic update to 1.5.2 by autodist
* Sun Feb 10 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4.6-1mamba
- update to 1.4.6
* Fri Jul 07 2006 Stefano Cotta Ramusino <stefano.cotta@qilinux.it> 1.3.2-2qilnx
- added perl bindings subpackage
- added missing build requirement
* Tue Jun 13 2006 Stefano Cotta Ramusino <stefano.cotta@qilinux.it> 1.3.2-1qilnx
- update to version 1.3.2 by autospec
- added missing build requirements
* Mon Aug 29 2005 Davide Madrisan <davide.madrisan@qilinux.it> 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@mambasoft.it> 1.2.1-1qilnx
- update to version 1.2.1 by autospec
* Mon Feb 07 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.3-1qilnx
- package created by autospec