diff options
author | Karel Kočí <karel.koci@nic.cz> | 2018-09-27 11:13:09 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2018-09-27 12:50:29 +0200 |
commit | 9daf08fb38bd0857af79c12bfba14ad1a873ad95 (patch) | |
tree | bce2dc72e07062274552ec518256672f7786e8aa /personal-pkgs-repo | |
parent | 152d258efa94951a574383f5a13ea51e5ae0fff5 (diff) | |
download | openwrt-personal-pkgs-9daf08fb38bd0857af79c12bfba14ad1a873ad95.tar.gz openwrt-personal-pkgs-9daf08fb38bd0857af79c12bfba14ad1a873ad95.tar.bz2 openwrt-personal-pkgs-9daf08fb38bd0857af79c12bfba14ad1a873ad95.zip |
personal-pkgs-repo: Add opkg feed hack and shellrc autoinstall
Diffstat (limited to 'personal-pkgs-repo')
-rw-r--r-- | personal-pkgs-repo/Makefile | 29 | ||||
-rw-r--r-- | personal-pkgs-repo/files/updater.lua | 17 |
2 files changed, 34 insertions, 12 deletions
diff --git a/personal-pkgs-repo/Makefile b/personal-pkgs-repo/Makefile index f4f5e18..a8d0c90 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 +PKG_VERSION:=1.1 PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz> PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) @@ -32,4 +32,31 @@ define Package/$(PKG_NAME)/install $(INSTALL_CONF) ./files/updater.lua $(1)/etc/updater/conf.d/personal-pkgs.lua endef +ifeq ($(CONFIG_TARGET_PROFILE),"DEVICE_turris-omnia") +BOARD=omnia +else +ifeq ($(CONFIG_TARGET_PROFILE),"TURRIS") +BOARD=turris +else +ifeq ($(CONFIG_TARGET_PROFILE),"DEVICE_cznic-mox") +BOARD:=mox +else +$(error This repository does not support profile: $(CONFIG_TARGET_PROFILE)) +endif +endif +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/openwrt/$(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..859c780 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/openwrt/" .. 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") |