From: Tobias Brunner Date: Fri, 29 Aug 2014 09:51:54 +0000 (+0200) Subject: testing: Make strongSwan build recipe more configurable X-Git-Tag: 5.2.1dr1~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ffcf8f4ea2378030f3fcacbdae090d7655662730;p=thirdparty%2Fstrongswan.git testing: Make strongSwan build recipe more configurable --- diff --git a/testing/scripts/recipes/013_strongswan.mk b/testing/scripts/recipes/013_strongswan.mk index c4142086f2..3501b74536 100644 --- a/testing/scripts/recipes/013_strongswan.mk +++ b/testing/scripts/recipes/013_strongswan.mk @@ -5,6 +5,15 @@ PKG = strongswan-$(PV) TAR = $(PKG).tar.bz2 SRC = http://download.strongswan.org/$(TAR) +# can be passed to load sources from a directory instead of a tarball +ifneq ($(origin SRCDIR), undefined) +DIR = $(SRCDIR) +BUILDDIR ?= $(SRCDIR) +endif +DIR ?= . +# can be passed if not building in the source directory +BUILDDIR ?= $(PKG) + NUM_CPUS := $(shell getconf _NPROCESSORS_ONLN) CONFIG_OPTS = \ @@ -94,11 +103,11 @@ $(TAR): $(PKG): $(TAR) tar xfj $(TAR) -configure: $(PKG) - cd $(PKG) && ./configure $(CONFIG_OPTS) +configure: $(BUILDDIR) + cd $(BUILDDIR) && $(DIR)/configure $(CONFIG_OPTS) build: configure - cd $(PKG) && make -j $(NUM_CPUS) + cd $(BUILDDIR) && make -j $(NUM_CPUS) install: build - cd $(PKG) && make install + cd $(BUILDDIR) && make install