libpng: moved to github
[openwrt.org/packages.git] / net / openl2tp / Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#
# Copyright (C) 2009-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
 
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
 
PKG_NAME:=openl2tp
PKG_VERSION:=1.8
PKG_RELEASE:=4
 
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/openl2tp
PKG_MD5SUM:=e3d08dedfb9e6a9a1e24f6766f6dadd0
 
PKG_BUILD_DEPENDS:=libreadline libncurses USE_UCLIBC:librpc
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PPPD_VERSION:=2.4.5
 
include $(INCLUDE_DIR)/package.mk
 
define Package/openl2tp/Default
  SUBMENU:=VPN
  SECTION:=net
  CATEGORY:=Network
  TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon
  URL:=http://www.openl2tp.org/
  PROVIDES:=openl2tp
  DEPENDS:=+ppp-mod-pppol2tp
endef
 
define Package/openl2tp/description/Default
 OpenL2TP is an open source L2TP client/server, written by Katalix Systems
 specifically for Linux. It has been designed for use as an enterprise
 L2TP VPN server or in commercial, Linux-based, embedded networking
 products and is able to support hundreds of sessions, each with different
 configuration.
endef
 
 
define Package/openl2tp-full
$(call Package/openl2tp/Default)
  TITLE+=(full)
  VARIANT:=full
  DEPENDS+=+portmap +libreadline +libncurses $(LIBRPC_DEPENDS)
endef
 
define Package/openl2tp-full/description
$(call Package/openl2tp/description/Default)
 .
 This package a full-featured, RPC-enabled OpenL2TP.
endef
 
 
define Package/openl2tp-mini
$(call Package/openl2tp/Default)
  TITLE+=(mini)
  VARIANT:=mini
endef
 
define Package/openl2tp-mini/description
$(call Package/openl2tp/description/Default)
 .
 This package a minimal-featured, RPC-disabled OpenL2TP.
endef
 
 
MAKE_FLAGS+= \
        KERNEL_SRCDIR="$(LINUX_DIR)" \
        KERNEL_BLDDIR="$(LINUX_DIR)" \
        PPPD_VERSION="$(PKG_PPPD_VERSION)" \
        READLINE_DIR="$(STAGING_DIR)/usr" \
        PPPD_SRCDIR="$(STAGING_DIR)/usr/include" \
        PPPD_LIBDIR="$(STAGING_DIR)/usr/lib" \
        CFLAGS.optimize="$(TARGET_CFLAGS)" \
        CPPFLAGS-y="-I$(STAGING_DIR)/usr/include" \
        L2TP_FEATURE_LOCAL_CONF_FILE=y \
        CROSS_COMPILE="$(TARGET_CROSS)" \
 
ifeq ($(BUILD_VARIANT),full)
 
  MAKE_FLAGS += \
        L2TP_FEATURE_RPC_MANAGEMENT=y \
        L2TP_FEATURE_LOCAL_STAT_FILE=y \
        LIBS.dmalloc="-L$(STAGING_DIR)/usr/lib $(LIBRPC)" \
 
endif
ifeq ($(BUILD_VARIANT),mini)
 
  MAKE_FLAGS += \
        L2TP_FEATURE_RPC_MANAGEMENT= \
        L2TP_FEATURE_LOCAL_STAT_FILE= \
 
endif
 
define Build/Prepare
        $(call Build/Prepare/Default)
        $(CP) ./src/*.[ch] $(PKG_BUILD_DIR)/
endef
 
define Package/openl2tp-full/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/l2tpconfig  $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/openl2tpd $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PPPD_VERSION)
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/pppd/openl2tp.so $(1)/usr/lib/pppd/$(PPPD_VERSION)/
        $(INSTALL_DIR) $(1)/usr/lib/openl2tp
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/event_sock.so $(1)/usr/lib/openl2tp/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ipsec.so $(1)/usr/lib/openl2tp/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ppp_null.so $(1)/usr/lib/openl2tp/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ppp_unix.so $(1)/usr/lib/openl2tp/
endef
 
define Package/openl2tp-mini/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/openl2tpd $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/usr/lib/openl2tp
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ipsec.so $(1)/usr/lib/openl2tp/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ppp_unix.so $(1)/usr/lib/openl2tp/
endef
 
$(eval $(call BuildPackage,openl2tp-full))
$(eval $(call BuildPackage,openl2tp-mini))
 
comments