1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
# export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=+fixfilepath
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
%:
dh "${@}" --buildsystem=cmake --with=python3
override_dh_auto_configure:
dh_auto_configure --builddirectory=build -- -DWITH_BINDINGS:BOOL=ON -DWITH_GTKDOC:BOOL=ON \
-DWITH_HTML:BOOL=ON -DWITH_MAN:BOOL=ON \
-DENABLE_RHSM_SUPPORT:BOOL=OFF -DENABLE_SOLV_URPMREORDER:BOOL=OFF \
-DDISABLE_VALGRIND:BOOL=ON -DWITH_ZCHUNK:BOOL=OFF\
-DPYTHON_DESIRED:STRING=3 -DCMAKE_INSTALL_PREFIX:PATH="/usr" \
-DLIB:STRING="lib/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)"
if dpkg --compare-versions "$$(dpkg-query -f='$${Version}' --show 'libsmartcols-dev')" 'ge' '2.30'; then \
sed -i -e '/^@LIBSMARTCOLS_COMPAT@/s/^@LIBSMARTCOLS_COMPAT@/\/\//' 'libdnf/utils/smartcols/Cell.hpp'; \
else \
sed -i -e '/^@LIBSMARTCOLS_COMPAT@/s/^@LIBSMARTCOLS_COMPAT@//' 'libdnf/utils/smartcols/Cell.hpp'; \
fi
# Fix file format
iconv -f ISO-8859-15 -t UTF-8 docs/libdnf/html/common.css -o docs/libdnf/html/common.css
override_dh_auto_build:
dh_auto_build --builddirectory=build -- all doc-html doc-gtk doc
override_dh_auto_install:
dh_auto_install --builddirectory=build
# Remove doctree files (redundant, conflicts with reproducible builds)
rm -rfv 'build/docs/hawkey/html/.doctrees'
# Use system-provides files.
rm -fv 'build/docs/hawkey/html/_static/jquery.js' \
'build/docs/hawkey/html/_static/underscore.js' \
'build/docs/hawkey/html/_static/doctools.js' \
'build/docs/hawkey/html/_static/language_data.js' \
'build/docs/hawkey/html/_static/searchtools.js'
override_dh_auto_clean:
rm -f 'libdnf/dnf-version.h'
dh_auto_clean --builddirectory=build
override_dh_auto_test:
mkdir '$(CURDIR)/debian/tests-home'
LC_ALL=C HOME='$(CURDIR)/debian/tests-home' dh_auto_test --builddirectory=build -- ARGS='-V'
override_dh_missing:
dh_missing --fail-missing
override_dh_install:
if dpkg --compare-versions "$$(dpkg-query -f='$${Version}' --show 'debhelper')" 'ge' '12'; then \
dh_install; \
else \
dh_install --fail-missing ; \
fi
override_dh_installchangelogs:
# Do not try to install a history directory within docs.
dh_installchangelogs -Xhistory
|