This repository was archived by the owner on Jul 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 334
/
Copy pathMakefile
76 lines (60 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
#
# Copyright (C) 2016 Openwrt.org
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-UUGameAcc
PKG_VERSION:=20210806
PKG_RELEASE:=2.13.4
PKG_MAINTAINER:=BCYDTZ <https://github.com/BCYDTZ/luci-app-UUGameAcc>
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=LuCI support for UUGameAcc
PKGARCH:=all
DEPENDS:=+kmod-tun
endef
define Package/$(PKG_NAME)/description
LuCI Support of Simple Switch to turn UUGameAcc ON/OFF
endef
define Build/Prepare
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./root/etc/config/uuplugin $(1)/etc/config/uuplugin
$(INSTALL_DIR) $(1)/tmp/uuplugin
cp -pR ./root/files/* $(1)/tmp/uuplugin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./root/etc/init.d/uuplugin_luci $(1)/etc/init.d/uuplugin_luci
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_CONF) ./root/etc/uci-defaults/* $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/usr/lib/lua/luci
cp -pR ./luasrc/* $(1)/usr/lib/lua/luci/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
po2lmo ./po/zh-cn/uuplugin.po $(1)/usr/lib/lua/luci/i18n/uuplugin.zh-cn.lmo
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
mkdir -p ./usr/bin/uuplugin
chmod +x ./tmp/uuplugin/uuplugin.sh
sh ./tmp/uuplugin/uuplugin.sh
rm -rf ./tmp/uuplugin
chmod +x ./usr/bin/uuplugin/*
/etc/init.d/uuplugin_luci enable >/dev/null 2>&1
chmod a+x $${IPKG_INSTROOT}/etc/init.d/uuplugin_luci >/dev/null 2>&1
exit 0
endef
define Package/$(PKG_NAME)/prerm
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
/etc/init.d/uuplugin_luci disable
/etc/init.d/uuplugin_luci stop
fi
exit 0
endef
$(eval $(call BuildPackage,$(PKG_NAME)))