diff options
Diffstat (limited to 'packaging/debian/rules')
-rwxr-xr-x | packaging/debian/rules | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/packaging/debian/rules b/packaging/debian/rules index 16e39abf..b6aacfac 100755 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -12,6 +12,17 @@ ifeq ($(distrelease),n/a) distrelease := sid endif +include /usr/share/dpkg/pkg-info.mk + +# Fetch our Logray version. This is pretty janky, but will have to do for now. +PROJECT_MAJOR_VERSION = $(shell grep '^set(PROJECT_MAJOR_VERSION' CMakeLists.txt | sed -e 's/set.* //' -e 's/)//') +PROJECT_MINOR_VERSION = $(shell grep '^set(PROJECT_MINOR_VERSION' CMakeLists.txt | sed -e 's/set.* //' -e 's/)//') +PROJECT_PATCH_VERSION = $(shell grep '^set(PROJECT_PATCH_VERSION' CMakeLists.txt | sed -e 's/set.* //' -e 's/)//') +LOG_PROJECT_MAJOR_VERSION = $(shell grep '^set(LOG_PROJECT_MAJOR_VERSION' CMakeLists.txt | sed -e 's/set.* //' -e 's/)//') +LOG_PROJECT_MINOR_VERSION = $(shell grep '^set(LOG_PROJECT_MINOR_VERSION' CMakeLists.txt | sed -e 's/set.* //' -e 's/)//') +LOG_PROJECT_PATCH_VERSION = $(shell grep '^set(LOG_PROJECT_PATCH_VERSION' CMakeLists.txt | sed -e 's/set.* //' -e 's/)//') +LOGRAY_VERSION = $(shell echo $(DEB_VERSION) | sed -e "s/$(PROJECT_MAJOR_VERSION)\.$(PROJECT_MINOR_VERSION)\.$(PROJECT_PATCH_VERSION)/$(LOG_PROJECT_MAJOR_VERSION)\.$(LOG_PROJECT_MINOR_VERSION)\.$(LOG_PROJECT_PATCH_VERSION)/") + # This has to be exported to make some magic below work. export DH_OPTIONS @@ -27,11 +38,20 @@ else DH_BUILDSYSTEM = cmake endif +ifneq ($(filter pkg.wireshark.logray,$(DEB_BUILD_PROFILES)),) + CONFIGURE_SWITCHES += -DBUILD_logray=ON -DBUILD_falcodump=ON +endif + %: dh $@ --with python3 --buildsystem $(DH_BUILDSYSTEM) --with quilt override_dh_auto_configure: - dh_auto_configure -- -DBUILD_xxx2deb=ON -DBUILD_corbaidl2wrs=ON -DUSE_qt6=OFF + dh_auto_configure -- \ + -DBUILD_xxx2deb=ON \ + -DBUILD_corbaidl2wrs=ON \ + $(CONFIGURE_SWITCHES) + sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \ + debian/logray.postinst.in > debian/logray.postinst override_dh_auto_build: # Ignore warnings from asn2wrs.py about duplicate field names. @@ -40,7 +60,7 @@ override_dh_auto_build: dh_auto_build $(MAKE) -C $(CURDIR)/obj-* user_guide_html developer_guide_html # fix links in documentation - sed -i "s|$(CURDIR)/docbook|..|" obj-*/docbook/ws*g_html_chunked/*.html + sed -i "s|$(CURDIR)/doc|..|" obj-*/doc/ws*g_html_chunked/*.html ifeq (,$(filter $(DEB_BUILD_OPTIONS),nocheck)) # Required for the "unittests" suite. $(MAKE) -C $(CURDIR)/obj-* test-programs @@ -50,9 +70,6 @@ override_dh_dwz: # run dh_dwz only with debhelper (>= 12.6) to work around https://bugs.debian.org/939164 dpkg -l debhelper | awk '/debhelper/ {print $$3}' | xargs dpkg --compare-versions 12.6 gt || dh_dwz -override_dh_strip: - dh_strip --dbg-package=wireshark-dbg - override_dh_auto_install: dh_auto_install ifeq ($(MAKE),ninja) @@ -60,7 +77,6 @@ ifeq ($(MAKE),ninja) else $(MAKE) DESTDIR=$(CURDIR)/debian/tmp -C $(CURDIR)/obj-* install-headers endif - rm -f debian/*.shlibs rm -rf $(CURDIR)/debian/tmp/usr/share/wireshark/COPYING override_dh_install: @@ -81,3 +97,15 @@ ifeq (,$(filter $(DEB_BUILD_OPTIONS),nocheck)) else @echo '"DEB_BUILD_OPTIONS" has "nocheck". Skipping tests' endif + +override_dh_makeshlibs: + for package in $$(grep 'Package: lib.*[0-9]$$' debian/control | cut -d' ' -f2); do \ + lib=$${package%%[0-9]*};\ + major=$${package##*[a-z]}; \ + echo "$$lib $$major $$package (= $(DEB_VERSION))" > debian/$$package.shlibs; \ + done + dh_makeshlibs + +override_dh_gencontrol: + dh_gencontrol + dh_gencontrol -plogray -- -v$(LOGRAY_VERSION) |