use Build/Configure/Default macro, Makefile cleanup
[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
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/open1x
17 PKG_MD5SUM:=f66c49cd6e4f331d05bf83513ed91990
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:=\
31 This software allows a GNU/Linux or BSD workstation to authenticate with \\\
32 a RADIUS server using 802.1x and various EAP protocols.
33 URL:=http://open1x.sourceforge.net/
34 endef
35
36 define Package/xsupplicant/conffiles
37 /etc/xsupplicant.conf
38 endef
39
40 define Build/Configure
41 (cd $(PKG_BUILD_DIR); touch \
42 configure.in \
43 aclocal.m4 \
44 Makefile.in \
45 configure \
46 );
47 $(call Build/Configure/Default, \
48 --with-openssl="$(STAGING_DIR)/usr" \
49 --with-madwifi-path="$(STAGING_DIR)/usr/include/madwifi" \
50 , \
51 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/madwifi" \
52 )
53 endef
54
55 define Build/Compile
56 $(MAKE) -C $(PKG_BUILD_DIR) \
57 DESTDIR=$(PKG_INSTALL_DIR) \
58 all install
59 endef
60
61 define Package/xsupplicant/install
62 install -d -m0755 $(1)/etc
63 install -m0644 $(PKG_BUILD_DIR)/etc/xsupplicant.conf $(1)/etc/
64 install -d -m0755 $(1)/usr/bin
65 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xsup_* $(1)/usr/bin/
66 install -d -m0755 $(1)/usr/sbin
67 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/xsupplicant $(1)/usr/sbin/
68 endef
69
70 $(eval $(call BuildPackage,xsupplicant))