kumquat-buildroot/package/vpnc/vpnc.mk
Alvaro G. M 0a4856ce27 DOWNLOAD: change $1=DIRECTORY_URL, $2=FILE_NAME to $1=FULL_FILE_URL, $2=FILE_NAME
This modifies the definition of DOWNLOAD to receive two arguments:
the first one is the full URL of the file to download, whereas the second
(and optional) is the name the file will have once downloaded.

Same thing with the SOURCE_CHECK_WGET and SCP functions.

All calls to these functions have been changed to the shortest form of
the new API, except for toolchains acquisition. Since there is quite a
number of different toolchains this call to DOWNLOAD is better set to the
generic one.

Signed-off-by: Alvaro G. M <alvaro.gamez@hazent.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Stephan Hoffmann <sho@relinux.de>
Downloading Microblaze LE toolchain works on a clean install
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-03-18 22:21:16 +01:00

63 lines
1.8 KiB
Makefile

#############################################################
#
# vpnc
#
#############################################################
VPNC_VERSION=0.5.3
VPNC_SOURCE=vpnc-$(VPNC_VERSION).tar.gz
VPNC_SITE=http://www.unix-ag.uni-kl.de/~massar/vpnc
VPNC_DIR=$(BUILD_DIR)/vpnc-$(VPNC_VERSION)
VPNC_CAT:=$(ZCAT)
VPNC_BINARY:=$(VPNC_DIR)/vpnc
VPNC_DEST_DIR:=$(TARGET_DIR)/usr/local/sbin
VPNC_TARGET_BINARY:=$(VPNC_DEST_DIR)/vpnc
VPNC_TARGET_SCRIPT:=$(TARGET_DIR)/etc/vpnc/default.conf
$(DL_DIR)/$(VPNC_SOURCE):
$(call DOWNLOAD,$(VPNC_SITE)/$(VPNC_SOURCE))
$(VPNC_DIR)/.unpacked: $(DL_DIR)/$(VPNC_SOURCE)
$(VPNC_CAT) $(DL_DIR)/$(VPNC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
support/scripts/apply-patches.sh $(VPNC_DIR) package/vpnc vpnc-$(VPNC_VERSION)\*.patch
touch $@
$(VPNC_BINARY): $(VPNC_DIR)/.unpacked
rm -f $@
$(MAKE) $(TARGET_CONFIGURE_OPTS) INCLUDE=$(STAGING_DIR)/usr/include \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS+=-lgcrypt LDFLAGS+=-lgpg-error LDFLAGS+="$(TARGET_CFLAGS)" \
CC="$(TARGET_CC)" -C $(VPNC_DIR)
$(VPNC_TARGET_BINARY): $(VPNC_BINARY)
$(MAKE) $(TARGET_CONFIGURE_OPTS) \
DESTDIR=$(TARGET_DIR) \
BINDIR=/usr/local/bin \
SBINDIR=/usr/local/sbin \
ETCDIR=/etc/vpnc \
MANDIR=/usr/share/man \
VERSION=$(VPNC_VERSION) \
INCLUDE=$(STAGING_DIR)/usr/include \
LDFLAGS="-lgcrypt -lgpg-error $(TARGET_CFLAGS)" \
-C $(VPNC_DIR) install
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(VPNC_TARGET_BINARY)
vpnc: libgcrypt $(VPNC_TARGET_BINARY)
vpnc-source: $(DL_DIR)/$(VPNC_SOURCE)
vpnc-clean:
-$(MAKE) -C $(VPNC_DIR) clean
rm -f $(STAGING_DIR)/usr/bin/vpnc
vpnc-dirclean:
rm -rf $(VPNC_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_VPNC),y)
TARGETS+=vpnc
endif