-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
70 lines (56 loc) · 1.74 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
#
# Copyright (C) 2017 scsz <[email protected]>
#
# This is free software, licensed under the GNU Affero General Public License v3.0
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-jlu-drcom
PKG_VERSION:=0.1.1
PKG_RELEASE:=0
PKG_LICENSE:=AGPLv3
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=scsz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=LuCI Support for jlu drcom
PKGARCH:=all
DEPENDS:=+python-light
endef
define Package/$(PKG_NAME)/description
LuCI Support for jlu-drcom.
endef
define Build/Prepare
$(foreach po,$(wildcard ${CURDIR}/files/luci/i18n/*.po), \
po2lmo $(po) $(PKG_BUILD_DIR)/$(patsubst %.po,%.lmo,$(notdir $(po)));)
endef
define Package/$(PKG_NAME)/conffiles
/etc/config/jlu-drcom
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
chmod 755 /etc/init.d/drcom
exit 0
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller
$(INSTALL_DATA) ./files/luci/controller/jlu-drcom.lua $(1)/usr/lib/lua/luci/controller/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
$(INSTALL_DATA) $(PKG_BUILD_DIR)/jlu-drcom.*.lmo $(1)/usr/lib/lua/luci/i18n/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi
$(INSTALL_DATA) ./files/luci/model/cbi/jlu-drcom.lua $(1)/usr/lib/lua/luci/model/cbi/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DATA) ./files/root/etc/init.d/drcom $(1)/etc/init.d/
$(INSTALL_DIR) $(1)/lib/jlu-drcom
$(INSTALL_DATA) ./files/root/lib/jlu-drcom/newclient.py $(1)/lib/jlu-drcom
$(INSTALL_DATA) ./files/root/lib/jlu-drcom/daemon.py $(1)/lib/jlu-drcom
endef
$(eval $(call BuildPackage,$(PKG_NAME)))