-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
77 lines (62 loc) · 2.16 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
#
# Copyright (C) 2019-2021 Tiou <[email protected]>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-tinyfecvpn
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tiou <[email protected]>
include $(INCLUDE_DIR)/package.mk
PKG_BUILD_DEPENDS:=luci
define Package/$(PKG_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=LuCI Support for tinyFecVPN
PKGARCH:=all
endef
define Package/$(PKG_NAME)/description
LuCI Support for tinyFecVPN.
endef
define Build/Prepare
$(foreach po,$(wildcard ${CURDIR}/files/luci/i18n/*.po), \
po2lmo $(po) $(PKG_BUILD_DIR)/$(patsubst %.po,%.lmo,$(notdir $(po)));)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
( . /etc/uci-defaults/88_luci-tinyfecvpn ) && rm -f /etc/uci-defaults/88_luci-tinyfecvpn
fi
exit 0
endef
define Package/$(PKG_NAME)/conffiles
/etc/config/tinyfecvpn
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
$(INSTALL_DATA) $(PKG_BUILD_DIR)/tinyfecvpn.*.lmo $(1)/usr/lib/lua/luci/i18n/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller
$(INSTALL_DATA) ./files/luci/controller/*.lua $(1)/usr/lib/lua/luci/controller/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model
$(INSTALL_DATA) ./files/luci/model/*.lua $(1)/usr/lib/lua/luci/model/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/tinyfecvpn
$(INSTALL_DATA) ./files/luci/model/cbi/tinyfecvpn/*.lua $(1)/usr/lib/lua/luci/model/cbi/tinyfecvpn/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/view/tinyfecvpn
$(INSTALL_DATA) ./files/luci/view/tinyfecvpn/*.htm $(1)/usr/lib/lua/luci/view/tinyfecvpn/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/root/etc/config/tinyfecvpn $(1)/etc/config/tinyfecvpn
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/root/etc/init.d/tinyfecvpn $(1)/etc/init.d/tinyfecvpn
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/root/etc/uci-defaults/88_luci-tinyfecvpn $(1)/etc/uci-defaults/88_luci-tinyfecvpn
endef
$(eval $(call BuildPackage,$(PKG_NAME)))