forked from kuoruan/luci-app-v2ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (44 loc) · 1.27 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
#
# Copyright 2019 Xingwang Liao <[email protected]>
# Licensed to the public under the MIT License.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-v2ray
PKG_VERSION:=1.4.3
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_MAINTAINER:=Xingwang Liao <[email protected]>
LUCI_TITLE:=LuCI support for V2Ray
LUCI_DEPENDS:=+jshn +luci-lib-jsonc +ip +ipset +iptables +iptables-mod-tproxy \
+resolveip +dnsmasq-full
LUCI_PKGARCH:=all
define Package/$(PKG_NAME)/conffiles
/etc/config/v2ray
/etc/v2ray/data-settings.json
/etc/v2ray/data-stream-settings.json
/etc/v2ray/data-transport.json
/etc/v2ray/directlist.txt
/etc/v2ray/proxylist.txt
endef
include $(TOPDIR)/feeds/luci/luci.mk
define Package/$(PKG_NAME)/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ] ; then
( . /etc/uci-defaults/40_luci-v2ray ) && rm -f /etc/uci-defaults/40_luci-v2ray
fi
chmod 755 "$${IPKG_INSTROOT}/etc/init.d/v2ray" >/dev/null 2>&1
ln -sf "../init.d/v2ray" \
"$${IPKG_INSTROOT}/etc/rc.d/S99v2ray" >/dev/null 2>&1
exit 0
endef
define Package/$(PKG_NAME)/postrm
#!/bin/sh
if [ -s "$${IPKG_INSTROOT}/etc/rc.d/S99v2ray" ] ; then
rm -f "$${IPKG_INSTROOT}/etc/rc.d/S99v2ray"
fi
if [ -z "$${IPKG_INSTROOT}" ] ; then
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
fi
exit 0
endef
# call BuildPackage - OpenWrt buildroot signature