mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-17 08:34:00 +00:00
Problem: cannot build deb with drafts on OBS
Solution: parse the OBS prjconf and the user env variable DEB_BUILD_OPTIONS. If either of those define "drafts" then build with draft APIs enabled.
This commit is contained in:
parent
493f17cc81
commit
a8a774e71b
@ -10,6 +10,27 @@ ifeq ($(DEB_BUILD_ARCH_OS), kfreebsd)
|
|||||||
DO_TEST = no
|
DO_TEST = no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
DRAFTS=no
|
||||||
|
|
||||||
|
# OBS build: add
|
||||||
|
# Macros:
|
||||||
|
# %_with_drafts 1
|
||||||
|
# at the BOTTOM of the OBS prjconf
|
||||||
|
OBS_BUILD_CFG=/.build/build.dist
|
||||||
|
ifeq ("$(wildcard $(OBS_BUILD_CFG))","")
|
||||||
|
BUILDCONFIG=$(shell ls -1 /usr/src/packages/SOURCES/_buildconfig* | head -n 1)
|
||||||
|
endif
|
||||||
|
ifneq ("$(wildcard $(OBS_BUILD_CFG))","")
|
||||||
|
ifneq ("$(shell grep drafts $(OBS_BUILD_CFG))","")
|
||||||
|
DRAFTS=yes
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# User build: DEB_BUILD_OPTIONS=drafts dpkg-buildpackage
|
||||||
|
ifneq (,$(findstring drafts,$(DEB_BUILD_OPTIONS)))
|
||||||
|
DRAFTS=yes
|
||||||
|
endif
|
||||||
|
|
||||||
override_dh_clean:
|
override_dh_clean:
|
||||||
dh_clean
|
dh_clean
|
||||||
find $(CURDIR) -type s -exec rm {} \;
|
find $(CURDIR) -type s -exec rm {} \;
|
||||||
@ -17,7 +38,7 @@ override_dh_clean:
|
|||||||
rm -f config.log
|
rm -f config.log
|
||||||
|
|
||||||
override_dh_auto_configure:
|
override_dh_auto_configure:
|
||||||
dh_auto_configure -- --with-pgm --with-libsodium
|
dh_auto_configure -- --with-pgm --with-libsodium --enable-drafts=$(DRAFTS)
|
||||||
|
|
||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user