]> git.proxmox.com Git - libgit2.git/commitdiff
Clean up d/rules
authorTimo Röhling <roehling@debian.org>
Sun, 28 Aug 2022 13:41:26 +0000 (15:41 +0200)
committerTimo Röhling <roehling@debian.org>
Sun, 28 Aug 2022 17:37:09 +0000 (19:37 +0200)
Gbp-Dch: ignore

debian/rules

index 66e8d0551cd91e61fb5255c5d63266e61d8f5ea0..276c3f942153bec344083e0a075c24fb4ed81eac 100755 (executable)
@@ -2,68 +2,47 @@
 # -*- makefile -*-
 
 # This rules file has 2 streams, the build-debian-devel stream builds
-# the static library and the bulid-debian-release builds the dynamic
+# the static library and the build-debian-release builds the dynamic
 # library.
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-TEST_TMPDIR := $(CURDIR)/tmp-test
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk
 
-override_dh_auto_configure:
-       dh_auto_configure --builddirectory=build-debian-release -- \
-               -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-               -DUSE_OPENSSL:BOOL=OFF \
-               -DUSE_HTTPS=mbedTLS \
-               -DCERT_LOCATION=/etc/ssl/certs/ca-certificates.crt \
-               -DUSE_CURL_SSL:BOOL=ON \
-               -DUSE_GSSAPI:BOOL=ON \
-               -DTHREADSAFE:BOOL=ON \
-               -DBUILD_CLAR:BOOL=ON \
-               -DUSE_NTLMCLIENT=OFF \
-               -DENABLE_REPRODUCIBLE_BUILDS=ON \
-               -DUSE_HTTP_PARSER=system \
-               -DLIB_INSTALL_DIR:STRING=lib/$(DEB_HOST_MULTIARCH)
+BUILD_TESTS = $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),OFF,ON)
+COMMON_CMAKE_FLAGS = \
+       -DBUILD_CLI=OFF \
+       -DBUILD_TESTS=$(BUILD_TESTS) \
+       -DCERT_LOCATION=/etc/ssl/certs/ca-certificates.crt \
+       -DDISABLE_ONLINE_TESTS=ON \
+       -DENABLE_REPRODUCIBLE_BUILDS=ON \
+       -DUSE_GSSAPI=ON \
+       -DUSE_HTTPS=mbedTLS \
+       -DUSE_HTTP_PARSER=system \
+       -DUSE_NTLMCLIENT=OFF
 
-       dh_auto_configure --builddirectory=build-debian-devel -- \
-               -DCMAKE_BUILD_TYPE:STRING=Release \
-               -DTHREADSAFE:BOOL=ON \
-               -DUSE_HTTPS=mbedTLS \
-               -DCERT_LOCATION=/etc/ssl/certs/ca-certificates.crt \
-               -DUSE_CURL_SSL:BOOL=ON \
-               -DUSE_GSSAPI:BOOL=ON \
-               -DBUILD_CLAR:BOOL=OFF \
-               -DBUILD_SHARED_LIBS:BOOL=OFF \
-               -DUSE_NTLMCLIENT=OFF \
-               -DENABLE_REPRODUCIBLE_BUILDS=ON \
-               -DUSE_HTTP_PARSER=system \
-               -DLIB_INSTALL_DIR:STRING=lib/$(DEB_HOST_MULTIARCH)
 
+%:
+       dh $@ --buildsystem=cmake
 
-override_dh_makeshlibs:
-       dh_makeshlibs -V
+override_dh_auto_configure:
+       dh_auto_configure --builddirectory=build-debian-devel -- \
+               -DBUILD_SHARED_LIBS=OFF \
+               $(COMMON_CMAKE_FLAGS)
+       dh_auto_configure --builddirectory=build-debian-release -- \
+               -DBUILD_SHARED_LIBS=ON \
+               $(COMMON_CMAKE_FLAGS)
 
 override_dh_auto_build:
-       dh_auto_build --builddirectory=build-debian-release
        dh_auto_build --builddirectory=build-debian-devel
+       dh_auto_build --builddirectory=build-debian-release
 
 override_dh_auto_install:
-       dh_auto_install --builddirectory=build-debian-release
        dh_auto_install --builddirectory=build-debian-devel
+       dh_auto_install --builddirectory=build-debian-release
 
 override_dh_auto_test:
-       mkdir -p build-debian-release/tmp
-       dh_auto_test --builddirectory=build-debian-release
-       mkdir -p build-debian-devel/tmp
        dh_auto_test --builddirectory=build-debian-devel
+       dh_auto_test --builddirectory=build-debian-release
 
-override_dh_installexamples:
-       dh_installexamples --exclude .gitignore
-
-%:
-       dh $@ --buildsystem cmake --dbgsym-migration='libgit2-dbg (<< 0.26.0+dfsg.1-1~)' --builddirectory=build-debian-release
-       dh $@ --buildsystem cmake --builddirectory=build-debian-devel