packages: Use $(CP) instead of $(INSTALL_BIN) for binaries.
[openwrt/svn-archive/archive.git] / net / nodogsplash / Makefile
1 #
2 # Copyright (C) 2007 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:=nodogsplash
12 PKG_VERSION:=0.9_beta8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://kokoro.ucsd.edu/nodogsplash/ \
17 http://kokoro.ucsd.edu/nodogsplash/old/
18 PKG_MD5SUM:=74269856452b9ef6d8719a6b46bae56d
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/nodogsplash
26 SUBMENU:=Captive Portals
27 SECTION:=net
28 CATEGORY:=Network
29 DEPENDS:=+libpthread
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 mkdir -p $(PKG_INSTALL_DIR)/usr/{share{,/doc/$(PKG_NAME)-$(PKG_VERSION)},lib,include{,/nodogsplash},bin,sbin}/
49 $(MAKE) -C $(PKG_BUILD_DIR) \
50 DESTDIR="$(PKG_INSTALL_DIR)" \
51 mkinstalldirs="$(SHELL) $(PKG_BUILD_DIR)/config/mkinstalldirs" \
52 install
53 endef
54
55 define Package/nodogsplash/install
56 $(INSTALL_DIR) $(1)/usr/bin
57 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
58 $(INSTALL_DIR) $(1)/usr/lib/
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,nodogsplash))