rebuild: split packages to another file
parent
9b90f296e6
commit
03cf94490e
104
rebuild.sh
104
rebuild.sh
|
@ -1,84 +1,22 @@
|
||||||
m64pncp=mupen64plus-noncore-plugins-git
|
#!/usr/bin/env bash
|
||||||
all_pkgs=(
|
|
||||||
# deps
|
|
||||||
cef-standard
|
|
||||||
cereal
|
|
||||||
libsodium-git
|
|
||||||
mozc
|
|
||||||
vim-runtime-git
|
|
||||||
|
|
||||||
# packages
|
. rebuild_pkgs.sh
|
||||||
chocolate-doom
|
|
||||||
chromium-vaapi-bin
|
|
||||||
chromium-widevine
|
|
||||||
desmume-git
|
|
||||||
dolphin-emu-git
|
|
||||||
eternity-engine-git
|
|
||||||
fceux-git
|
|
||||||
gdcc
|
|
||||||
godot
|
|
||||||
gopherus
|
|
||||||
gvim-git
|
|
||||||
gzdoom-legacy
|
|
||||||
higan
|
|
||||||
maxcso
|
|
||||||
mednaffe
|
|
||||||
megatools
|
|
||||||
mgba-git
|
|
||||||
motsognir
|
|
||||||
mupen64plus-git
|
|
||||||
mupen64plus-gui-git
|
|
||||||
$m64pncp
|
|
||||||
nicotine-plus-git
|
|
||||||
obs-linuxbrowser-bin
|
|
||||||
obs-studio-git
|
|
||||||
pcsx2-git
|
|
||||||
plasma5-applets-mpdnowplaying
|
|
||||||
ppsspp-git
|
|
||||||
prboom-plus
|
|
||||||
ripcord
|
|
||||||
rpcs3-git
|
|
||||||
sharenix-git
|
|
||||||
slade
|
|
||||||
squirrel-sql
|
|
||||||
uim-mozc
|
|
||||||
xf86-input-xwiimote-git
|
|
||||||
xf86-video-amdgpu-git
|
|
||||||
xwiimote-git
|
|
||||||
zdoom
|
|
||||||
)
|
|
||||||
declare -A options=(
|
|
||||||
[cef-standard]="--asdeps"
|
|
||||||
[cereal]="--asdeps"
|
|
||||||
[libsodium-git]="--asdeps"
|
|
||||||
[mozc]="--asdeps"
|
|
||||||
[vim-runtime-git]="--asdeps"
|
|
||||||
|
|
||||||
[higan]="--handle Higan --url https://gitlab.com/higan/higan.git/"
|
|
||||||
[$m64pncp]="-f --url https://git.greyserv.net/marrub/$m64pncp.git"
|
|
||||||
[motsognir]="--url https://git.greyserv.net/marrub/motsognir.git"
|
|
||||||
[ppsspp-git]="--install-as ppsspp-git"
|
|
||||||
)
|
|
||||||
pkg_ver() {
|
pkg_ver() {
|
||||||
sed '/^pkgver\=/!d;s/pkgver\=\(.*\)/\1/' PKGBUILD
|
sed '/^pkgver\=/!d;s/pkgver\=\(.*\)/\1/' PKGBUILD
|
||||||
}
|
}
|
||||||
exit_on_err() {
|
exit_on_err() {
|
||||||
local res=$1
|
local res=$?
|
||||||
|
echo "error in rebuild, aborting"
|
||||||
if (( $res ))
|
exit "$res"
|
||||||
then
|
|
||||||
echo "error in rebuild, aborting"
|
|
||||||
exit $res
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
higan_make() {
|
higan_make() {
|
||||||
make -j12 -C $@ uninstall
|
make -j12 -C $@ uninstall
|
||||||
make -j12 -C $@ clean; exit_on_err $?
|
make -j12 -C $@ clean || exit_on_err
|
||||||
make -j12 -C $@ all; exit_on_err $?
|
make -j12 -C $@ all || exit_on_err
|
||||||
make -j12 -C $@ install; exit_on_err $?
|
make -j12 -C $@ install || exit_on_err
|
||||||
}
|
}
|
||||||
build_package() {
|
build_package() {
|
||||||
cd ~/bin
|
cd ~/bin || exit_on_err
|
||||||
|
|
||||||
local pkg=$1
|
local pkg=$1
|
||||||
shift
|
shift
|
||||||
|
@ -116,18 +54,21 @@ build_package() {
|
||||||
|
|
||||||
if [[ ! -d ~/bin/$pkg ]]
|
if [[ ! -d ~/bin/$pkg ]]
|
||||||
then
|
then
|
||||||
git clone $pull_url
|
git clone "$pull_url"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $pkg
|
cd "$pkg" || exit_on_err
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
|
local new_tag
|
||||||
|
|
||||||
case $special_handling in
|
case $special_handling in
|
||||||
None)
|
None)
|
||||||
;;
|
;;
|
||||||
Higan)
|
Higan)
|
||||||
|
new_tag=$(git describe --tags "$(git rev-list --tags --max-count=1)")
|
||||||
git fetch --tags
|
git fetch --tags
|
||||||
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
|
git checkout "$new_tag"
|
||||||
higan_make higan target=higan
|
higan_make higan target=higan
|
||||||
higan_make higan target=bsnes
|
higan_make higan target=bsnes
|
||||||
higan_make icarus
|
higan_make icarus
|
||||||
|
@ -145,16 +86,15 @@ build_package() {
|
||||||
makepkg_args+=" -i"
|
makepkg_args+=" -i"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
makepkg $makepkg_args
|
makepkg $makepkg_args || exit_on_err
|
||||||
exit_on_err $?
|
|
||||||
|
|
||||||
local pkgver
|
local pkgver
|
||||||
|
|
||||||
if [[ $install_as ]]
|
if [[ $install_as ]]
|
||||||
then
|
then
|
||||||
pkgver=$(pkg_ver)
|
pkgver=$(pkg_ver)
|
||||||
sudo pacman --noconfirm --needed -U $install_as-$pkgver*.pkg.tar
|
sudo pacman --noconfirm --needed -U "$install_as-$pkgver*.pkg.tar" ||
|
||||||
exit_on_err $?
|
exit_on_err
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
resume_from() {
|
resume_from() {
|
||||||
|
@ -162,8 +102,8 @@ resume_from() {
|
||||||
|
|
||||||
for pkg in ${all_pkgs[*]}
|
for pkg in ${all_pkgs[*]}
|
||||||
do
|
do
|
||||||
[[ $pkg = $1 ]] && resume=1
|
[[ $pkg = "$1" ]] && resume=1
|
||||||
[[ $resume ]] && echo $pkg
|
[[ $resume ]] && echo "$pkg"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
main() {
|
main() {
|
||||||
|
@ -174,7 +114,7 @@ main() {
|
||||||
do
|
do
|
||||||
case $1 in
|
case $1 in
|
||||||
--resume-from)
|
--resume-from)
|
||||||
pkgs+=" $(resume_from $2)"
|
pkgs+=" $(resume_from "$2")"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -191,7 +131,7 @@ main() {
|
||||||
|
|
||||||
for pkg in $pkgs
|
for pkg in $pkgs
|
||||||
do
|
do
|
||||||
build_package $pkg ${options[$pkg]}
|
build_package "$pkg" ${options[$pkg]}
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
m64pncp=mupen64plus-noncore-plugins-git
|
||||||
|
all_pkgs=(
|
||||||
|
# deps
|
||||||
|
cef-standard
|
||||||
|
cereal
|
||||||
|
libsodium-git
|
||||||
|
mozc
|
||||||
|
vim-runtime-git
|
||||||
|
|
||||||
|
# packages
|
||||||
|
chocolate-doom
|
||||||
|
chromium-vaapi-bin
|
||||||
|
chromium-widevine
|
||||||
|
desmume-git
|
||||||
|
dolphin-emu-git
|
||||||
|
eternity-engine-git
|
||||||
|
fceux-git
|
||||||
|
gdcc
|
||||||
|
godot
|
||||||
|
gopherus
|
||||||
|
gvim-git
|
||||||
|
gzdoom-legacy
|
||||||
|
higan
|
||||||
|
maxcso
|
||||||
|
mednaffe
|
||||||
|
megatools
|
||||||
|
mgba-git
|
||||||
|
motsognir
|
||||||
|
mupen64plus-git
|
||||||
|
mupen64plus-gui-git
|
||||||
|
"$m64pncp"
|
||||||
|
nicotine-plus-git
|
||||||
|
obs-linuxbrowser-bin
|
||||||
|
obs-studio-git
|
||||||
|
pcsx2-git
|
||||||
|
plasma5-applets-mpdnowplaying
|
||||||
|
powershell-bin
|
||||||
|
ppsspp-git
|
||||||
|
prboom-plus
|
||||||
|
ripcord
|
||||||
|
rpcs3-git
|
||||||
|
sharenix-git
|
||||||
|
slade
|
||||||
|
squirrel-sql
|
||||||
|
teamviewer
|
||||||
|
uim-mozc
|
||||||
|
xf86-input-xwiimote-git
|
||||||
|
xwiimote-git
|
||||||
|
zdoom
|
||||||
|
)
|
||||||
|
declare -A options=(
|
||||||
|
[cef-standard]="--asdeps"
|
||||||
|
[cereal]="--asdeps"
|
||||||
|
[libsodium-git]="--asdeps"
|
||||||
|
[mozc]="--asdeps"
|
||||||
|
[vim-runtime-git]="--asdeps"
|
||||||
|
|
||||||
|
[higan]="--handle Higan --url https://gitlab.com/higan/higan.git/"
|
||||||
|
[$m64pncp]="-f --url https://git.greyserv.net/marrub/$m64pncp.git"
|
||||||
|
[motsognir]="--url https://git.greyserv.net/marrub/motsognir.git"
|
||||||
|
[ppsspp-git]="--install-as ppsspp-git"
|
||||||
|
)
|
||||||
|
|
||||||
|
## EOF
|
Loading…
Reference in New Issue