This repository has been archived by the owner on Apr 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild
52 lines (48 loc) · 1.45 KB
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -ex
pacman -Syu --noconfirm --overwrite=*
cd /pkgs || exit 1
function build_package() {
url=$1
dir=$(basename "$url" | sed "s/\.git//")
cat >"/build-$dir" <<EOF
#!/bin/bash
set -ex
hash -r
if [ ! -d $dir ]; then
git clone --depth=1 $url $dir
else
(
cd $dir || exit 1
git checkout .
git reset --hard
git pull
)
fi
cd $dir
LANG=C MAKEFLAGS=-j$(nproc --all) makepkg -s -f -A --noconfirm
EOF
chmod a+x "/build-$dir"
su alarm -s /bin/bash -c "/build-$dir"
}
function install_package() {
pacman -U /pkgs/"$1"/*.pkg* --noconfirm --overwrite=*
}
function build_and_install_package() {
build_package "$1"
install_package "$(basename "$url" | sed "s/\.git//")"
}
# Make sure to uninstall pipewire to build kwin without pipewire
if pacman -Qs pipewire >/dev/null; then
pacman -Rdd pipewire --noconfirm
fi
build_and_install_package "https://aur.archlinux.org/qrtr-git.git"
build_and_install_package "https://aur.archlinux.org/qmic-git.git"
build_package "https://github.com/jld3103/tqftpserv-git.git"
build_package "https://aur.archlinux.org/rmtfs-git.git"
build_package "https://aur.archlinux.org/pd-mapper-git.git"
build_package "https://github.com/jld3103/firmware-xiaomi-beryllium-git.git"
build_package "https://github.com/jld3103/linux-beryllium.git"
build_package "https://github.com/jld3103/alsa-ucm-beryllium.git"
build_package "https://github.com/jld3103/ofono-git.git"
build_package "https://github.com/jld3103/kwin-git.git"