packages: add missing conffiles define
[packages.git] / net / nodogsplash / Makefile
1 #
2 # Copyright (C) 2007-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=nodogsplash
11 PKG_VERSION:=0.9_beta9.9.6
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://kokoro.ucsd.edu/nodogsplash/ \
16         http://kokoro.ucsd.edu/nodogsplash/old/
17 PKG_MD5SUM:=3ba0d862b4d63ecf97f16176a486faed
18
19 PKG_FIXUP:=libtool
20 PKG_BUILD_PARALLEL:=1
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/nodogsplash
26   SUBMENU:=Captive Portals
27   SECTION:=net
28   CATEGORY:=Network
29   DEPENDS:=+libpthread +iptables-mod-ipopt
30   TITLE:=Open public network gateway daemon
31   URL:=http://kokoro.ucsd.edu/nodogsplash/
32 endef
33
34 define Package/nodogsplash/description
35         Nodogsplash offers a simple way to open a free hotspot providing restricted access to an
36         internet connection. It is intended for use on wireless access points running OpenWRT
37         (but may also work on other Linux-based devices).
38 endef
39
40 define Build/Configure
41         $(call Build/Configure/Default,\
42                 --enable-static \
43                 --enable-shared \
44         )
45 endef
46
47 define Build/Compile
48         $(call Build/Compile/Default, \
49                 mkinstalldirs="$(INSTALL_DIR)")
50 endef
51
52 define Build/Install
53         mkdir -p $(PKG_INSTALL_DIR)/usr/{share{,/doc/$(PKG_NAME)-$(PKG_VERSION)},lib,include{,/nodogsplash},bin,sbin}/
54         $(call Build/Install/Default, \
55                 mkinstalldirs="$(INSTALL_DIR)" \
56                 install)
57 endef
58
59 define Package/nodogsplash/install
60         $(INSTALL_DIR) $(1)/usr/bin
61         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
62         $(INSTALL_DIR) $(1)/usr/lib/
63         $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
64         $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
65         $(INSTALL_CONF) $(PKG_BUILD_DIR)/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME)/
66         $(SED) 's,br0,br-lan,' $(1)/etc/$(PKG_NAME)/$(PKG_NAME).conf
67         $(CP) $(PKG_BUILD_DIR)/htdocs $(1)/etc/$(PKG_NAME)/
68         $(INSTALL_DIR) $(1)/etc/init.d
69         $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
70         $(SED) 's,\(do_module_tests "imq"\),#\1,' $(1)/etc/init.d/$(PKG_NAME)
71         $(SED) 's,\(do_module_tests "ipt_IMQ"\),#\1,' $(1)/etc/init.d/$(PKG_NAME)
72         $(SED) 's,\(do_module_tests "sch_htb"\),#\1,' $(1)/etc/init.d/$(PKG_NAME)
73 endef
74
75 define Package/nodogsplash/conffiles
76 /etc/nodogsplash/nodogsplash.conf
77 endef
78
79 $(eval $(call BuildPackage,nodogsplash))