#
-# TODO:
-# - separate subpackage with svnserve + init.d script + sysconfig file
+# todo:
+# - remove net_client_only and add db bcond (then without apache and
+# without db => net_client_only - spec will be more simpler, I think)
#
# Conditional build:
-%bcond_with internal_neon # build with internal neon
-%bcond_with net_client_only # build only net client
+%bcond_with internal_neon # build with internal neon
+%bcond_with net_client_only # build only net client
+%bcond_without python # build without python bindings
+%bcond_without perl # build without perl bindings
+%bcond_without apache # build without apache support (webdav, etc)
#
%include /usr/lib/rpm/macros.python
%{!?with_net_client_only:%include /usr/lib/rpm/macros.perl}
Summary(pl): System kontroli wersji podobny, ale lepszy, ni¿ CVS
Summary(pt_BR): Sistema de versionamento concorrente
Name: subversion
-Version: 0.33.1
-Release: 4
+Version: 1.0.5
+Release: 2
License: Apache/BSD Style
Group: Development/Version Control
-Source0: http://svn.collab.net/tarballs/%{name}-%{version}.tar.gz
-# Source0-md5: 2d45e838243cb0bc71c80582d089be15
+Source0: http://subversion.tigris.org/tarballs/%{name}-%{version}.tar.bz2
+# Source0-md5: 8e8288fee061f5278ec201fc5e5e141c
Source1: %{name}-dav_svn.conf
Source2: %{name}-authz_svn.conf
Source3: %{name}-svnserve.init
Source4: %{name}-svnserve.sysconfig
-Patch0: %{name}-perl.patch
+#Patch0: %{name}-svnlook.patch
+#Patch1: %{name}-hot_backup_num.patch
URL: http://subversion.tigris.org/
%if %{with net_client_only}
%global apache_modules_api 0
%else
-BuildRequires: apache-devel >= 2.0.47-0.6
+BuildRequires: automake
+%{?with_apache:BuildRequires: apache-devel >= 2.0.47-0.6}
BuildRequires: db-devel >= 4.1.25
BuildRequires: rpmbuild(macros) >= 1.120
-BuildRequires: swig >= 1.3.17
-BuildRequires: swig-python >= 1.3.17
-BuildRequires: perl-devel >= 5.8.0
-BuildRequires: rpm-perlprov
+%if %{with python} || %{with perl}
+BuildRequires: swig >= 1.3.19
+%endif
+%{?with_python:BuildRequires: swig-python >= 1.3.19}
+%if %{with perl}
+BuildRequires: swig-perl >= 1.3.19
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+%endif
%endif
BuildRequires: apr-devel >= 1:0.9.5
BuildRequires: apr-util-devel >= 1:0.9.5
-BuildRequires: autoconf >= 2.53
+BuildRequires: autoconf >= 2.59
BuildRequires: bison
BuildRequires: docbook-style-xsl >= 1.56
BuildRequires: expat-devel
BuildRequires: libtool >= 1.4-9
BuildRequires: libxslt-progs
-%{!?with_internal_neon:BuildRequires: neon-devel >= 0.24.1}
-BuildRequires: python >= 2.2
+%{!?with_internal_neon:BuildRequires: neon-devel >= 0.24.6}
+%if %{with python}
+BuildRequires: python-devel >= 2.2
BuildRequires: rpm-pythonprov >= 4.0.2-50
+%endif
BuildRequires: texinfo
+BuildRequires: which
+Requires: %{name}-libs = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _apachelibdir /usr/lib/apache
+%define _apachelibdir /usr/%{_lib}/apache
%define _libexecdir %{_libdir}/svn
%description
Summary(pl): Biblioteka subversion oraz ³adowalne modu³y
Group: Libraries
Obsoletes: libsubversion0
+%{!?with_internal_neon:Requires: neon >= 0.24.6}
%description libs
Subversion libraries and modules.
Summary(pl): Pliki nag³ówkowe i dokumetacja do subversion
Summary(pt_BR): Arquivos de desenvolvimento para o Subversion
Group: Development/Libraries
-Requires: %{name}-libs = %{version}
+Requires: %{name}-libs = %{version}-%{release}
+Requires: apr-util-devel >= 1:0.9.5
+%{!?with_internal_neon:Requires: neon-devel >= 0.24.6}
Obsoletes: libsubversion0-devel
%description devel
Group: Networking/Daemons
PreReq: rc-scripts
Requires(post,preun): /sbin/chkconfig
+Requires: %{name} = %{version}-%{release}
%description svnserve
Subversion svnserve server.
%pyrequires_eq python
Requires: python-rcsparse >= 0.1-0.20031026.0
Requires: python-subversion = %{version}
+Requires: %{name} = %{version}-%{release}
%description tools
Subversion tools and scripts.
Group: Development/Languages/Python
%pyrequires_eq python
Obsoletes: subversion-python
+Requires: %{name}-libs = %{version}-%{release}
%description -n python-subversion
Subversion python bindings.
Summary(pt_BR): Módulos perl para acessar os recursos do Subversion
Group: Development/Languages/Perl
Obsoletes: subversion-perl
+Requires: %{name}-libs = %{version}-%{release}
%description -n perl-subversion
Subversion perl bindings.
Requires: apache >= 2.0.47
Requires: apache(modules-api) = %{apache_modules_api}
Requires: apache-mod_dav
+Requires: %{name} = %{version}-%{release}
%description -n apache-mod_dav_svn
Apache module: Subversion Server.
Summary: Apache module: Subversion Server - path-based authorization
Summary(pl): Modu³ apache: autoryzacja na podstawie ¶cie¿ki dla serwera Subversion
Group: Networking/Daemons
-Requires: apache-mod_dav_svn = %{version}
+Requires: apache-mod_dav_svn = %{version}-%{release}
Requires: apache >= 2.0.47
Requires: apache(modules-api) = %{apache_modules_api}
%prep
%setup -q
-%patch0 -p1
+#%patch0 -p0
+#%patch1 -p1
+
+rm -rf apr-util{,/xml/expat}/autom4te.cache
%build
+cp -f /usr/share/automake/config.sub ac-helpers
chmod +x ./autogen.sh && ./autogen.sh
# don't enable dso - currently it's broken
%else
--disable-dso \
--disable-mod-activation \
+%if %{with apache}
--with-apxs=%{_sbindir}/apxs \
+%else
+ --without-apache \
+ --without-apxs \
--with-berkeley-db=%{_includedir}/db4:%{_libdir} \
+%endif
+%if !%{with python} && !%{with perl}
+ --without-swig \
+%endif
%endif
%{!?with_internal_neon:--with-neon=%{_prefix}} \
--with-apr=%{_bindir}/apr-config \
%{__make}
-%if ! %{with net_client_only}
+%if !%{with net_client_only}
# python
+%if %{with python}
%{__make} swig-py \
swig_pydir=%{py_sitedir}/libsvn \
swig_pydir_extra=%{py_sitedir}/svn
+%endif
# perl
+%if %{with perl}
bdir=$(pwd)
%{__make} install-swig-pl-lib \
LC_ALL=C \
%{__make}
cd subversion/bindings/swig/perl
env APR_CONFIG=%{_bindir}/apr-config \
+ APU_CONFIG=%{_bindir}/apu-config \
%{__perl} Makefile.PL \
INSTALLDIRS=vendor
env LIBRARY_PATH=${bdir}/swig-pl-lib-buildroot%{_libdir} %{__make}
cd ../../../../
%endif
+%endif
# build documentation; build process for documentation is severely
# braindamaged -- authors suggests to untar docbook distribution in
# build directory, hence the hack here
-%{__make} -C doc/book all-html \
- XSL_DIR=/usr/share/sgml/docbook/xsl-stylesheets/
+ln -s /usr/share/sgml/docbook/xsl-stylesheets doc/book/tools/xsl
+%{__make} -C doc/book all-html
# prepare for %%doc below
mv -f doc/book/book/html-chunk svn-handbook
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
-install -d $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}}
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,bash_completion.d} \
+ $RPM_BUILD_ROOT{%{_sysconfdir}/httpd/httpd.conf,%{_apachelibdir},%{_infodir}} \
+ $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version},python-%{name}-%{version}} \
+ $RPM_BUILD_ROOT/home/services/subversion
%{__make} install \
LC_ALL=C \
- %{!?with_net_client_only:install-swig-py} \
+%if !%{with net_client_only} && %{with python}
+ install-swig-py \
+%endif
DESTDIR=$RPM_BUILD_ROOT \
swig_pydir=%{py_sitedir}/libsvn \
swig_pydir_extra=%{py_sitedir}/svn
-%if ! %{with net_client_only}
+%if !%{with net_client_only} && %{with perl}
%{__make} install-swig-pl-lib \
LC_ALL=C \
DESTDIR=$RPM_BUILD_ROOT
DESTDIR=$RPM_BUILD_ROOT
%endif
+%if %{with apache}
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/65_mod_dav_svn.conf
install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/66_mod_authz_svn.conf
install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve
install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/svnserve
+%endif
install doc/programmer/design/*.info* $RPM_BUILD_ROOT%{_infodir}/
-%if ! %{with net_client_only}
-install tools/cvs2svn/cvs2svn.py $RPM_BUILD_ROOT%{_bindir}/cvs2svn
-install tools/cvs2svn/cvs2svn.1 $RPM_BUILD_ROOT%{_mandir}/man1
-cp tools/cvs2svn/README tools/cvs2svn/README.cvs2svn
-
+%if !%{with net_client_only}
+install tools/backup/hot-backup.py $RPM_BUILD_ROOT%{_bindir}/svn-hot-backup
+%if %{with python}
%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" -o -name "*.a" -o -name "*.la" | xargs rm -f
+install tools/examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
%endif
+%endif
+
+install tools/client-side/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}
+install tools/examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%clean
rm -rf $RPM_BUILD_ROOT
if [ -f /var/lock/subsys/svnserve ]; then
/etc/rc.d/init.d/svnserve restart 1>&2
else
+ if [ ! -d /home/services/subversion/repos ]; then
+ echo "Creating default repository in /home/services/subversion/repos..."
+ svnadmin create /home/services/subversion/repos
+ fi
echo "Run \"/etc/rc.d/init.d/svnserve start\" to start subversion svnserve daemon."
fi
-
%preun svnserve
if [ "$1" = "0" ]; then
if [ -f /var/lock/subsys/svnserve ]; then
fi
fi
+
%post -n apache-mod_dav_svn
if [ -f /var/lock/subsys/httpd ]; then
/etc/rc.d/init.d/httpd restart 1>&2
%doc svn-handbook doc/book/misc-docs/misc-docs.html
%doc tools/hook-scripts/*.{pl,py,example}
%doc tools/hook-scripts/mailer/*.{py,example}
+%doc tools/xslt/*
%attr(755,root,root) %{_bindir}/svn*
%exclude %{_bindir}/svnserve
+%exclude %{_bindir}/svn-hot-backup
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%files devel
%defattr(644,root,root,755)
%{_includedir}/%{name}*
-#%attr(755,root,root) %{_bindir}/svn-config
%attr(755,root,root) %{_libdir}/lib*.so
%{_libdir}/lib*.la
%{_infodir}/svn*
+%{_examplesdir}/%{name}-%{version}
%files static
%defattr(644,root,root,755)
%{_libdir}/lib*.a
-%if ! %{with net_client_only}
+%if !%{with net_client_only}
%files svnserve
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/svnserve
%{_mandir}/man?/svnserve*
+%dir /home/services/subversion
+%if %{with apache}
%attr(754,root,root) /etc/rc.d/init.d/svnserve
%attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/svnserve
+%endif
%files tools
%defattr(644,root,root,755)
-%doc tools/cvs2svn/README*
-%attr(755,root,root) %{_bindir}/cvs*
-%{_mandir}/man1/cvs*
+%attr(755,root,root) %{_bindir}/svn-hot-backup
+/etc/bash_completion.d/%{name}
+%if %{with python}
%files -n python-subversion
%defattr(644,root,root,755)
%doc tools/backup/*.py tools/examples/*.py
%{py_sitedir}/svn/*.py[co]
%{py_sitedir}/libsvn/*.py[co]
%attr(755,root,root) %{py_sitedir}/libsvn/*.so
+%{_examplesdir}/python-%{name}-%{version}
+%endif
+%if %{with perl}
%files -n perl-subversion
%defattr(644,root,root,755)
%{perl_vendorarch}/SVN
%attr(755,root,root) %{perl_vendorarch}/auto/SVN/*/*.so
%{perl_vendorarch}/auto/SVN/*/*.bs
%{_mandir}/man3/*.3pm*
+%endif
+%if %{with apache}
%files -n apache-mod_dav_svn
%defattr(644,root,root,755)
%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_dav_svn.conf
%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/*_mod_authz_svn.conf
%attr(755,root,root) %{_apachelibdir}/mod_authz_svn.so
%endif
+%endif