packages: Use $(CP) instead of $(INSTALL_BIN) for binaries.
[packages.git] / net / rp-l2tp / 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:=rp-l2tp
12 PKG_VERSION:=0.4
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/rp-l2tp
17 PKG_MD5SUM:=0e45d11cb4fa6c56cce6b1d119733ed9
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/rp-l2tpd
25   SECTION:=net
26   CATEGORY:=Network
27   TITLE:=Roaring Penguin L2TP
28   URL:=http://sourceforge.net/projects/rp-l2tp/
29   TITLE+= daemon
30   SUBMENU:=dial-in/up
31 endef
32
33 define Package/rp-l2tpd/description
34         Roaring Penguin L2TP (Layer 2 Tunneling Protocol) implementation.
35 endef
36
37 # uses GNU configure
38 MAKE_FLAGS += \
39         DESTDIR="$(PKG_INSTALL_DIR)" \
40         all install
41
42 TARGET_CFLAGS := -I$(PKG_BUILD_DIR)/libevent $(TARGET_CFLAGS)
43
44 define Package/rp-l2tpd/install 
45         $(INSTALL_DIR) $(1)/etc
46         $(CP) $(PKG_INSTALL_DIR)/etc/l2tp.conf.example $(1)/etc/l2tp.conf
47         $(INSTALL_DIR) $(1)/usr/lib/l2tp
48         $(INSTALL_DIR) $(1)/usr/sbin
49         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/l2tpd $(1)/usr/sbin/
50         $(INSTALL_DIR) $(1)/etc/init.d
51         $(INSTALL_BIN) ./files/rp-l2tpd.init $(1)/etc/init.d/rp-l2tpd
52         $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tp/cmd.so $(1)/usr/lib/l2tp/
53         $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tp/sync-pppd.so $(1)/usr/lib/l2tp/
54         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/l2tp-control $(1)/usr/sbin/
55 endef
56
57 #define Package/rp-l2tpd-mod-cmd/install        
58 #       $(INSTALL_DIR) $(1)/usr/lib/l2tp
59 #       $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tp/cmd.so $(1)/usr/lib/l2tp/
60 #       $(INSTALL_DIR) $(1)/usr/sbin
61 #       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/l2tp-control $(1)/usr/sbin/
62 #endef
63
64 #define Package/rp-l2tpd-mod-ppp/install
65 #       $(INSTALL_DIR) $(1)/usr/lib/l2tp
66 #       $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tp/sync-pppd.so $(1)/usr/lib/l2tp/
67 #endef
68
69 $(eval $(call BuildPackage,rp-l2tpd))
70 #$(eval $(call BuildPackage,rp-l2tpd-mod-cmd))
71 #$(eval $(call BuildPackage,rp-l2tpd-mod-ppp))