3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=4bd7a42991c93db23842a0992debe53b
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
:="kmod-tun"
23 ifneq ($(BR2_COMPILE_OPENVPN_WITH_OPENSSL
),y
)
24 DISABLE_OPENSSL
:=--disable-ssl
--disable-crypto
26 PKG_DEPEND
+=", libopenssl"
29 ifneq ($(BR2_COMPILE_OPENVPN_WITH_LZO
),y
)
30 DISABLE_LZO
:=--disable-lzo
32 PKG_DEPEND
+=", liblzo"
35 ifneq ($(BR2_COMPILE_OPENVPN_WITH_SERVER
),y
)
36 DISABLE_SERVER
:=--disable-server
38 ifneq ($(BR2_COMPILE_OPENVPN_WITH_HTTP
),y
)
39 DISABLE_HTTP
:=--disable-http
42 $(PKG_BUILD_DIR
)/.configured
:
43 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
44 $(TARGET_CONFIGURE_OPTS
) \
45 CFLAGS
="$(strip $(TARGET_CFLAGS))" \
46 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
47 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
49 --target
=$(GNU_TARGET_NAME
) \
50 --host
=$(GNU_TARGET_NAME
) \
51 --build
=$(GNU_HOST_NAME
) \
57 --datadir=/usr
/share \
58 --includedir=/usr
/include \
59 --infodir=/usr
/share
/info \
61 --libexecdir
=/usr
/lib \
62 --localstatedir
=/var \
63 --mandir=/usr
/share
/man \
66 $(DISABLE_LARGEFILE
) \
73 --disable-management \
80 touch
$(PKG_BUILD_DIR
)/.configured
82 $(PKG_BUILD_DIR
)/.built
:
83 $(MAKE
) -C
$(PKG_BUILD_DIR
)
84 mkdir
-p
$(PKG_INSTALL_DIR
)
85 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
86 DESTDIR
="$(PKG_INSTALL_DIR)" \
88 touch
$(PKG_BUILD_DIR
)/.built
91 install -d
-m0755
$(IDIR_OPENVPN
)/usr
/sbin
92 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/openvpn
$(IDIR_OPENVPN
)/usr
/sbin
/
93 $(RSTRIP
) $(IDIR_OPENVPN
)
94 echo
"Depends: $(PKG_DEPEND)" >> $(IDIR_OPENVPN
)/CONTROL
/control
95 $(IPKG_BUILD
) $(IDIR_OPENVPN
) $(PACKAGE_DIR
)