add submenus to several packages
[openwrt/svn-archive/archive.git] / net / pptpd / 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:=pptpd
12 PKG_VERSION:=1.3.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/poptop
17 PKG_MD5SUM:=75d494e881f7027f4e60b114163f6b67
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/pptpd
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+kmod-ppp +kmod-gre
29 TITLE:=PopTop pptp server
30 URL:=http://www.poptop.org/
31 SUBMENU:=dial-in/up
32 endef
33
34 define Build/Configure
35 $(call Build/Configure/Default, \
36 --with-bcrelay \
37 )
38 endef
39
40 define Build/Compile
41 $(call Build/Compile/Default, \
42 COPTS="$(TARGET_CFLAGS)" \
43 DESTDIR="$(PKG_INSTALL_DIR)" \
44 INSTALL="install" \
45 all install \
46 )
47 endef
48
49 define Package/pptpd/install
50 $(INSTALL_DIR) $(1)/usr/sbin
51 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pptpd $(1)/usr/sbin/
52 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pptpctrl $(1)/usr/sbin/
53 $(INSTALL_DIR) $(1)/usr/lib/pptpd
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pptpd/* $(1)/usr/lib/pptpd
55 $(INSTALL_DIR) $(1)/etc
56 $(INSTALL_DATA) ./files/pptpd.conf $(1)/etc/
57 $(INSTALL_DIR) $(1)/etc/init.d
58 $(INSTALL_BIN) ./files/pptpd.init $(1)/etc/init.d/pptpd
59 $(INSTALL_DIR) $(1)/etc/ppp
60 $(INSTALL_DATA) ./files/options.pptpd $(1)/etc/ppp/
61 endef
62
63 $(eval $(call BuildPackage,pptpd))