port libnet to buildroot-ng
[openwrt/svn-archive/archive.git] / net / chillispot / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=chillispot
6 PKG_VERSION:=1.0
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=997827a9302a85920cfbc1334092ac0c
9
10 PKG_SOURCE_URL:=http://www.chillispot.org/download
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 $(INCLUDE_DIR)/package.mk
18
19 define Package/chillispot
20 SECTION:=net
21 CATEGORY:=Network
22 DEPENDS:=@+PACKAGE_KMOD_TUN
23 TITLE:=Wireless LAN HotSpot controller
24 DESCRIPTION:=Wireless LAN HotSpot controller\\\
25 ChilliSpot is an open source captive portal or wireless LAN \\\
26 access point controller. It is used for authenticating users \\\
27 of a wireless LAN. It supports web based login which is today's \\\
28 standard for public HotSpots and it supports Wireless Protected \\\
29 Access (WPA) which is the standard of the future. Authentication, \\\
30 authorization and accounting (AAA) is handled by your favorite \\\
31 radius server.
32 URL:=http://www.chillispot.org/
33 endef
34
35 define Package/chillispot/conffiles
36 /etc/chilli.conf
37 endef
38
39 define Build/Configure
40 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
41 $(TARGET_CONFIGURE_OPTS) \
42 CFLAGS="$(TARGET_CFLAGS)" \
43 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
44 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
45 ac_cv_func_malloc_0_nonnull=yes \
46 ac_cv_func_memcmp_working=yes \
47 ac_cv_func_setvbuf_reversed=no \
48 ./configure \
49 --target=$(GNU_TARGET_NAME) \
50 --host=$(GNU_TARGET_NAME) \
51 --build=$(GNU_HOST_NAME) \
52 --program-prefix="" \
53 --program-suffix="" \
54 --prefix=/usr \
55 --exec-prefix=/usr \
56 --bindir=/usr/bin \
57 --datadir=/usr/share \
58 --includedir=/usr/include \
59 --infodir=/usr/share/info \
60 --libdir=/usr/lib \
61 --libexecdir=/usr/lib \
62 --localstatedir=/var \
63 --mandir=/usr/share/man \
64 --sbindir=/usr/sbin \
65 --sysconfdir=/etc \
66 $(DISABLE_LARGEFILE) \
67 $(DISABLE_NLS) \
68 --enable-shared \
69 --disable-static \
70 --with-gnu-ld \
71 );
72 endef
73
74 define Build/Compile
75 rm -rf $(PKG_INSTALL_DIR)
76 mkdir -p $(PKG_INSTALL_DIR)
77 $(MAKE) -C $(PKG_BUILD_DIR) \
78 $(TARGET_CONFIGURE_OPTS) \
79 DESTDIR="$(PKG_INSTALL_DIR)" \
80 all install
81 endef
82
83 define Package/chillispot/install
84 install -m0755 -d $(1)/etc/init.d
85 install -m0755 ./files/$(PKG_NAME).init $(1)/etc/init.d/chilli
86 install -m0755 -d $(1)/etc
87 install -m0644 $(PKG_BUILD_DIR)/doc/chilli.conf $(1)/etc/
88 install -m0755 -d $(1)/usr/sbin
89 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/chilli $(1)/usr/sbin/
90 endef
91
92 $(eval $(call BuildPackage,chillispot))