packaging/RHEL-CTDB: do not use an external docs tarball
[metze/samba/wip.git] / packaging / RHEL-CTDB / samba.spec.tmpl
index c4fa5de31d79e57d590068888c87f80ee9d8bb77..6abdb6b3874c326c2ec6881c313389d457a8acd4 100644 (file)
@@ -15,7 +15,6 @@ URL: http://www.samba.org/
 Source: samba-%{version}.tar.bz2
 
 # Don't depend on Net::LDAP
-Source997: docs.tar.bz2
 Source998: filter-requires-samba.sh
 Source999: setup.tar.bz2
 
@@ -29,6 +28,8 @@ Provides: samba = %{version}
 Prefix: /usr
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: pam-devel, readline-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel, ctdb, e2fsprogs-devel
+# requirements for building the man pages:
+BuildRequires: libxslt, docbook-utils, docbook-style-xsl
 
 # Working around perl dependency problem from docs
 %define __perl_requires %{SOURCE998}
@@ -123,7 +124,6 @@ utilized by SWAT as well as the HTML and PDF version of "Using Samba",
 
 # setup the vendor files (init scripts, etc...)
 %setup -T -D -a 999 -n samba-%{version} -q
-%setup -T -D -a 997 -n samba-%{version} -q
 
 %build
 
@@ -279,8 +279,11 @@ do
        fi
 done
 
-# Remove some permission bits to avoid to many dependencies
+# try and build the manpages
 cd ..
+./release-scripts/build-manpages-nogit || tar xjf packaging/RHEL-CTDB/manpages.tar.bz2
+
+# Remove some permission bits to avoid to many dependencies
 find examples docs -type f | xargs -r chmod -x
 
 %install
@@ -370,10 +373,6 @@ ln -s ../..%{initdir}/winbind  $RPM_BUILD_ROOT%{_sbindir}/winbind
 # Remove "*.old" files
 find $RPM_BUILD_ROOT -name "*.old" -exec rm -f {} \;
 
-## don't duplicate the docs.  These are installed by/with SWAT
-rm -rf docs/htmldocs
-rm -rf docs/manpages
-( cd docs; ln -s %{_prefix}/share/swat/help htmldocs )
 
 ##
 ## Clean out man pages for tools not installed here
@@ -517,10 +516,19 @@ exit 0
 
 %files doc
 %defattr(-,root,root)
-%doc README COPYING Manifest 
-%doc WHATSNEW.txt Roadmap
-%doc docs
-%doc examples/autofs examples/LDAP examples/libsmbclient examples/misc examples/printer-accounting
+%doc README
+%doc COPYING
+%doc Manifest 
+%doc WHATSNEW.txt
+%doc Roadmap
+%doc docs-xml/archives/THANKS
+%doc docs-xml/archives/history
+%doc docs-xml/registry
+%doc examples/autofs
+%doc examples/LDAP
+%doc examples/libsmbclient
+%doc examples/misc
+%doc examples/printer-accounting
 %doc examples/printing
 
 ##########