nodogsplash: mkinstalldirs script does not exist. Just use $(INSTALL_DIR).
[openwrt/svn-archive/archive.git] / net / nodogsplash / Makefile
1 #
2 # Copyright (C) 2007-2010 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:=1
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
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/nodogsplash
24 SUBMENU:=Captive Portals
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+libpthread +iptables-mod-ipopt
28 TITLE:=Open public network gateway daemon
29 URL:=http://kokoro.ucsd.edu/nodogsplash/
30 endef
31
32 define Package/nodogsplash/description
33 Nodogsplash offers a simple way to open a free hotspot providing restricted access to an
34 internet connection. It is intended for use on wireless access points running OpenWRT
35 (but may also work on other Linux-based devices).
36 endef
37
38 define Build/Configure
39 $(call Build/Configure/Default,\
40 --enable-static \
41 --enable-shared \
42 )
43 endef
44
45 define Build/Compile
46 mkdir -p $(PKG_INSTALL_DIR)/usr/{share{,/doc/$(PKG_NAME)-$(PKG_VERSION)},lib,include{,/nodogsplash},bin,sbin}/
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 DESTDIR="$(PKG_INSTALL_DIR)" \
49 mkinstalldirs="$(INSTALL_DIR)" \
50 install
51 endef
52
53 define Package/nodogsplash/install
54 $(INSTALL_DIR) $(1)/usr/bin
55 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
56 $(INSTALL_DIR) $(1)/usr/lib/
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
58 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
59 $(INSTALL_CONF) $(PKG_BUILD_DIR)/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME)/
60 $(SED) 's,br0,br-lan,' $(1)/etc/$(PKG_NAME)/$(PKG_NAME).conf
61 $(CP) $(PKG_BUILD_DIR)/htdocs $(1)/etc/$(PKG_NAME)/
62 $(INSTALL_DIR) $(1)/etc/init.d
63 $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
64 $(SED) 's,\(do_module_tests "imq"\),#\1,' $(1)/etc/init.d/$(PKG_NAME)
65 $(SED) 's,\(do_module_tests "ipt_IMQ"\),#\1,' $(1)/etc/init.d/$(PKG_NAME)
66 $(SED) 's,\(do_module_tests "sch_htb"\),#\1,' $(1)/etc/init.d/$(PKG_NAME)
67 endef
68
69 $(eval $(call BuildPackage,nodogsplash))