source: trunk/make/openvpn/openvpn.mk @ 14411

Letzte Änderung dieser Datei seit 14411 war 14411, erstellt von er13 vor 3 Monaten

package Makefiles:

  • use PKG_ADD_EXTRA_FLAGS macro introduced in r14374 as much as possible
Dateigröße: 5.1 KB
Zeile 
1$(call PKG_INIT_BIN, $(if $(FREETZ_PACKAGE_OPENVPN_VERSION_2_4),2.4.3,2.3.17))
2$(PKG)_SOURCE_SHA256_2.3.17:=d300029416b045666f2dc957bdde407ba97894428b5ad8433df789e793ccc1d3
3$(PKG)_SOURCE_SHA256_2.4.3 :=15e15fc97f189b52aee7c90ec8355aa77469c773125110b4c2f089abecde36fb
4$(PKG)_SOURCE_SHA256:=$($(PKG)_SOURCE_SHA256_$($(PKG)_VERSION))
5$(PKG)_SOURCE:=$(pkg)-$($(PKG)_VERSION).tar.xz
6$(PKG)_SITE:=https://swupdate.openvpn.net/community/releases,http://build.openvpn.net/downloads/releases
7
8$(PKG)_CONDITIONAL_PATCHES+=$(call GET_MAJOR_VERSION,$($(PKG)_VERSION))
9ifeq ($(strip $(FREETZ_PACKAGE_OPENVPN_WITH_TRAFFIC_OBFUSCATION)),y)
10$(PKG)_CONDITIONAL_PATCHES+=$(call GET_MAJOR_VERSION,$($(PKG)_VERSION))/obfuscation
11endif
12
13ifeq ($(strip $(FREETZ_PACKAGE_OPENVPN_VERSION_2_3)),y)
14$(PKG)_PATCH_POST_CMDS += $(call POLARSSL_HARDCODE_VERSION,13,configure include/*.h src/openvpn/*.h src/openvpn/*.c)
15endif
16
17$(PKG)_BINARY:=$($(PKG)_DIR)/src/openvpn/openvpn
18$(PKG)_TARGET_BINARY:=$($(PKG)_DEST_DIR)/usr/sbin/openvpn
19
20$(PKG)_STARTLEVEL=81
21
22$(PKG)_DEPENDS_ON += $(if $(FREETZ_PACKAGE_OPENVPN_OPENSSL),openssl)
23$(PKG)_DEPENDS_ON += $(if $(FREETZ_PACKAGE_OPENVPN_POLARSSL),polarssl13)
24$(PKG)_DEPENDS_ON += $(if $(FREETZ_PACKAGE_OPENVPN_MBEDTLS),mbedtls)
25$(PKG)_DEPENDS_ON += $(if $(FREETZ_PACKAGE_OPENVPN_WITH_LZO),lzo)
26$(PKG)_DEPENDS_ON += $(if $(FREETZ_PACKAGE_OPENVPN_WITH_LZ4),lz4)
27
28$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_VERSION_2_3
29$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_VERSION_2_4
30$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_OPENSSL
31$(PKG)_REBUILD_SUBOPTS += FREETZ_OPENSSL_SHLIB_VERSION
32$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_POLARSSL
33$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_MBEDTLS
34$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_WITH_LZO
35$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_WITH_LZ4
36$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_WITH_TRAFFIC_OBFUSCATION
37$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_WITH_MGMNT
38$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_ENABLE_SMALL
39$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_USE_IPROUTE
40$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_OPENVPN_STATIC
41$(PKG)_REBUILD_SUBOPTS += FREETZ_TARGET_IPV6_SUPPORT
42$(PKG)_REBUILD_SUBOPTS += $(if $(FREETZ_PACKAGE_OPENVPN_POLARSSL),FREETZ_LIB_libpolarssl13_WITH_BLOWFISH)
43$(PKG)_REBUILD_SUBOPTS += $(if $(FREETZ_PACKAGE_OPENVPN_MBEDTLS),FREETZ_LIB_libmbedcrypto_WITH_BLOWFISH)
44
45$(PKG)_CONFIGURE_OPTIONS += --disable-http-proxy
46$(PKG)_CONFIGURE_PRE_CMDS += $(call PKG_PREVENT_RPATH_HARDCODING,./configure)
47$(PKG)_CONFIGURE_PRE_CMDS += $(call PKG_MAKE_AC_VARIABLES_PACKAGE_SPECIFIC,lib_polarssl_ssl_init lib_polarssl_aes_crypt_cbc)
48$(PKG)_CONFIGURE_PRE_CMDS += $(call PKG_MAKE_AC_VARIABLES_PACKAGE_SPECIFIC,lib_mbedtls_mbedtls_ssl_init)
49# don't cache any pkg_cv_* variable
50$(PKG)_CONFIGURE_PRE_CMDS += $(SED) -i -r -e 's,pkg_cv_,openvpn_,g' ./configure;
51
52$(PKG)_CONFIGURE_PRE_CMDS += $(call PKG_MAKE_AC_VARIABLES_PACKAGE_SPECIFIC,path_IFCONFIG path_IPROUTE path_ROUTE)
53$(PKG)_CONFIGURE_ENV += $(pkg)_path_IFCONFIG=/sbin/ifconfig
54$(PKG)_CONFIGURE_ENV += $(pkg)_path_IPROUTE=/sbin/ip
55$(PKG)_CONFIGURE_ENV += $(pkg)_path_ROUTE=/sbin/route
56
57$(PKG)_CONFIGURE_PRE_CMDS += $(call PKG_ADD_EXTRA_FLAGS,(C|LD)FLAGS|LIBS)
58
59$(PKG)_EXTRA_CFLAGS  += -ffunction-sections -fdata-sections
60$(PKG)_EXTRA_LDFLAGS += -Wl,--gc-sections
61$(PKG)_EXTRA_LDFLAGS += $(if $(FREETZ_PACKAGE_OPENVPN_STATIC),-all-static)
62
63$(PKG)_CONFIGURE_OPTIONS += --sysconfdir=/mod/etc/openvpn
64$(PKG)_CONFIGURE_OPTIONS += $(if $(FREETZ_PACKAGE_OPENVPN_WITH_LZO),--enable-lzo,--disable-lzo)
65$(PKG)_CONFIGURE_OPTIONS += $(if $(FREETZ_PACKAGE_OPENVPN_VERSION_2_4),$(if $(FREETZ_PACKAGE_OPENVPN_WITH_LZ4),--enable-lz4,--disable-lz4))
66$(PKG)_CONFIGURE_OPTIONS += --disable-debug
67$(PKG)_CONFIGURE_OPTIONS += --disable-multihome
68$(PKG)_CONFIGURE_OPTIONS += --disable-plugins
69$(PKG)_CONFIGURE_OPTIONS += --disable-port-share
70$(PKG)_CONFIGURE_OPTIONS += $(if $(FREETZ_PACKAGE_OPENVPN_WITH_MGMNT),--enable-management,--disable-management)
71$(PKG)_CONFIGURE_OPTIONS += --disable-pkcs11
72$(PKG)_CONFIGURE_OPTIONS += --disable-socks
73$(PKG)_CONFIGURE_OPTIONS += $(if $(FREETZ_PACKAGE_OPENVPN_OPENSSL),--with-crypto-library=openssl)
74$(PKG)_CONFIGURE_OPTIONS += $(if $(FREETZ_PACKAGE_OPENVPN_POLARSSL),--with-crypto-library=polarssl)
75$(PKG)_CONFIGURE_OPTIONS += $(if $(FREETZ_PACKAGE_OPENVPN_MBEDTLS),--with-crypto-library=mbedtls)
76$(PKG)_CONFIGURE_OPTIONS += $(if $(FREETZ_PACKAGE_OPENVPN_USE_IPROUTE),--enable-iproute2)
77$(PKG)_CONFIGURE_OPTIONS += $(if $(FREETZ_PACKAGE_OPENVPN_ENABLE_SMALL),--enable-small,--disable-small)
78$(PKG)_CONFIGURE_OPTIONS += $(if $(FREETZ_TARGET_IPV6_SUPPORT),--enable-ipv6,--disable-ipv6)
79
80$(PKG_SOURCE_DOWNLOAD)
81$(PKG_UNPACKED)
82$(PKG_CONFIGURED_CONFIGURE)
83
84$($(PKG)_BINARY): $($(PKG)_DIR)/.configured
85    $(SUBMAKE) -C $(OPENVPN_DIR) \
86        EXTRA_CFLAGS="$(OPENVPN_EXTRA_CFLAGS)" \
87        EXTRA_LDFLAGS="$(OPENVPN_EXTRA_LDFLAGS)" \
88        EXTRA_LIBS="$(OPENVPN_EXTRA_LIBS)" \
89        SOCKETS_LIBS=""
90
91$($(PKG)_TARGET_BINARY): $($(PKG)_BINARY)
92    $(INSTALL_BINARY_STRIP)
93
94$(pkg):
95
96$(pkg)-precompiled: $($(PKG)_TARGET_BINARY)
97
98$(pkg)-clean:
99    -$(SUBMAKE) -C $(OPENVPN_DIR) clean
100    $(RM) $(OPENVPN_FREETZ_CONFIG_FILE)
101
102$(pkg)-uninstall:
103    $(RM) $(OPENVPN_TARGET_BINARY)
104
105$(PKG_FINISH)
Hinweis: Hilfe zum Repository-Browser finden Sie in TracBrowser.