summaryrefslogtreecommitdiff
path: root/personal-pkgs-repo
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-08-24 18:15:42 +0200
committerKarel Kočí <cynerd@email.cz>2018-08-24 18:15:42 +0200
commit18c54a7a09959277b31c7671d87f94162da116af (patch)
tree6bec2d06f8c2b0cf5b777234659652109adb4b12 /personal-pkgs-repo
downloadopenwrt-personal-pkgs-18c54a7a09959277b31c7671d87f94162da116af.tar.gz
openwrt-personal-pkgs-18c54a7a09959277b31c7671d87f94162da116af.tar.bz2
openwrt-personal-pkgs-18c54a7a09959277b31c7671d87f94162da116af.zip
Add package personal-pkgs-repo
Diffstat (limited to 'personal-pkgs-repo')
-rw-r--r--personal-pkgs-repo/Makefile35
-rw-r--r--personal-pkgs-repo/files/key.pub2
-rw-r--r--personal-pkgs-repo/files/updater.lua23
3 files changed, 60 insertions, 0 deletions
diff --git a/personal-pkgs-repo/Makefile b/personal-pkgs-repo/Makefile
new file mode 100644
index 0000000..f4f5e18
--- /dev/null
+++ b/personal-pkgs-repo/Makefile
@@ -0,0 +1,35 @@
+#
+## Copyright (C) 2018 Karel Kočí
+#
+## This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+# #
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=personal-pkgs-repo
+PKG_VERSION:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+ TITLE:=Package with repository key
+endef
+
+define Build/Compile
+ true
+endef
+
+define Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/etc/opkg/keys
+ $(INSTALL_DIR) $(1)/etc/updater/keys
+ $(INSTALL_DATA) ./files/key.pub $(1)/etc/opkg/keys/6b76319bf5a9dc2
+ $(INSTALL_DATA) ./files/key.pub $(1)/etc/updater/keys/personal-pkgs.pub
+
+ $(INSTALL_DIR) $(1)/etc/updater/conf.d
+ $(INSTALL_CONF) ./files/updater.lua $(1)/etc/updater/conf.d/personal-pkgs.lua
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/personal-pkgs-repo/files/key.pub b/personal-pkgs-repo/files/key.pub
new file mode 100644
index 0000000..de6e53c
--- /dev/null
+++ b/personal-pkgs-repo/files/key.pub
@@ -0,0 +1,2 @@
+untrusted comment: public key 6b76319bf5a9dc2 (personal-pkgs)
+RWQGt2MZv1qdwkBd042bjtjJFcI7cEtFtTEf8dqG5uBq3sqD51CC9xl3
diff --git a/personal-pkgs-repo/files/updater.lua b/personal-pkgs-repo/files/updater.lua
new file mode 100644
index 0000000..b84c1a6
--- /dev/null
+++ b/personal-pkgs-repo/files/updater.lua
@@ -0,0 +1,23 @@
+local board
+if model:match('[Oo]mnia') then
+ board = "omnia"
+if model:match('^[Tt]urris$') then
+ board = "turris"
+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
+
+Install("personal-pkgs-repo")
+Package("personal-pkgs-repo", { replan = "finished" })