This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
71 lines (55 loc) · 1.55 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
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-usbleach
# Version == major.minor.patch
# increase on new functionality (minor) or patches (patch)
PKG_VERSION:=0.1
# Release == build
# increase on changes of translation files or of this Makefile
PKG_RELEASE:=1
PKG_MAINTAINER:=Maxime Guerreiro <[email protected]>
# LuCI specific settings
LUCI_TITLE:=USBleach
LUCI_DEPENDS:=+luasocket +busybox +blkid +openssl-util @USB_SUPPORT kmod-usb-core
LUCI_PKGARCH:=all
# call BuildPackage - OpenWrt buildroot signature
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=$(LUCI_TITLE)
DEPENDS:=$(LUCI_DEPENDS)
endef
define Package/$(PKG_NAME)/description
USBleach app for LuCI
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) $(PKG_BUILD_DIR)/luasrc/* $(1)$(LUCI_LIBRARYDIR)/; \
fi
if [ -d $(PKG_BUILD_DIR)/htdocs ]; then \
$(INSTALL_DIR) $(1)$(HTDOCS); \
$(CP) $(PKG_BUILD_DIR)/htdocs/* $(1)$(HTDOCS)/; \
fi
if [ -d $(PKG_BUILD_DIR)/root ]; then \
$(INSTALL_DIR) $(1)/; \
$(CP) $(PKG_BUILD_DIR)/root/* $(1)/; \
fi
endef
$(eval $(call BuildPackage,$(PKG_NAME)))