File subversion-doc.spec of Package subversion-doc

# spec file for package subversion-doc
# Copyright (c) 2012 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

Name:           subversion-doc
BuildRequires:  docbook-xsl-stylesheets
BuildRequires:  libxslt
%if 0%{?suse_version} > 1210
BuildRequires:  libxml2-tools
Version:        1.7.r4252
Release:        0
BuildArch:      noarch
%define apache_sysconfdir /etc/apache2
Summary:        Documentation files for Subversion
License:        CC-BY-2.0
Group:          Development/Tools/Version Control
# from
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %{name}-%{version}.tar.bz2
Source1:        subversion.doc.conf

This package contains the subversion book (see and a configuration file to make this
book accessible via apache2.

%setup -q
ln -sv /usr/share/xml/docbook/stylesheet/nwalsh/current/ tools/xsl

cd en
SVNVERSION=`echo "%{version}" | sed -r "s/[0-9]+\.[0-9]+\.(r[0-9]+)/\1/"`
sed -i "s/&svn\.version;/${SVNVERSION}/g" book/book.xml
%__make book-html SVNVERSION=/bin/false

cd en
%__make install-html SVNVERSION=/bin/false INSTALL_DIR=$RPM_BUILD_ROOT%{_defaultdocdir}/subversion/html
install -m 644 -D %{S:1} $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d/subversion.doc.conf
find $RPM_BUILD_ROOT -type d -print0 | xargs -0 chmod 755
find $RPM_BUILD_ROOT -type f -print0 | xargs -0 chmod 644

%dir %{apache_sysconfdir}
%dir %{apache_sysconfdir}/conf.d
%config (noreplace) %{apache_sysconfdir}/conf.d/subversion.doc.conf
%dir %{_defaultdocdir}/subversion

openSUSE Build Service is sponsored by