add squashfs 2.2 for kernel 2.6, cleanup broadcom patch, remove .orig files
[openwrt.git] / openwrt / package / openvpn / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=openvpn
6 PKG_VERSION:=2.0.1
7 PKG_RELEASE:=2
8 PKG_MD5SUM:=fad7a08c0d68371c2c0e6428bcb98fa5
9
10 PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,OPENVPN,openvpn,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 PKG_DEPEND:="libopenssl, kmod-tun"
22 ifneq ($(BR2_PACKAGE_OPENVPN_LZO),y)
23 DISABLE_LZO:=--disable-lzo
24 else
25 PKG_DEPEND+=", liblzo"
26 endif
27
28 ifneq ($(BR2_PACKAGE_OPENVPN_SERVER),y)
29 DISABLE_SERVER:=--disable-server
30 endif
31
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" \
38 ./configure \
39 --target=$(GNU_TARGET_NAME) \
40 --host=$(GNU_TARGET_NAME) \
41 --build=$(GNU_HOST_NAME) \
42 --program-prefix="" \
43 --program-suffix="" \
44 --prefix=/usr \
45 --exec-prefix=/usr \
46 --bindir=/usr/bin \
47 --datadir=/usr/share \
48 --includedir=/usr/include \
49 --infodir=/usr/share/info \
50 --libdir=/usr/lib \
51 --libexecdir=/usr/lib \
52 --localstatedir=/var \
53 --mandir=/usr/share/man \
54 --sbindir=/usr/sbin \
55 --sysconfdir=/etc \
56 $(DISABLE_LARGEFILE) \
57 $(DISABLE_NLS) \
58 --enable-shared \
59 --disable-static \
60 --disable-pthread \
61 --disable-debug \
62 --disable-plugins \
63 --disable-management \
64 --disable-socks \
65 --disable-http \
66 $(DISABLE_LZO) \
67 $(DISABLE_SERVER) \
68 );
69 touch $(PKG_BUILD_DIR)/.configured
70
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)" \
76 install
77 touch $(PKG_BUILD_DIR)/.built
78
79 $(IPKG_OPENVPN):
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)
85
This page took 0.050301 seconds and 5 git commands to generate.