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