3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=9fd263078c0c18448f7d5a0e0a919f62
10 PKG_SOURCE_URL
:=http
://openvpn.net
/release @SF
/openvpn
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
12 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
14 PKG_IPK
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
15 PKG_IPK_DIR
:=$(PKG_BUILD_DIR
)/ipkg
17 ifneq ($(BR2_PACKAGE_OPENVPN_LZO
),y
)
18 DISABLE_LZO
:=--disable-lzo
21 ifneq ($(BR2_PACKAGE_OPENVPN_SERVER
),y
)
22 DISABLE_SERVER
:=--disable-server
25 $(DL_DIR
)/$(PKG_SOURCE
):
26 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
28 $(PKG_BUILD_DIR
)/.unpacked
: $(DL_DIR
)/$(PKG_SOURCE
)
29 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
30 touch
$(PKG_BUILD_DIR
)/.unpacked
32 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.unpacked
33 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
34 $(TARGET_CONFIGURE_OPTS
) \
35 CFLAGS
="$(TARGET_CFLAGS)" \
37 --target
=$(GNU_TARGET_NAME
) \
38 --host
=$(GNU_TARGET_NAME
) \
39 --build
=$(GNU_HOST_NAME
) \
44 --libexecdir
=/usr
/lib \
46 --datadir=/usr
/share \
47 --localstatedir
=/var \
54 --disable-management \
60 touch
$(PKG_BUILD_DIR
)/.configured
62 $(PKG_BUILD_DIR
)/openvpn
: $(PKG_BUILD_DIR
)/.configured
63 $(MAKE
) -C
$(PKG_BUILD_DIR
)
65 $(PKG_IPK
): $(PKG_BUILD_DIR
)/openvpn
66 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
67 mkdir
-p
$(PKG_IPK_DIR
)/usr
/sbin
68 cp
$(PKG_BUILD_DIR
)/openvpn
$(PKG_IPK_DIR
)/usr
/sbin
/
69 $(STRIP
) $(PKG_IPK_DIR
)/usr
/sbin
/*
70 mkdir
-p
$(PACKAGE_DIR
)
71 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
73 $(IPKG_STATE_DIR
)/info/openvpn.list
: $(PKG_IPK
)
74 $(IPKG
) install $(PKG_IPK
)
76 source
: $(DL_DIR
)/$(PKG_SOURCE
)
77 prepare
: $(PKG_BUILD_DIR
)/.unpacked
79 install: $(IPKG_STATE_DIR
)/info/openvpn.list
82 rm -rf
$(PKG_BUILD_DIR
)