mirror of
https://github.com/built-aur/packages
synced 2024-08-14 23:01:15 +00:00
update
This commit is contained in:
parent
782c84b35d
commit
ebec184a25
2 changed files with 55 additions and 37 deletions
|
@ -7,7 +7,9 @@ OUT_DIR="/mnt/out"
|
||||||
TMP_DIR="$(mktemp -d -t medzik-aur-XXXX)"
|
TMP_DIR="$(mktemp -d -t medzik-aur-XXXX)"
|
||||||
SCRIPT_DIR="$(realpath "$(dirname "$0")"/scripts)"
|
SCRIPT_DIR="$(realpath "$(dirname "$0")"/scripts)"
|
||||||
|
|
||||||
|
# load lib
|
||||||
source "${SCRIPT_DIR}/lib/parse-conf.sh"
|
source "${SCRIPT_DIR}/lib/parse-conf.sh"
|
||||||
|
source "${SCRIPT_DIR}/lib/build/patches.sh"
|
||||||
|
|
||||||
# change owner of the directories in /mnt to the current user
|
# change owner of the directories in /mnt to the current user
|
||||||
sudo chown -R $(id -u) /mnt/*
|
sudo chown -R $(id -u) /mnt/*
|
||||||
|
@ -30,39 +32,9 @@ mkdir -p "${PACKAGES_TO_BUILD_DIR}"
|
||||||
# check which packages to build
|
# check which packages to build
|
||||||
while IFS= read -r pkg
|
while IFS= read -r pkg
|
||||||
do
|
do
|
||||||
touch "${PACKAGES_TO_BUILD_DIR}/${pkg}"
|
built "${pkg}"
|
||||||
done < "${SRC_DIR}/built_packages.txt"
|
done < "${SRC_DIR}/built_packages.txt"
|
||||||
|
|
||||||
patches() {
|
|
||||||
pkgname="${1}"
|
|
||||||
|
|
||||||
if [ "${BUILD_ARCH}" = "x86-64-v3" ]
|
|
||||||
then
|
|
||||||
case "${pkgname}" in
|
|
||||||
"proton"* | "dxvk-mingw" | "vkd3d-proton-mingw" | "wine-ge-custom")
|
|
||||||
echo "[i] march patch"
|
|
||||||
sed -i 's|-march=nocona -mtune=core-avx2|-march=x86-64-v3|g' PKGBUILD
|
|
||||||
;;
|
|
||||||
"linux-xanmod"*)
|
|
||||||
export _microarchitecture=93
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
case "${pkgname}" in
|
|
||||||
"linux-xanmod"*)
|
|
||||||
export _microarchitecture=0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "${pkgname}" in
|
|
||||||
"winesync")
|
|
||||||
export _provide_nondkms=false
|
|
||||||
sed -i 's|_provide_nondkms=true|_provide_nondkms=false|g' PKGBUILD
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
built() {
|
built() {
|
||||||
pkgname="${1}"
|
pkgname="${1}"
|
||||||
pkgdir="${SRC_DIR}/packages/${pkgname}"
|
pkgdir="${SRC_DIR}/packages/${pkgname}"
|
||||||
|
@ -94,7 +66,7 @@ built() {
|
||||||
|
|
||||||
# run custom patches
|
# run custom patches
|
||||||
echo "[i] Running custom patches..."
|
echo "[i] Running custom patches..."
|
||||||
patches "${pkgname}"
|
patches
|
||||||
|
|
||||||
echo "[i] Installing dependencies..."
|
echo "[i] Installing dependencies..."
|
||||||
for (( i=0; i<15; i++ ))
|
for (( i=0; i<15; i++ ))
|
||||||
|
@ -127,11 +99,6 @@ built() {
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
}
|
}
|
||||||
|
|
||||||
for file in "${PACKAGES_TO_BUILD_DIR}"/*
|
|
||||||
do
|
|
||||||
built "$(basename ${file})"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -f "${SRC_DIR}/fail_built.txt" ]
|
if [ -f "${SRC_DIR}/fail_built.txt" ]
|
||||||
then
|
then
|
||||||
printf "\n\nFailed to build:\n"
|
printf "\n\nFailed to build:\n"
|
||||||
|
|
51
scripts/lib/build/patches.sh
Normal file
51
scripts/lib/build/patches.sh
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function patches() {
|
||||||
|
local pkgname="${1}"
|
||||||
|
|
||||||
|
if [ "${BUILD_ARCH}" = "x86-64-v3" ]
|
||||||
|
then
|
||||||
|
patches-x86-64-v3 "${pkgname}"
|
||||||
|
else
|
||||||
|
patches-x86-64 "${pkgname}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
patches-all
|
||||||
|
}
|
||||||
|
|
||||||
|
# Patches for a `x86-64-v3` arch
|
||||||
|
function patches-x86-64-v3() {
|
||||||
|
local pkgname="${1}"
|
||||||
|
|
||||||
|
case "${pkgname}" in
|
||||||
|
"proton"* | "dxvk-mingw" | "vkd3d-proton-mingw" | "wine-ge-custom")
|
||||||
|
echo "[i] march patch"
|
||||||
|
sed -i 's|-march=nocona -mtune=core-avx2|-march=x86-64-v3|g' PKGBUILD
|
||||||
|
;;
|
||||||
|
"linux-xanmod"*)
|
||||||
|
export _microarchitecture=93
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Patches for a `x86-64` arch
|
||||||
|
function patches-x86-64() {
|
||||||
|
local pkgname="${1}"
|
||||||
|
|
||||||
|
case "${pkgname}" in
|
||||||
|
"linux-xanmod"*)
|
||||||
|
export _microarchitecture=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Patches for all arches
|
||||||
|
function patches-all() {
|
||||||
|
local pkgname="${1}"
|
||||||
|
|
||||||
|
case "${pkgname}" in
|
||||||
|
"winesync")
|
||||||
|
export _microarchitecture=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
Loading…
Reference in a new issue