summaryrefslogtreecommitdiff
path: root/updater-supervisor/Makefile
blob: 8e60224933d2658aef4e0c385fa2d0311fbd94fd (plain)
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
#
## Copyright (C) 2019-2020 CZ.NIC z.s.p.o. (http://www.nic.cz/)
#
## This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# #
#
include $(TOPDIR)/rules.mk

PKG_NAME:=updater-supervisor
PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/updater/supervisor.git
PKG_SOURCE_BRANCH:=master

PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz>
PKG_LICENSE:=MIT

include $(INCLUDE_DIR)/autopkg-branch.mk
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk

define Package/updater-supervisor
  SECTION:=updater
  CATEGORY:=Turris Updater
  TITLE:=Updater supervisor and its library
  DEPENDS:= \
    +updater-ng +pkglists +l10n-supported \
    +python3-light +python3-uci +python3-distro +python3-packaging \
    +cronie +curl
  VARIANT:=python3
endef

define Package/updater-supervisor/description
  Python library and program wrapping execution of updater-ng's pkgupdate tool. It
  integrates it to frontend and provides additional reporting mechanisms.
  Secondary this also serves as universal configuration API for updater-ng.
endef

define Py3Package/updater-supervisor/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/

	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/immediate_reboot.init $(1)/etc/init.d/updater-journal-recover
	$(INSTALL_DIR) $(1)/etc/cron.d
	$(INSTALL_CONF) $(PKG_BUILD_DIR)/files/cron $(1)/etc/cron.d/updater
	$(INSTALL_DIR) $(1)/etc/updater/hook_postupdate
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/hook_postupdate $(1)/etc/updater/hook_postupdate/99_approvals_cleanup
endef

$(eval $(call Py3Package,updater-supervisor))
$(eval $(call BuildPackage,updater-supervisor))
$(eval $(call BuildPackage,updater-supervisor-src))