summaryrefslogtreecommitdiff
path: root/localrepo
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2019-03-11 11:09:36 +0100
committerKarel Kočí <karel.koci@nic.cz>2019-03-11 11:09:36 +0100
commit70adb60173e18c5e02c6e604b0451a672ec2e4c1 (patch)
tree581613e2aba03ecc60096bcdb51cb3b79a976374 /localrepo
parentf7f89f29b85e88e2ce11d9597039b2ee716b31f1 (diff)
downloadopenwrt-personal-pkgs-70adb60173e18c5e02c6e604b0451a672ec2e4c1.tar.gz
openwrt-personal-pkgs-70adb60173e18c5e02c6e604b0451a672ec2e4c1.tar.bz2
openwrt-personal-pkgs-70adb60173e18c5e02c6e604b0451a672ec2e4c1.zip
Try to split updater-ng to multiple packages
Diffstat (limited to 'localrepo')
-rw-r--r--localrepo/Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/localrepo/Makefile b/localrepo/Makefile
new file mode 100644
index 0000000..3a02bce
--- /dev/null
+++ b/localrepo/Makefile
@@ -0,0 +1,41 @@
+#
+## Copyright (C) 2019 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:=localrepo
+PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/updater/updater.git
+PKG_SOURCE_BRANCH:=master
+PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz>
+
+include $(INCLUDE_DIR)/autopkg-branch.mk
+include $(INCLUDE_DIR)/package.mk
+
+
+define Package/$(PKG_NAME)
+ TITLE:=Next generation updater local repository manager
+ DEPENDS:=+python3-light
+endef
+
+define Package/$(PKG_NAME)-localrepo/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/localrepo/localrepo $(1)/usr/bin/localrepo
+ $(INSTALL_DIR) $(1)/etc/updater/conf.d
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/localrepo/localrepo.lua $(1)/etc/updater/conf.d/localrepo.lua
+endef
+
+# Repository should be consistent when updater is executed successfully but this
+# ensures that we will fix any problems that can be caused by older version of
+# localrepo
+define Package/$(PKG_NAME)-localrepo/postinst
+[ -n "$$IPKG_INSTROOT" ] || {
+ localrepo check --fix
+}
+endef
+
+
+$(eval $(call BuildPackage,$(PKG_NAME)))