3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=862f8788f080f669b1ae00a74ef68001
10 PKG_SOURCE_URL
:=http
://openvpn.net
/release @SF
/openvpn
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
17 include $(TOPDIR
)/package
/rules.mk
19 $(eval
$(call PKG_template
,OPENVPN
,openvpn
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
21 PKG_DEPEND
:="libopenssl, kmod-tun"
22 ifneq ($(BR2_PACKAGE_OPENVPN_LZO
),y
)
23 DISABLE_LZO
:=--disable-lzo
25 PKG_DEPEND
+=", liblzo"
28 ifneq ($(BR2_PACKAGE_OPENVPN_SERVER
),y
)
29 DISABLE_SERVER
:=--disable-server
31 ifneq ($(BR2_PACKAGE_OPENVPN_HTTP
),y
)
32 DISABLE_HTTP
:=--disable-http
35 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
36 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
37 $(TARGET_CONFIGURE_OPTS
) \
38 CFLAGS
="$(strip $(TARGET_CFLAGS))" \
39 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
40 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
42 --target
=$(GNU_TARGET_NAME
) \
43 --host
=$(GNU_TARGET_NAME
) \
44 --build
=$(GNU_HOST_NAME
) \
50 --datadir=/usr
/share \
51 --includedir=/usr
/include \
52 --infodir=/usr
/share
/info \
54 --libexecdir
=/usr
/lib \
55 --localstatedir
=/var \
56 --mandir=/usr
/share
/man \
59 $(DISABLE_LARGEFILE
) \
66 --disable-management \
72 touch
$(PKG_BUILD_DIR
)/.configured
74 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
75 $(MAKE
) -C
$(PKG_BUILD_DIR
)
76 mkdir
-p
$(PKG_INSTALL_DIR
)
77 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
78 DESTDIR
="$(PKG_INSTALL_DIR)" \
80 touch
$(PKG_BUILD_DIR
)/.built
83 install -d
-m0755
$(IDIR_OPENVPN
)/usr
/sbin
84 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/openvpn
$(IDIR_OPENVPN
)/usr
/sbin
/
85 $(RSTRIP
) $(IDIR_OPENVPN
)
86 echo
"Depends: $(PKG_DEPEND)" >> $(IDIR_OPENVPN
)/CONTROL
/control
87 $(IPKG_BUILD
) $(IDIR_OPENVPN
) $(PACKAGE_DIR
)