File subversion-doc.spec of Package subversion-doc
#
# spec file for package subversion-doc
#
# Copyright (c) 2011 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 http://bugs.opensuse.org/
#
# norootforbuild
Name: subversion-doc
BuildRequires: docbook-xsl-stylesheets docbook2x libxslt
Version: 1.6.svn3904
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: CC-BY 2.0
Group: Development/Tools/Version Control
Url: http://svnbook.red-bean.com/
Source0: subversion-doc.svnbook-trunk.tar.bz2
Source1: http://prdownloads.sourceforge.net/docbook/docbook-xsl-%{docbook_xsl_version}.tar.bz2
Source2: subversion.doc.conf
Patch0: subversion-doc.svn.version.patch
#
%description
This package contains the subversion book (see
http://svnbook.red-bean.com/) and a configuration file to make this
book accessible via apache2.
%prep
%setup -q -T -c -a 0 -a 1
%patch0 -p0
%build
mv -v docbook-xsl-%{docbook_xsl_version} svnbook-trunk/src/tools//xsl
cd svnbook-trunk/src/en/
make all-html SVNVERSION=/bin/false
%install
rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT
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
%files
%defattr(-,root,root)
#
%dir %{apache_sysconfdir}
%dir %{apache_sysconfdir}/conf.d
%config (noreplace) %{apache_sysconfdir}/conf.d/subversion.doc.conf
%dir %{_defaultdocdir}/subversion
%{_defaultdocdir}/subversion/html
%changelog