ref: refs/heads/master
commit 77dfb825a54da16e757db83958099e20f4313fbe
Author: Klaus Kämpf
Date: Mon Mar 9 21:14:23 2009 +0100
Build and install ruby-satsolver documentation
This creates rdoc-style html documentation for ruby-satsolver
below /usr/share/doc/packages/ruby-satsolver/html
---
bindings/ruby/CMakeLists.txt | 11 ++++++++---
package/libsatsolver.spec.in | 9 +++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/bindings/ruby/CMakeLists.txt b/bindings/ruby/CMakeLists.txt
index e150a4f..64a6437 100644
--- a/bindings/ruby/CMakeLists.txt
+++ b/bindings/ruby/CMakeLists.txt
@@ -40,13 +40,18 @@ TARGET_LINK_LIBRARIES( satsolver_ruby ${RPMDB_LIBRARY} )
INSTALL(TARGETS satsolver_ruby LIBRARY DESTINATION ${RUBY_VENDORARCH_DIR})
# rdoc
+SET(rdoc_dir "${CMAKE_CURRENT_BINARY_DIR}/html")
ADD_CUSTOM_COMMAND (
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/doc"
+ OUTPUT ${rdoc_dir}
COMMAND ${CMAKE_COMMAND} -E echo_append "Creating rdoc documentation ..."
- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/rdoc -o ${CMAKE_CURRENT_BINARY_DIR}/doc satsolver.i *.i
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/rdoc -o ${rdoc_dir} satsolver.i *.i
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bindings
DEPENDS ${CMAKE_SOURCE_DIR}/bindings/*.i
)
-ADD_CUSTOM_TARGET(ruby_rdoc ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc")
+ADD_CUSTOM_TARGET(ruby_rdoc ALL DEPENDS "${rdoc_dir}")
ADD_DEPENDENCIES(ruby_rdoc satsolver_ruby)
+
+#
+# Leave this to %doc in the .spec file
+#INSTALL(DIRECTORY "${rdoc_dir}" DESTINATION ${DOC_INSTALL_DIR})
diff --git a/package/libsatsolver.spec.in b/package/libsatsolver.spec.in
index 1162107..6157f09 100644
--- a/package/libsatsolver.spec.in
+++ b/package/libsatsolver.spec.in
@@ -26,6 +26,9 @@ BuildRequires: libexpat-devel
%if 0%{?suse_version} < 1100
BuildRequires: graphviz
%endif
+%if 0%{?suse_version} > 1020
+BuildRequires: fdupes
+%endif
%else
BuildRequires: expat-devel
%endif
@@ -138,6 +141,11 @@ export NO_BRP_STRIP_DEBUG=true
#pushd doc/autodoc
#make install
#popd
+%if 0%{?suse_version} > 1020
+# create symlinks for documentation
+#%fdupes -s %{buildroot}%{_docdir}/ruby-satsolver
+%fdupes -s bindings/ruby/html
+%endif
%clean
rm -rf "$RPM_BUILD_ROOT"
@@ -176,6 +184,7 @@ rm -rf "$RPM_BUILD_ROOT"
%if 0%{?mandriva_version}
%{ruby_sitearchdir}/satsolver.so
%endif
+%doc bindings/ruby/html
%files -n python-satsolver
%defattr(-,root,root,-)
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org