Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / xl2tpd / packaging / openwrt / Makefile
blobcfaae72d0912d9c532943abf1103ce2dd7acded4
2 include $(TOPDIR)/rules.mk
4 PKG_NAME:=xl2tpd
5 PKG_VERSION:=1.3.0
6 PKG_RELEASE:=1
7 PKG_MD5SUM:=ab5656eb5a3d1973f7f69b039675332e-NEEDSUPDATING
9 PKG_SOURCE_URL:=http://www.xelerance.com/software/xl2tpd/
10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
11 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
12 PKG_CAT:=zcat
14 include $(TOPDIR)/package/rules.mk
16 $(eval $(call PKG_template,XL2TPD,xl2tpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
18 FLAGS := $(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/linux/include -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include
20 $(PKG_BUILD_DIR)/.built:
21 $(MAKE) -C $(PKG_BUILD_DIR) \
22 $(TARGET_CONFIGURE_OPTS) \
23 ARCH="mips" \
24 LD_LIBRARY_PATH="$(STAGING_DIR)/usr/lib" \
25 EXTRA_INCLUDE="-I$(STAGING_DIR)/usr/include" \
26 all
28 $(IPKG_XL2TPD):
29 $(MAKE) -C $(PKG_BUILD_DIR) \
30 $(TARGET_CONFIGURE_OPTS) \
31 DESTDIR="$(IDIR_XL2TPD)" \
32 ARCH="mips" \
33 install
34 -$(STRIP) $(IDIR_XL2TPD)/usr/sbin/xl2tpd
35 rm -rf $(IDIR_XL2TPD)/usr/share
36 rm -rf $(IDIR_XL2TPD)/usr/man
37 rm -rf $(IDIR_XL2TPD)/var
38 rm -rf $(IDIR_XL2TPD)/etc/rc.d/rc*.d
39 mkdir -p $(IDIR_XL2TPD)/etc/init.d
40 mkdir -p $(IDIR_XL2TPD)/etc/ppp
41 mkdir -p $(IDIR_XL2TPD)/etc/xl2tpd
42 cp $(PKG_BUILD_DIR)/examples/ppp-options.xl2tpd $(IDIR_XL2TPD)/etc/ppp/options.xl2tpd
43 cp $(PKG_BUILD_DIR)/examples/xl2tpd.conf $(IDIR_XL2TPD)/etc/xl2tpd
44 cp $(PKG_BUILD_DIR)/packaging/openwrt $(IDIR_XL2TPD)/etc/init.d/
45 find $(PKG_BUILD_DIR) -name \*.old | xargs rm -rf
46 mkdir -p $(PACKAGE_DIR)
47 $(IPKG_BUILD) $(IDIR_XL2TPD) $(PACKAGE_DIR)