[med-svn] [Git][med-team/libzeep][master] reproducible build
Maarten L. Hekkelman (@mhekkel-guest)
gitlab at salsa.debian.org
Wed Sep 8 08:35:40 BST 2021
Maarten L. Hekkelman pushed to branch master at Debian Med / libzeep
Commits:
1ebc2a1b by Maarten L. Hekkelman at 2021-09-08T09:35:21+02:00
reproducible build
- - - - -
4 changed files:
- debian/changelog
- + debian/patches/reproducible.patch
- debian/patches/series
- − debian/patches/soname-patch
Changes:
=====================================
debian/changelog
=====================================
@@ -1,6 +1,6 @@
libzeep (5.1.2-1) unstable; urgency=medium
- * New upstream release (Closes: #984216)
+ * New upstream release (Closes: #984216)
-- Maarten L. Hekkelman <maarten at hekkelman.com> Fri, 03 Sep 2021 15:34:14 +0200
=====================================
debian/patches/reproducible.patch
=====================================
@@ -0,0 +1,172 @@
+Description: Create reproducible documentation, set the correct SONAME
+Author: Maarten L. Hekkelman <maarten at hekkelman.com>
+Forwarded: yes
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,8 +1,8 @@
+ cmake_minimum_required(VERSION 3.16)
+
+-project(libzeep VERSION 5.1.2 LANGUAGES CXX C)
++project(libzeep VERSION 5.1.2 LANGUAGES CXX)
+
+-enable_testing()
++list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+
+ include(GNUInstallDirs)
+ include(CheckFunctionExists)
+@@ -250,7 +256,7 @@
+ set(zeep_MAJOR_VERSION 5)
+ set_target_properties(zeep PROPERTIES
+ VERSION ${PROJECT_VERSION}
+- SOVERSION 5
++ SOVERSION 5.1
+ INTERFACE_zeep_MAJOR_VERSION 5)
+
+ set_property(TARGET zeep APPEND PROPERTY
+@@ -277,50 +283,60 @@
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libzeep.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+ # Documentation
+-find_program(DOXYGEN doxygen)
+-find_program(QUICKBOOK quickbook)
+-find_program(XSLTPROC xsltproc)
+-find_program(FOP fop)
+-find_program(BJAM bjam)
+-
+-if(DOXYGEN AND QUICKBOOK AND XSLTPROC AND FOP AND BJAM)
+- option(ZEEP_BUILD_DOC "Build documentation" OFF)
+-
+- if(ZEEP_BUILD_DOC)
+- make_directory(doc)
+- configure_file(${CMAKE_SOURCE_DIR}/doc/Jamfile.v2.in ${CMAKE_SOURCE_DIR}/doc/Jamfile.v2 @ONLY)
+- add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/doc/html/index.html
+- COMMAND ${BJAM} ${CMAKE_SOURCE_DIR}/doc
+- DEPENDS ${CMAKE_SOURCE_DIR}/doc/Jamfile.v2)
+- add_custom_target(doc ALL DEPENDS ${CMAKE_SOURCE_DIR}/doc/html/index.html)
+- install(DIRECTORY ${CMAKE_SOURCE_DIR}/doc/html DESTINATION ${CMAKE_INSTALL_DOCDIR}/${PACKAGE_NAME})
+- endif()
+-else()
+- message(WARNING "Cannot create documentation since the following applications could not be found:")
++option(ZEEP_BUILD_DOC "Build documentation" OFF)
+
+- if(NOT DOXYGEN)
+- message(WARNING " => doxygen")
+- endif()
+- if(NOT QUICKBOOK)
+- message(WARNING " => quickbook")
+- endif()
+- if(NOT XSLTPROC)
+- message(WARNING " => xsltproc")
+- endif()
+- if(NOT FOP)
+- message(WARNING " => fop")
+- endif()
+- if(NOT BJAM)
+- message(WARNING " => bjam")
+- endif()
++if(ZEEP_BUILD_DOC)
++ find_program(DOXYGEN doxygen)
++ find_program(QUICKBOOK quickbook)
++ find_program(XSLTPROC xsltproc)
++ find_program(FOP fop)
++ find_program(BJAM bjam)
++
++ if(NOT DOXYGEN)
++ list(APPEND MISSING_DOC_TOOL_LIST doxygen)
++ endif()
++ if(NOT QUICKBOOK)
++ list(APPEND MISSING_DOC_TOOL_LIST quickbook)
++ endif()
++ if(NOT XSLTPROC)
++ list(APPEND MISSING_DOC_TOOL_LIST xsltproc)
++ endif()
++ if(NOT FOP)
++ list(APPEND MISSING_DOC_TOOL_LIST fop)
++ endif()
++ if(NOT BJAM)
++ list(APPEND MISSING_DOC_TOOL_LIST bjam)
++ endif()
++
++ if(DEFINED MISSING_DOC_TOOL_LIST)
++ list(JOIN MISSING_DOC_TOOL_LIST ", " MISSING_DOC_TOOLS)
++ message(FATAL_ERROR "Cannot create documentation since the following applications could not be found: ${MISSING_DOC_TOOLS}")
++ endif()
++
++ make_directory(doc)
++ configure_file(${CMAKE_SOURCE_DIR}/doc/Jamfile.v2.in ${CMAKE_SOURCE_DIR}/doc/Jamfile.v2 @ONLY)
++ configure_file(${CMAKE_SOURCE_DIR}/doc/tools/quickbook.sh.in
++ ${CMAKE_CURRENT_BINARY_DIR}/tmp/quickbook.sh
++ @ONLY)
++ file(COPY ${CMAKE_CURRENT_BINARY_DIR}/tmp/quickbook.sh
++ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
++ FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
++ file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/tmp/)
++ add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/doc/html/index.html
++ COMMAND ${BJAM} ${CMAKE_SOURCE_DIR}/doc
++ DEPENDS ${CMAKE_SOURCE_DIR}/doc/Jamfile.v2)
++ add_custom_target(doc ALL DEPENDS ${CMAKE_SOURCE_DIR}/doc/html/index.html)
++ install(DIRECTORY ${CMAKE_SOURCE_DIR}/doc/html DESTINATION ${CMAKE_INSTALL_DOCDIR}/${PACKAGE_NAME})
+ endif()
+
+ # Test applications
+
+-option(ZEEP_BUILD_TESTS "Build test exectuables" OFF)
++option(ZEEP_BUILD_TESTS "Build test executables" OFF)
+
+ if(ZEEP_BUILD_TESTS)
+
++ enable_testing()
++
+ # data files for the parser test
+
+ add_library(client_test OBJECT ${CMAKE_SOURCE_DIR}/lib-http/test/client-test-code.cpp)
+--- a/doc/Jamfile.v2.in
++++ b/doc/Jamfile.v2.in
+@@ -10,7 +10,7 @@
+
+ using fop : @FOP@ ;
+
+-using quickbook : @QUICKBOOK@ ;
++using quickbook : @CMAKE_CURRENT_BINARY_DIR@/quickbook.sh ;
+
+ doxygen autodoc
+ :
+--- /dev/null
++++ b/doc/tools/quickbook.sh.in
+@@ -0,0 +1,35 @@
++#!/bin/bash
++
++set -e
++
++# Run the original quickbook first
++ at QUICKBOOK@ $@
++
++# And if it fails, exit
++if [[ $? -ne 0 ]] ; then
++ exit $?
++fi
++
++# Now try to find out what was written
++for i in "$@"; do
++ key="$i"
++ case $key in
++ --output-file=*)
++ OUTPUTFILE="${i#*=}"
++ shift # past argument=value
++ ;;
++ --output-file)
++ OUTPUTFILE="$2"
++ shift # past argument
++ shift # past value
++ ;;
++ *) # unknown option
++ shift # past argument
++ ;;
++ esac
++done
++
++if [[ "x$OUTPUTFILE" != "x" && "x$SOURCE_DATE_EPOCH" != "x" ]] ; then
++ BUILD_DATE="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +'%Y-%m-%d %H:%M:%S')"
++ sed -i -e "s/\$Date:.\\+\\$/$BUILD_DATE/g" $OUTPUTFILE
++fi
=====================================
debian/patches/series
=====================================
@@ -1 +1 @@
-soname-patch
+reproducible.patch
=====================================
debian/patches/soname-patch deleted
=====================================
@@ -1,11 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -250,7 +250,7 @@
- set(zeep_MAJOR_VERSION 5)
- set_target_properties(zeep PROPERTIES
- VERSION ${PROJECT_VERSION}
-- SOVERSION 5
-+ SOVERSION 5.1
- INTERFACE_zeep_MAJOR_VERSION 5)
-
- set_property(TARGET zeep APPEND PROPERTY
View it on GitLab: https://salsa.debian.org/med-team/libzeep/-/commit/1ebc2a1b8b11256daaf85c17fa70033f21a2342b
--
View it on GitLab: https://salsa.debian.org/med-team/libzeep/-/commit/1ebc2a1b8b11256daaf85c17fa70033f21a2342b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210908/a82c048c/attachment-0001.htm>
More information about the debian-med-commit
mailing list