File subversion-doc.spec of Package subversion-doc

# spec file for package subversion-doc (Version 1.6.svn3791)
# Copyright (c) 2010 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

# norootforbuild

Name:           subversion-doc
BuildRequires:  docbook-xsl-stylesheets docbook2x libxslt
Version:        1.6.svn3791
Release:        1
BuildArch:      noarch
%define	docbook_xsl_version	1.72.0
%define apache_sysconfdir /etc/apache2
Summary:        Documentation files for Subversion
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
License:        ASLv..
Group:          Development/Tools/Version Control
Source0:        subversion-doc.svnbook-trunk.tar.bz2
Source2:        subversion.doc.conf
Patch0:         subversion-doc.svn.version.patch

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

%setup -q -T -c -a 0 -a 1
%patch0 -p0

mv -v docbook-xsl-%{docbook_xsl_version} svnbook-trunk/src/tools//xsl
cd svnbook-trunk/src/en/
make all-html SVNVERSION=/bin/false

cd svnbook-trunk/src/en/
make install-book-html SVNVERSION=/bin/false INSTALL_DIR=$RPM_BUILD_ROOT%{_defaultdocdir}/subversion/html
mkdir -p $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d
cp -av %{S:2} $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