Merge pull request #19372 from cotequeiroz/libgd
[feed/packages.git] / admin / openwisp-config / Makefile
1 # SPDX-Identifier-License: GPL-3.0-only
2 #
3 # openwisp.org
4
5 include $(TOPDIR)/rules.mk
6
7 PKG_NAME:=openwisp-config
8 PKG_RELEASE:=2
9
10 PKG_MAINTAINER:=Federico Capoano <f.capoano@openwisp.io>
11 PKG_LICENSE:=GPL-3.0-or-later
12
13 PKG_SOURCE_URL:=https://github.com/openwisp/openwisp-config.git
14 PKG_MIRROR_HASH:=7daa10a9d170e665f33a5555a246b4da2223c2d8d0e8a047edb01701c8886986
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_VERSION:=1.0.1
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/openwisp-config
21 TITLE:=Remote configuration management agent
22 CATEGORY:=Administration
23 SECTION:=admin
24 SUBMENU:=openwisp
25 DEPENDS:=+curl \
26 +lua \
27 +libuci-lua \
28 +luafilesystem \
29 +luci-lib-nixio \
30 +ca-certificates
31 PKGARCH:=all
32 URL:=https://openwisp.org
33 endef
34
35 define Build/Compile
36 endef
37
38 define Package/openwisp-config/conffiles
39 /etc/config/openwisp
40 endef
41
42 define Package/openwisp-config/install
43 $(INSTALL_DIR) \
44 $(1)/usr/sbin \
45 $(1)/etc/init.d \
46 $(1)/etc/config \
47 $(1)/etc/openwisp \
48 $(1)/usr/lib/lua/openwisp
49
50 $(INSTALL_BIN) \
51 $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \
52 $(1)/usr/sbin/openwisp_config
53
54 $(INSTALL_BIN) \
55 $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \
56 $(1)/etc/init.d/openwisp_config
57
58 $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.config \
59 $(1)/etc/config/openwisp
60
61 $(INSTALL_BIN) \
62 $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-reload-config \
63 $(1)/usr/sbin/openwisp-reload-config
64
65 $(INSTALL_BIN) \
66 $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/utils.lua \
67 $(1)/usr/lib/lua/openwisp/utils.lua
68
69 $(INSTALL_BIN) \
70 $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/net.lua \
71 $(1)/usr/lib/lua/openwisp/net.lua
72
73 $(INSTALL_BIN) \
74 $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-store-unmanaged.lua \
75 $(1)/usr/sbin/openwisp-store-unmanaged
76
77 $(INSTALL_BIN) \
78 $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-restore-unmanaged.lua \
79 $(1)/usr/sbin/openwisp-restore-unmanaged
80
81 $(INSTALL_BIN) \
82 $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-remove-default-wifi.lua \
83 $(1)/usr/sbin/openwisp-remove-default-wifi
84
85 $(INSTALL_BIN) \
86 $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-uci-autoname.lua \
87 $(1)/usr/sbin/openwisp-uci-autoname
88
89 $(INSTALL_BIN) \
90 $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-update-config.lua \
91 $(1)/usr/sbin/openwisp-update-config
92
93 $(INSTALL_BIN) \
94 $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-get-address.lua \
95 $(1)/usr/sbin/openwisp-get-address
96
97 $(CP) $(PKG_BUILD_DIR)/VERSION $(1)/etc/openwisp/
98 endef
99
100 $(eval $(call BuildPackage,openwisp-config))