a538e8fa3866bf2aeb6ec5f7dc632e671f169023
[packages.git] / net / wifidog / 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:=wifidog
12 PKG_VERSION:=1.1.3_beta2
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=ba1611c7eb959f9c6f93e12b97d70b82
15
16 PKG_SOURCE_URL:= @SF/$(PKG_NAME)
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/wifidog
26   SECTION:=net
27   CATEGORY:=Network
28   DEPENDS:=+iptables-mod-extra
29   TITLE:=A wireless captive portal solution
30   DESCRIPTION:=The Wifidog project is a complete and embeddable captive
31   portal solution for wireless community groups or individuals\\\
32   who wish to open a free Hotspot while still preventing abuse\\\
33   of their Internet connection.\\\
34   URL:=http://www.wifidog.org
35 endef
36
37 define Package/wifidog/conffiles
38 /etc/wifidog.conf
39 endef
40
41 define Build/Configure
42         $(call Build/Configure/Default)
43 endef
44
45 define Build/Compile
46         $(MAKE) -C $(PKG_BUILD_DIR) \
47                 $(TARGET_CONFIGURE_OPTS)
48         mkdir -p $(PKG_INSTALL_DIR)
49         $(MAKE) -C $(PKG_BUILD_DIR) \
50                 DESTDIR="$(PKG_INSTALL_DIR)" \
51                 install
52 endef
53         
54 define Package/wifidog/install
55         install -m0755 -d $(1)/etc/init.d
56         install -m0755 ./files/$(PKG_NAME).init $(1)/etc/init.d/wifidog
57         install -m0644 ./files/wifidog.conf $(1)/etc/
58         install -m0755 -d $(1)/usr/bin
59         install -m0755 -d $(1)/usr/lib
60         install -m0755 $(PKG_BUILD_DIR)/scripts/init.d/wifidog $(1)/usr/bin/wifidog-init
61         $(CP) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/
62         $(CP) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/
63         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,wifidog))