subversion/subversion.spec

339 lines
9.4 KiB
RPMSpec
Raw Normal View History

# If you don't have 360+ MB of free disk space or don't want to run checks then
# set make_check to 0.
%define make_check 0
# If you want to try to build cvs2svn then change build_cvs2svn to 1
%define build_cvs2svn 0
# XXX only client and libraries for now.
%define with_server 0
%define apache_version 2.0.42-0.1
%define apache_dir /usr
Summary: A Concurrent Versioning system similar to, but better than, CVS.
Name: subversion
Version: 0.17.1
Release: 4503.0
Copyright: BSD
Group: Development/Tools
URL: http://subversion.tigris.org
Prefix: %{_prefix}
Source0: http://subversion.tigris.org/files/documents/15/2123/subversion-r4503.tar.gz
Source1: subversion.conf
Source2: rcsparse.py
Source10: apr-0.9.1.tar.gz
Source11: apr-util-0.9.1.tar.gz
Patch0: install.patch
Patch1: cvs2svn.patch
Requires: /sbin/install-info
BuildPreReq: autoconf >= 2.53
BuildPreReq: db4-devel >= 4.0.14
BuildPreReq: expat-devel
BuildPreReq: gdbm-devel
BuildPreReq: libtool >= 1.4.2
BuildPreReq: openssl-devel
BuildPreReq: python
BuildPreReq: python-devel
%if %{with_server}
Requires: httpd-apr >= %{apache_version}
BuildPreReq: httpd >= %{apache_version}
BuildPreReq: httpd-devel >= %{apache_version}
BuildPreReq: httpd-apr-devel >= %{apache_version}
%endif
%if %{build_cvs2svn}
BuildPreReq: swig >= 1.3.15
%endif
BuildPreReq: texinfo
BuildPreReq: zlib-devel
BuildRoot: %{_tmppath}/%{name}-root
%description
Subversion is a concurrent version control system which enables one or more
users to collaborate in developing and maintaining a hierarchy of files and
directories while keeping a history of all changes. Subversion only stores
the differences between versions, instead of every complete file. Subversion
also keeps a log of who, when, and why changes occured.
As such it basically does the same thing CVS does (Concurrent Versioning System)
but has major enhancements compared to CVS and fixes a lot of the annoyances
that CVS users face.
*** Note: This is a relocatable package; it can be installed anywhere you like
with the "rpm -Uvh --prefix /your/favorite/path" command. This is useful
if you don't have root access on your machine but would like to use this
package.
%package devel
Group: Development/Tools
Summary: Development package for Subversion developers.
Requires: subversion = %{version}-%{release}
%description devel
The subversion-devel package includes the static libraries and include files
for developers interacting with the subversion package.
%if %{with_server}
%package server
Group: Development/Tools
Summary: Apache server module for Subversion server.
Requires: httpd >= %{apache_version}
Requires: httpd-apr >= %{apache_version}
Requires: subversion = %{version}-%{release}
BuildPreReq: httpd-devel >= %{apache_version}
%description server
The subversion-server package adds the Subversion server Apache module to
the Apache directories and configuration.
%endif
%if %{build_cvs2svn}
%package cvs2svn
Group: Development/Tools
Summary: Converts CVS repositories to Subversion repositories.
Requires: swig-runtime >= 1.3.15
%description cvs2svn
Converts CVS repositories to Subversion repositories.
See %{_docdir}/%{name}-%{version}/tools/cvs2svn directory for more information.
%endif
%prep
%setup -q -n subversion-r4503
#tar xzf %{SOURCE10}
#ln -s apr-[0-9]* apr
#tar xzf %{SOURCE11}
#ln -s apr-util-[0-9]* apr-util
sh autogen.sh
LDFLAGS="-L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_client/.libs \
-L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_delta/.libs \
-L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_fs/.libs \
-L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_repos/.libs \
-L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_ra/.libs \
-L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_ra_dav/.libs \
-L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_ra_local/.libs \
-L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_subr/.libs \
-L$RPM_BUILD_DIR/subversion-%{version}/subversion/libsvn_wc/.libs \
" %configure \
%if %{build_cvs2svn}
--with-swig \
%endif
--without-apxs
# Fix up mod_dav_svn installation.
%patch0 -p1
%if %{build_cvs2svn}
# Fix up cvs2svn python bindings
%patch1 -p1
%endif
%build
make
%if %{make_check}
make check
%endif
%if %{build_cvs2svn}
# Build cvs2svn python bindings
cd subversion/bindings/swig/python
/usr/bin/python setup.py build
%endif
%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}
# XXX avoid "perl(Config::IniFiles) >= 2.27" dependency
chmod -x ./tools/hook-scripts/commit-access-control.pl
%if %{with_server}
mkdir -p ${RPM_BUILD_ROOT}/%{apache_dir}/conf
%endif
%makeinstall \
fs_bindir=${RPM_BUILD_ROOT}%{_bindir} \
fs_libdir=${RPM_BUILD_ROOT}%{_libdir} \
base_libdir=${RPM_BUILD_ROOT}%{_libdir} \
installbuilddir=${RPM_BUILD_ROOT}%{_datadir}/build \
libexecdir=${RPM_BUILD_ROOT}%{apache_dir}/lib
# XXX Relocate the apr include files into a sub-directory.
( cd ${RPM_BUILD_ROOT}
mkdir -p .%{_includedir}/apr-0
mv .%{_includedir}/a*.h .%{_includedir}/apr-0
)
# XXX nuke unpackaged files
( cd ${RPM_BUILD_ROOT}
rm -rf .%{_datadir}/doc/neon-0.23.5/html/
)
%if %{with_server}
# Add subversion.conf configuration file into httpd/conf.d directory.
mkdir -p ${RPM_BUILD_ROOT}/etc/httpd/conf.d
cp %{SOURCE1} ${RPM_BUILD_ROOT}/etc/httpd/conf.d
%endif
%if %{build_cvs2svn}
# Install cvs2svn and supporting files
cd subversion/bindings/swig/python
/usr/bin/python setup.py install --prefix ${RPM_BUILD_ROOT}%{_prefix}
chmod a+x ${RPM_BUILD_ROOT}%{_bindir}/cvs2svn
cp %{SOURCE2} ${RPM_BUILD_ROOT}/usr/lib/python2.2/site-packages/svn
%endif
# XXX Nuke unpackaged files
( cd ${RPM_BUILD_ROOT}
rm -rf .%{_datadir}/build
mkdir -p .%{_datadir}/doc/%{name}-%{version}
mv .%{_datadir}/doc/neon-0.23.2 .%{_datadir}/doc/%{name}-%{version}
)
%clean
rm -rf ${RPM_BUILD_ROOT}
%post
/sbin/ldconfig
# Only add to INFO directory if this is the only instance installed.
if [ "$1"x = "1"x ]; then
if [ -x /sbin/install-info ]; then
/sbin/install-info %{_infodir}/svn-design.info.gz \
%{_infodir}/dir \
--entry='* Subversion-design: (svn-design). Subversion Versioning System Design Manual'
# /sbin/install-info %{_infodir}/svn-handbook.info.gz \
# %{_infodir}/dir \
# --entry='* Subversion: (svn-handbook). Subversion Versioning System Manual'
# /sbin/install-info %{_infodir}/svn-handbook-french.info.gz \
# %{_infodir}/dir \
# --entry='* Subversion-french: (svn-handbook-french). Guide du gestionnaire de version Subversion'
fi
fi
%preun
# Only delete from INFO directory if this is the last instance being deleted.
if [ "$1"x = "0"x ]; then
if [ -x /sbin/install-info ]; then
/sbin/install-info --delete %{_infodir}/svn-design.info.gz \
%{_infodir}/dir \
--entry='* Subversion-design: (svn-design). Subversion Versioning System Design Manual'
# /sbin/install-info --delete %{_infodir}/svn-handbook.info.gz \
# %{_infodir}/dir \
# --entry='* Subversion: (svn-handbook). Subversion Versioning System Manual'
# /sbin/install-info --delete %{_infodir}/svn-handbook-french.info.gz \
# %{_infodir}/dir \
# --entry='* Subversion-french: (svn-handbook-french). Guide du gestionnaire de version Subversion'
fi
fi
%postun -p /sbin/ldconfig
%if %{with_server}
%post server
# Restart apache server if needed.
source /etc/init.d/functions
if [ "`pidof httpd`"x != "x" ]; then
/etc/init.d/httpd restart
fi
%postun server
# Restart apache server if needed.
source /etc/init.d/functions
if [ "`pidof httpd`"x != "x" ]; then
/etc/init.d/httpd restart
fi
%endif
%files
%defattr(-,root,root)
%doc BUGS COMMITTERS COPYING HACKING IDEAS INSTALL PORTING README
%doc tools subversion/LICENSE
%{_bindir}/svn
%{_bindir}/svnadmin
%{_bindir}/svnlook
%{_bindir}/svnserve
%{_bindir}/svnversion
%{_libdir}/libsvn_auth*.so.*
%{_libdir}/libsvn_client*.so.*
%{_libdir}/libsvn_delta*.so.*
%{_libdir}/libsvn_fs*.so.*
%{_libdir}/libsvn_ra*.so.*
%{_libdir}/libsvn_repos*.so.*
%{_libdir}/libsvn_subr*.so.*
%{_libdir}/libsvn_wc*.so.*
%{_mandir}/man1/*
%{_infodir}/*
%{_libdir}/libapr*.so.*
%{_libdir}/libneon*.so.*
%files devel
%defattr(-,root,root)
%{_bindir}/svn-config
%{_includedir}/subversion-1
%{_libdir}/libsvn*.a
%{_libdir}/libsvn*.la
%{_bindir}/apr-config
%{_bindir}/apu-config
%{_includedir}/apr-*
%{_libdir}/apr*.exp
%{_libdir}/libapr*.a
%{_libdir}/libapr*.la
%{_bindir}/neon-config
%{_includedir}/neon
%{_libdir}/libneon*.a
%{_libdir}/libneon*.la
%{_mandir}/man3/*
%if %{with_server}
%files server
%defattr(-,root,root)
%config /etc/httpd/conf.d/subversion.conf
%{apache_dir}/lib/httpd/modules/mod_dav_svn.la
%{apache_dir}/lib/httpd/modules/mod_dav_svn.so
%endif
%if %{build_cvs2svn}
%files cvs2svn
%defattr(-,root,root)
%{_bindir}/cvs2svn
/usr/lib/python2.2/site-packages/svn
%endif
%changelog
* Wed Jan 22 2003 Jeff Johnson <jbj@redhat.com> 0.17.1-4503.0
- upgrade to 0.17.1.
* Wed Dec 11 2002 Jeff Johnson <jbj@redhat.com> 0.16-3987.1
- upgrade to 0.16.
* Wed Nov 13 2002 Jeff Johnson <jbj@redhat.com> 0.15-3687.2
- don't mess with the info handbook install yet.
* Sun Nov 10 2002 Jeff Johnson <jbj@redhat.com> 0.15-3687.1
- use libdir, build on x86_64 too.
- avoid "perl(Config::IniFiles) >= 2.27" dependency.
* Sat Nov 9 2002 Jeff Johnson <jbj@redhat.com> 0.15-3687.0
- first build from adapted spec file, only client and libraries for now.
- internal apr/apr-utils/neon until incompatibilities sort themselves out.
- avoid libdir issues on x86_64 for the moment.