2007-01-31 22:22:33 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# l2tp
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
L2TP_VERSION:=0.70-pre20031121
|
|
|
|
L2TP_SOURCE:=l2tpd_$(L2TP_VERSION).orig.tar.gz
|
2007-11-27 09:30:34 +01:00
|
|
|
L2TP_PATCH:=l2tpd_$(L2TP_VERSION)-2.2.diff.gz
|
2007-12-27 13:00:12 +01:00
|
|
|
L2TP_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/l/l2tpd/
|
2007-07-11 16:06:06 +02:00
|
|
|
L2TP_DIR:=$(BUILD_DIR)/l2tpd-$(L2TP_VERSION)
|
2007-01-31 22:22:33 +01:00
|
|
|
L2TP_CAT:=$(ZCAT)
|
|
|
|
L2TP_BINARY:=l2tpd
|
|
|
|
L2TP_TARGET_BINARY:=usr/sbin/l2tpd
|
|
|
|
|
|
|
|
$(DL_DIR)/$(L2TP_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(L2TP_SITE),$(L2TP_SOURCE))
|
2007-01-31 22:22:33 +01:00
|
|
|
|
|
|
|
$(DL_DIR)/$(L2TP_PATCH):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(L2TP_SITE),$(L2TP_PATCH))
|
2007-01-31 22:22:33 +01:00
|
|
|
|
|
|
|
l2tp-source: $(DL_DIR)/$(L2TP_SOURCE) $(DL_DIR)/$(L2TP_PATCH)
|
|
|
|
|
|
|
|
$(L2TP_DIR)/.unpacked: $(DL_DIR)/$(L2TP_SOURCE) $(DL_DIR)/$(L2TP_PATCH)
|
|
|
|
$(L2TP_CAT) $(DL_DIR)/$(L2TP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
-mv -f $(L2TP_DIR).orig $(L2TP_DIR)
|
|
|
|
ifneq ($(L2TP_PATCH),)
|
|
|
|
(cd $(L2TP_DIR) && $(L2TP_CAT) $(DL_DIR)/$(L2TP_PATCH) | patch -p1)
|
|
|
|
if [ -d $(L2TP_DIR)/debian/patches ]; then \
|
2007-08-22 11:56:41 +02:00
|
|
|
toolchain/patch-kernel.sh $(L2TP_DIR) $(L2TP_DIR)/debian/patches \*.patch; \
|
2007-01-31 22:22:33 +01:00
|
|
|
fi
|
|
|
|
endif
|
|
|
|
toolchain/patch-kernel.sh $(L2TP_DIR) package/l2tp/ l2tp\*.patch
|
|
|
|
touch $(L2TP_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(L2TP_DIR)/$(L2TP_BINARY): $(L2TP_DIR)/.unpacked
|
2007-07-09 10:30:38 +02:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(L2TP_DIR) \
|
2007-01-31 22:22:33 +01:00
|
|
|
DFLAGS= \
|
|
|
|
OSFLAGS="-DLINUX -UUSE_KERNEL $(TARGET_CFLAGS) -USANITY"
|
|
|
|
|
|
|
|
$(TARGET_DIR)/$(L2TP_TARGET_BINARY): $(L2TP_DIR)/$(L2TP_BINARY)
|
|
|
|
cp -dpf $(L2TP_DIR)/$(L2TP_BINARY) $@
|
2007-02-16 19:11:48 +01:00
|
|
|
cp -dpf package/l2tp/l2tpd $(TARGET_DIR)/etc/init.d/
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $@
|
2007-01-31 22:22:33 +01:00
|
|
|
|
|
|
|
l2tp: uclibc $(TARGET_DIR)/$(L2TP_TARGET_BINARY)
|
|
|
|
|
|
|
|
l2tp-clean:
|
|
|
|
-$(MAKE) -C $(L2TP_DIR) clean
|
|
|
|
rm -f $(TARGET_DIR)/$(L2TP_TARGET_BINARY)
|
|
|
|
|
|
|
|
l2tp-dirclean:
|
|
|
|
rm -rf $(L2TP_DIR)
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_L2TP),y)
|
2007-01-31 22:22:33 +01:00
|
|
|
TARGETS+=l2tp
|
|
|
|
endif
|