3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=7401faebc6baee9add32608709c54eec
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
:="openssl, kmod-tun"
22 ifneq ($(BR2_PACKAGE_OPENVPN_LZO
),y
)
23 DISABLE_LZO
:=--disable-lzo
28 ifneq ($(BR2_PACKAGE_OPENVPN_SERVER
),y
)
29 DISABLE_SERVER
:=--disable-server
32 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
33 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
34 $(TARGET_CONFIGURE_OPTS
) \
35 CFLAGS
="$(strip $(TARGET_CFLAGS))" \
36 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
37 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
39 --target
=$(GNU_TARGET_NAME
) \
40 --host
=$(GNU_TARGET_NAME
) \
41 --build
=$(GNU_HOST_NAME
) \
47 --datadir=/usr
/share \
48 --includedir=/usr
/include \
49 --infodir=/usr
/share
/info \
51 --libexecdir
=/usr
/lib \
52 --localstatedir
=/var \
53 --mandir=/usr
/share
/man \
56 $(DISABLE_LARGEFILE
) \
63 --disable-management \
69 touch
$(PKG_BUILD_DIR
)/.configured
71 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
72 $(MAKE
) -C
$(PKG_BUILD_DIR
)
73 mkdir
-p
$(PKG_INSTALL_DIR
)
74 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
75 DESTDIR
="$(PKG_INSTALL_DIR)" \
77 touch
$(PKG_BUILD_DIR
)/.built
80 install -d
-m0755
$(IDIR_OPENVPN
)/usr
/sbin
81 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/openvpn
$(IDIR_OPENVPN
)/usr
/sbin
/
82 $(RSTRIP
) $(IDIR_OPENVPN
)
83 echo
"Depends: $(PKG_DEPEND)" >> $(IDIR_OPENVPN
)/CONTROL
/control
84 $(IPKG_BUILD
) $(IDIR_OPENVPN
) $(PACKAGE_DIR
)