-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c5e57c7
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# | ||
# Copyright (C) 2023 remittor | ||
# | ||
|
||
include $(TOPDIR)/rules.mk | ||
|
||
PKG_NAME:=fantastic-feeds | ||
PKG_VERSION:=1 | ||
PKG_RELEASE:=0 | ||
|
||
PKG_MAINTAINER:=remittor <remittor@gmail.com> | ||
PKG_LICENSE:=MIT | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
define Package/$(PKG_NAME) | ||
SECTION:=utils | ||
CATEGORY:=Utilities | ||
TITLE:=Installer for fantastic-packages feeds | ||
PKGARCH:=all | ||
endef | ||
|
||
define Package/$(PKG_NAME)/description | ||
Installer for fantastic-packages feeds | ||
endef | ||
|
||
define Build/Compile | ||
endef | ||
|
||
define Package/$(PKG_NAME)/install | ||
$(INSTALL_DIR) $(1)/etc/opkg/keys | ||
$(INSTALL_DATA) ./key.pub $(1)/etc/opkg/keys/53ff2b6672243d28 | ||
endef | ||
|
||
define Package/$(PKG_NAME)/postinst | ||
#!/bin/sh | ||
# check if we are on real system | ||
[ -n "$${IPKG_INSTROOT}" ] && exit 0 | ||
FW_VER_FN="/etc/openwrt_release" | ||
[ ! -f $$FW_VER_FN ] && { echo "File '/etc/openwrt_release' not found!"; exit 1; } | ||
FW_VERSION=$$( grep -o "^DISTRIB_RELEASE='.*" $$FW_VER_FN | cut -d"'" -f2 ) | ||
FW_VER_MAJOR=$$( echo "$$FW_VERSION" | cut -d. -f1 ) | ||
FW_VER_MINOR=$$( echo "$$FW_VERSION" | cut -d. -f2 ) | ||
FW_ARCH=$$( grep -o "^DISTRIB_ARCH='.*" $$FW_VER_FN | cut -d"'" -f2 ) | ||
if [ ! -f /etc/opkg/customfeeds.conf ]; then | ||
echo "" > /etc/opkg/customfeeds.conf | ||
fi | ||
if [ $$( grep -c -F fantastic_packages_ /etc/opkg/customfeeds.conf ) = 0 ]; then | ||
BASE_URL="https://fantastic-packages.github.io/packages/releases" | ||
BASE_URL="$$BASE_URL/$$FW_VER_MAJOR.$$FW_VER_MINOR/packages/$$FW_ARCH" | ||
echo "" >> /etc/opkg/customfeeds.conf | ||
echo "src/gz fantastic_packages_luci $$BASE_URL/luci" >> /etc/opkg/customfeeds.conf | ||
echo "src/gz fantastic_packages_packages $$BASE_URL/packages" >> /etc/opkg/customfeeds.conf | ||
fi | ||
exit 0 | ||
endef | ||
|
||
define Package/$(PKG_NAME)/prerm | ||
#!/bin/sh | ||
# check if we are on real system | ||
[ -n "$${IPKG_INSTROOT}" ] && exit 0 | ||
sed -i "/fantastic_packages_/d" /etc/opkg/customfeeds.conf | ||
exit 0 | ||
endef | ||
|
||
$(eval $(call BuildPackage,$(PKG_NAME))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
untrusted comment: Public usign key for fantastic-packages builds | ||
RWRT/ytmciQ9KFjHE8DQ97piX7oHvdr49H3VLlJDuJNmuaKFguOrwXBG |