forked from osmocom/wireshark
93 lines
3.4 KiB
Makefile
Executable File
93 lines
3.4 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
# Originally made with the aid of dh_make, by Craig Small
|
|
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
|
|
# Some lines taken from debmake, by Cristoph Lameter.
|
|
# Rewritten to use dh, by Balint Reczey
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
#export DH_VERBOSE=1
|
|
|
|
include /usr/share/dpkg/pkg-info.mk
|
|
|
|
distrelease := $(shell lsb_release -cs)
|
|
ifeq ($(distrelease),n/a)
|
|
distrelease := sid
|
|
endif
|
|
|
|
# This has to be exported to make some magic below work.
|
|
export DH_OPTIONS
|
|
|
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
|
|
|
export docdir = /usr/share/doc/wireshark-doc
|
|
%:
|
|
dh $@ --with python3 --buildsystem cmake
|
|
|
|
override_dh_auto_configure:
|
|
dh_auto_configure -- -DBUILD_xxx2deb=ON -DBUILD_corbaidl2wrs=ON -DUSE_qt6=OFF \
|
|
-DVCSVERSION_OVERRIDE="Git v$(DEB_VERSION_UPSTREAM) packaged as $(DEB_VERSION)"
|
|
|
|
override_dh_auto_build-arch:
|
|
# regenerate ASN.1 dissectors
|
|
# Ignore warnings from asn2wrs.py about duplicate field names.
|
|
PYTHONWARNINGS='ignore:The same:UserWarning::0' \
|
|
$(MAKE) -C $(CURDIR)/obj-* asn1
|
|
dh_auto_build -a
|
|
|
|
override_dh_auto_build-indep:
|
|
# Ignore warnings from asn2wrs.py about duplicate field names.
|
|
PYTHONWARNINGS='ignore:The same:UserWarning::0' \
|
|
$(MAKE) -C $(CURDIR)/obj-* asn1
|
|
dh_auto_build -i
|
|
$(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
|
|
|
|
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_auto_install-arch:
|
|
dh_auto_install -a
|
|
rm -f debian/*.shlibs
|
|
mkdir -p $(CURDIR)/debian/tmp/etc/wireshark/
|
|
|
|
override_dh_auto_install-indep:
|
|
dh_auto_install -i
|
|
# work around weird new idea of wireshark 4.1.x to not install development headers by default anymore
|
|
DESTDIR="$(CURDIR)/debian/tmp" cmake --install obj-* --component Development
|
|
rm -rf $(CURDIR)/debian/tmp/usr/share/wireshark/COPYING
|
|
cp debian/license-text-about-dialog $(CURDIR)/debian/tmp/usr/share/wireshark/ABOUT.GPL
|
|
mkdir -p $(CURDIR)/debian/tmp/etc/wireshark/
|
|
mv $(CURDIR)/debian/tmp/usr/share/wireshark/init.lua \
|
|
$(CURDIR)/debian/tmp/etc/wireshark/
|
|
ln -s /etc/wireshark/init.lua \
|
|
$(CURDIR)/debian/tmp/usr/share/wireshark/init.lua
|
|
|
|
override_dh_install-arch:
|
|
dh_install -a
|
|
# check all necessary headers are included
|
|
$(CC) -c debian/headers-check.c $(shell pkg-config --cflags glib-2.0) $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS) -Idebian/libwireshark-dev/usr/include -Idebian/libwireshark-dev/usr/include/wireshark -Idebian/libwiretap-dev/usr/include/wireshark -Idebian/libwsutil-dev/usr/include -Idebian/libwsutil-dev/usr/include/wireshark -o /dev/null
|
|
|
|
override_dh_fixperms-arch:
|
|
dh_fixperms -a
|
|
chmod 644 debian/wireshark-dev/usr/share/pyshared/make-plugin-reg.py \
|
|
debian/wireshark-dev/usr/share/pyshared/wireshark_be.py \
|
|
debian/wireshark-dev/usr/share/pyshared/wireshark_gen.py
|
|
|
|
override_dh_auto_test:
|
|
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
|
$(MAKE) -C obj-* test-programs
|
|
ifneq (,$(filter armel armhf mips mipsel s390x,$(DEB_HOST_ARCH)))
|
|
# reported as https://gitlab.com/wireshark/wireshark/-/issues/15945
|
|
-dh_auto_test
|
|
else
|
|
dh_auto_test
|
|
endif
|
|
endif
|
|
|
|
override_dh_clean:
|
|
dh_clean
|
|
# ignore #653916
|
|
@echo 'blhc: ignore-line-regexp: .*CMakeCXXCompilerABI.cpp .*'
|