-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
85 lines (66 loc) · 1.78 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#
# Copyright (C) 2008-2015 The LuCI Team <[email protected]>
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-pptp-server
# Version == major.minor.patch
# increase on new functionality (minor) or patches (patch)
PKG_VERSION:=0.1
# Release == build
# increase on changes of translation files
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Ben Lapid <[email protected]>
# LuCI specific settings
LUCI_TITLE:=LuCI GUI For PPTP Server
LUCI_DEPENDS:=+pptpd +kmod-mppe +ppp
LUCI_PKGARCH:=all
# call BuildPackage - OpenWrt buildroot signature
#
# Copyright (C) 2009
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=admin
CATEGORY:=services
SUBMENU:=PPTP Server
TITLE:=$(LUCI_TITLE)
DEPENDS:=
endef
define Package/$(PKG_NAME)/description
$(LUCI_TITLE)
endef
define Build/Prepare
for d in luasrc htdocs root; do \
if [ -d ./$$$$d ]; then \
mkdir -p $(PKG_BUILD_DIR)/$$$$d; \
$(CP) ./$$$$d/* $(PKG_BUILD_DIR)/$$$$d/; \
fi; \
done
endef
define Build/Configure
endef
define Build/Compile
endef
HTDOCS = /www
LUA_LIBRARYDIR = /usr/lib/lua
LUCI_LIBRARYDIR = $(LUA_LIBRARYDIR)/luci
define Package/$(PKG_NAME)/install
if [ -d $(PKG_BUILD_DIR)/luasrc ]; then \
$(INSTALL_DIR) $(1)$(LUCI_LIBRARYDIR); \
cp -pR $(PKG_BUILD_DIR)/luasrc/* $(1)$(LUCI_LIBRARYDIR)/; \
else true; fi
if [ -d $(PKG_BUILD_DIR)/htdocs ]; then \
$(INSTALL_DIR) $(1)$(HTDOCS); \
cp -pR $(PKG_BUILD_DIR)/htdocs/* $(1)$(HTDOCS)/; \
else true; fi
if [ -d $(PKG_BUILD_DIR)/root ]; then \
$(INSTALL_DIR) $(1)/; \
cp -pR $(PKG_BUILD_DIR)/root/* $(1)/; \
else true; fi
endef
$(eval $(call BuildPackage,$(PKG_NAME)))