e7b01ac3ae0fd34dc4e2747bea50396bedf90b65
[openwrt/svn-archive/archive.git] / net / xsupplicant / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=xsupplicant
12 PKG_VERSION:=1.2.7
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=f66c49cd6e4f331d05bf83513ed91990
15
16 PKG_SOURCE_URL:=@SF/open1x
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/xsupplicant
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libopenssl +wireless-tools
29 TITLE:=A fully compliant 802.1x authenticator
30 DESCRIPTION:=This software allows a GNU/Linux or BSD workstation to authenticate with\\\
31 a RADIUS server using 802.1x and various EAP protocols.\\\
32 URL:=http://open1x.sourceforge.net/
33 endef
34
35 define Package/xsupplicant/conffiles
36 /etc/xsupplicant.conf
37 endef
38
39 define Build/Configure
40 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
41 touch configure.in; \
42 touch aclocal.m4; \
43 touch Makefile.in; \
44 touch configure; \
45 $(TARGET_CONFIGURE_OPTS) \
46 CFLAGS="$(TARGET_CFLAGS)" \
47 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \
48 -I$(PKG_BUILD_DIR)/lib/libxsupconfig/ \
49 -I$(STAGING_DIR)/usr/include/madwifi" \
50 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
51 CC="$(TARGET_CROSS)gcc" \
52 ./configure \
53 --target=$(GNU_TARGET_NAME) \
54 --host=$(GNU_TARGET_NAME) \
55 --build=$(GNU_HOST_NAME) \
56 --program-prefix="" \
57 --program-suffix="" \
58 --prefix=/usr \
59 --exec-prefix=/usr \
60 --bindir=/usr/bin \
61 --datadir=/usr/share \
62 --includedir=/usr/include \
63 --infodir=/usr/share/info \
64 --libdir=/usr/lib \
65 --libexecdir=/usr/lib \
66 --localstatedir=/var \
67 --mandir=/usr/share/man \
68 --sbindir=/usr/sbin \
69 --sysconfdir=/etc \
70 $(DISABLE_LARGEFILE) \
71 $(DISABLE_NLS) \
72 --with-openssl="$(STAGING_DIR)/usr" \
73 --with-madwifi-path="$(STAGING_DIR)/usr/include/madwifi" \
74 );
75 endef
76
77 define Build/Compile
78 rm -rf $(PKG_INSTALL_DIR)
79 mkdir -p $(PKG_INSTALL_DIR)
80 $(MAKE) -C $(PKG_BUILD_DIR) \
81 CC="$(TARGET_CC)" \
82 DESTDIR=$(PKG_INSTALL_DIR) \
83 all install
84 endef
85
86 define Package/xsupplicant/install
87 install -d -m0755 $(1)/etc
88 install -m0644 $(PKG_BUILD_DIR)/etc/xsupplicant.conf $(1)/etc/
89 install -d -m0755 $(1)/usr/bin
90 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xsup_* $(1)/usr/bin/
91 install -d -m0755 $(1)/usr/sbin
92 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/xsupplicant $(1)/usr/sbin/
93 endef
94
95 $(eval $(call BuildPackage,xsupplicant))