summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--personal-pkgs-repo/Makefile21
-rw-r--r--personal-pkgs-repo/files/updater.lua17
2 files changed, 25 insertions, 13 deletions
diff --git a/personal-pkgs-repo/Makefile b/personal-pkgs-repo/Makefile
index 81a539a..3b150e4 100644
--- a/personal-pkgs-repo/Makefile
+++ b/personal-pkgs-repo/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=personal-pkgs-repo
-PKG_VERSION:=1.1
+PKG_VERSION:=1.2
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
@@ -16,7 +16,6 @@ include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
TITLE:=Package with repository key and meta dependencies
- DEPENDS:=+shellrc-zsh +shellrc-ash
endef
define Build/Compile
@@ -33,4 +32,22 @@ define Package/$(PKG_NAME)/install
$(INSTALL_CONF) ./files/updater.lua $(1)/etc/updater/conf.d/personal-pkgs.lua
endef
+BOARD=turris
+ifeq ($(CONFIG_TARGET_mvebu_Turris-Omnia),y)
+BOARD=omnia
+endif
+
+define Package/$(PKG_NAME)/postinst
+#!/bin/sh
+feedsfile="$$IPKG_INSTROOT/etc/opkg/customfeeds.conf"
+sed -i '/^src\/gz personal/d' "$$feedsfile"
+echo "src/gz personal https://cynerd.cz/repo/turris3x/$(BOARD)" >> "$$feedsfile"
+endef
+
+define Package/$(PKG_NAME)/prerm
+#!/bin/sh
+feedsfile="$$IPKG_INSTROOT/etc/opkg/customfeeds.conf"
+sed -i '/^src\/gz personal/d' "$$feedsfile"
+endef
+
$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/personal-pkgs-repo/files/updater.lua b/personal-pkgs-repo/files/updater.lua
index 9c29984..2bf7636 100644
--- a/personal-pkgs-repo/files/updater.lua
+++ b/personal-pkgs-repo/files/updater.lua
@@ -7,17 +7,12 @@ else
DIE("Unsupported board!")
end
-if version_match(turris_version, '<4.0') then
- Repository("personal-pkgs", "https://cynerd.cz/repo/turris3x/" .. board, {
- pubkey = "file:///etc/updater/keys/personal-pkgs.pub",
- ocsp = false
- })
-else
- Repository("personal-pkgs", "https://cynerd.cz/repo/openwrt/" .. board, {
- pubkey = "file:///etc/updater/keys/personal-pkgs.pub",
- ocsp = false
- })
-end
+Repository("personal-pkgs", "https://cynerd.cz/repo/turris3x/" .. board, {
+ pubkey = "file:///etc/updater/keys/personal-pkgs.pub",
+ ocsp = false
+})
Install("personal-pkgs-repo")
Package("personal-pkgs-repo", { replan = "finished" })
+
+Install("shellrc-zsh", "shellrc-ash")