mirror of
https://github.com/endeavouros-team/eos-pkgbuild-setup.git
synced 2026-06-13 01:54:36 +00:00
95 lines
3.1 KiB
Bash
95 lines
3.1 KiB
Bash
#!/bin/bash
|
|
|
|
# Definitions for the [endeavouros-testing-dev] repo at 'repo-testing'.
|
|
|
|
# Note: this file will be sourced into a function,
|
|
# so all variables are made 'local'.
|
|
|
|
local REPONAME="endeavouros-testing-dev"
|
|
local RELEASE_TAGS=(endeavouros-pkgbuild-tools)
|
|
|
|
## user to sign packages
|
|
local SIGNER="manuel@endeavouros.com" # "EndeavourOS"
|
|
|
|
## local folders
|
|
local USE_RELEASE_ASSETS=yes
|
|
local PREFER_GIT_OVER_RELEASE=no # was yes
|
|
|
|
local GITREPOURL=https://github.com/endeavouros-team/eos-tools.git
|
|
# if [ "$USE_RELEASE_ASSETS" = "no" ] ; then
|
|
local GITREPODIR="$(basename "$GITREPOURL" .git)/$REPONAME"
|
|
# fi
|
|
local ARCHIVE_TAG=repo-testing
|
|
|
|
## new way with absolute paths:
|
|
local ASSETSDIR="$EOS_ROOT/_BUILD_/$REPONAME"
|
|
local PKGBUILD_ROOTDIR="$ASSETSDIR/PKGBUILDS" # temporary copy only, will always be overwritten
|
|
local GITDIR="$EOS_ROOT/eos-tools"
|
|
local ARCHIVE_GIT="$EOS_ROOT/archive/.git"
|
|
|
|
# SKIP_UNACCEPTABLE_PKGBUILD=(python3-gpg_batch_sign)
|
|
|
|
## package name specifications
|
|
local PKGNAMES=( # actually: directory name of each package
|
|
eos-pkgbuild-setup
|
|
|
|
###################################### For old Nvidia GPUs older than Turing: ########################################
|
|
lib32-nvidia-580xx-utils/aur
|
|
nvidia-580xx-utils/aur
|
|
nvidia-580xx-settings/aur
|
|
)
|
|
|
|
if false && [ $AUR_IS_AVAILABLE = yes ] ; then
|
|
PKGNAMES+=(
|
|
python3-gpg_batch_sign/aur
|
|
repo-add_and_sign/aur
|
|
)
|
|
fi
|
|
|
|
# PKGNAMES=(eos-pkgbuild-setup)
|
|
|
|
# test before plasma 6 is mainstream:
|
|
# pacman-conf --repo-list | grep kde-unstable >/dev/null || PKGNAMES_WAIT=(calamares-git)
|
|
|
|
# Hook functions are run at the beginning of assets.make.
|
|
local ASSET_HOOKS=(
|
|
# currently none
|
|
)
|
|
|
|
_welcome_hook_theming() {
|
|
# don't skip theming code in repo-testing!
|
|
pushd "$PKGBUILD_ROOTDIR"/welcome >/dev/null
|
|
|
|
#sed -i welcome \
|
|
# -e 's|^[ ]*local theming_support_skip=1| local theming_support_skip=0|'
|
|
sed -i welcome \
|
|
-e 's|^[ ]*mode=offline| mode=choose|'
|
|
updpkgsums 2>/dev/null
|
|
|
|
popd >/dev/null
|
|
}
|
|
|
|
# Hooks for AUR packages:
|
|
_repo-add_and_sign_hook_change_rel() {
|
|
# change http to https
|
|
sed -i "$PKGBUILD_ROOTDIR"/repo-add_and_sign/PKGBUILD \
|
|
-e 's|http://|https://|'
|
|
}
|
|
_archupdate-indicator_fixes() {
|
|
# Change pkgver in PKGBUILD.
|
|
# Force PKGBUILD to change strings "xterm" and "sudo pacman -Syu" to "xfce4-terminal" and "ysy -Syu" in archupdate-indicator.py.
|
|
local pkgbuild="$PKGBUILD_ROOTDIR"/archupdate-indicator/PKGBUILD
|
|
local rel="$(grep "^pkgrel=" $pkgbuild | cut -d '=' -f 2)".1
|
|
sed -i "$pkgbuild" \
|
|
-e '/^[ \t]*cd "/'afoobar123
|
|
sed -i "$pkgbuild" \
|
|
-e 's|^pkgrel=.*$|pkgrel='"$rel"'|' \
|
|
-e 's|foobar123|\tsed -i archupdate-indicator.py -e \"s/\\"xterm\\"/\\"xfce4-terminal\\"/\" -e \"s/\\"sudo pacman -Syu\\"/\\"yay -Syu\\"/\"|'
|
|
}
|
|
|
|
declare -A ASSET_PACKAGE_HOOKS
|
|
#ASSET_PACKAGE_HOOKS["welcome"]=_welcome_hook_theming
|
|
ASSET_PACKAGE_HOOKS["repo-add_and_sign"]=_repo-add_and_sign_hook_change_rel
|
|
ASSET_PACKAGE_HOOKS["archupdate-indicator"]=_archupdate-indicator_fixes
|
|
|