37ea89eb6c4335114dcafd4ef804a481090c2449
[openwrt/svn-archive/archive.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 PKG_MD5SUM:=0e45d11cb4fa6c56cce6b1d119733ed9
15
16 PKG_SOURCE_URL:=@SF/rp-l2tp
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/rp-l2tpd
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=an L2TP (Layer 2 Tunneling Protocol) daemon
29 DESCRIPTION:=An L2TP (Layer 2 Tunneling Protocol) daemon.
30 URL:=http://sourceforge.net/projects/rp-l2tp/
31 MENU:=1
32 endef
33
34 define Package/rp-l2tpd-mod-cmd
35 SECTION:=net
36 CATEGORY:=Network
37 DEPENDS:=rp-l2tpd
38 TITLE:=a simple command handler for the L2TP daemon
39 endef
40
41 define Package/rp-l2tpd-mod-ppp
42 SECTION:=net
43 CATEGORY:=Network
44 DEPENDS:=rp-l2tpd
45 TITLE:=a PPP handler for the L2TP daeomon
46 endef
47
48 define Build/Compile
49 $(call Build/Compile/Default,DESTDIR="$(PKG_INSTALL_DIR)" all install)
50 endef
51
52 define Package/rp-l2tpd/install
53 install -d -m0755 $(1)/etc
54 $(CP) $(PKG_INSTALL_DIR)/etc/l2tp.conf.example $(1)/etc/l2tp.conf
55 install -d -m0755 $(1)/etc/init.d
56 install -m0755 ./files/rp-l2tpd.init $(1)/etc/init.d/rp-l2tpd
57 install -d -m0755 $(1)/usr/lib/l2tp
58 install -d -m0755 $(1)/usr/sbin
59 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/l2tpd $(1)/usr/sbin/
60 endef
61
62 define Package/rp-l2tpd-mod-cmd/install
63 install -d -m0755 $(1)/usr/lib/l2tp
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tp/cmd.so $(1)/usr/lib/l2tp/
65 install -d -m0755 $(1)/usr/sbin
66 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/l2tp-control $(1)/usr/sbin/
67 endef
68
69 define Package/rp-l2tpd-mod-ppp/install
70 install -d -m0755 $(1)/usr/lib/l2tp
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tp/sync-pppd.so $(1)/usr/lib/l2tp/
72 endef
73
74 $(eval $(call BuildPackage,rp-l2tpd))
75 $(eval $(call BuildPackage,rp-l2tpd-mod-cmd))
76 $(eval $(call BuildPackage,rp-l2tpd-mod-ppp))
77
78