mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
update build-pkg scripts
This commit is contained in:
parent
3e0b35e3e6
commit
25ce522e5e
@ -31,7 +31,7 @@ sudo pacman -U out/de-p1st-repo*.pkg.tar.*
|
|||||||
Then you can start building all packages and adding them to your mirror-server:
|
Then you can start building all packages and adding them to your mirror-server:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./build-pkg-docker.sh
|
./build-all.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,9 +82,9 @@ function main() {
|
|||||||
done
|
done
|
||||||
else
|
else
|
||||||
# Stage1
|
# Stage1
|
||||||
build-and-push xorg-meta de-p1st-locale de-p1st-systemd de-p1st-sudo de-p1st-screen de-p1st-htop de-p1st-pacman de-p1st-pacman-mirrorlist de-p1st-networkmanager de-p1st-ucode-placeholder de-p1st-ucode-intel de-p1st-ucode-amd de-p1st-nano de-p1st-mkinitcpio de-p1st-makepkg de-p1st-grub de-p1st-font de-p1st-keyboard-de de-p1st-keyboard-x11-de de-p1st-gnupg de-p1st-redshift de-p1st-theme de-p1st-sddm-autologin-placeholder de-p1st-sddm-autologin-yoda de-p1st-sddm-theme-default de-p1st-sddm-theme-nordic de-p1st-gpu-generic de-p1st-gpu-amdgpu de-p1st-installer de-p1st-repo || return $?
|
build-and-push xorg-meta de-p1st-locale de-p1st-systemd de-p1st-sudo de-p1st-screen de-p1st-htop de-p1st-pacman de-p1st-pacman-mirrorlist de-p1st-networkmanager de-p1st-ucode-placeholder de-p1st-ucode-intel de-p1st-ucode-amd de-p1st-nano de-p1st-mkinitcpio de-p1st-makepkg de-p1st-grub de-p1st-font de-p1st-keyboard-de de-p1st-keyboard-x11-de de-p1st-gnupg de-p1st-redshift de-p1st-theme de-p1st-sddm-autologin-placeholder de-p1st-sddm-autologin-yoda de-p1st-sddm-theme-default de-p1st-sddm-theme-nordic de-p1st-gpu-generic de-p1st-gpu-amdgpu de-p1st-installer de-p1st-repo de-p1st-ssh-key-placeholder de-p1st-ssh-key-yoda || return $?
|
||||||
# Stage2
|
# Stage2
|
||||||
build-and-push de-p1st-smartcard de-p1st-kernel-default de-p1st-kernel-lts de-p1st-dns || return $?
|
build-and-push de-p1st-smartcard de-p1st-kernel-default de-p1st-kernel-lts de-p1st-dns de-p1st-ssh || return $?
|
||||||
# Stage3
|
# Stage3
|
||||||
build-and-push de-p1st-base || return $?
|
build-and-push de-p1st-base || return $?
|
||||||
# Stage4
|
# Stage4
|
@ -28,7 +28,13 @@ function start-docker() {
|
|||||||
|
|
||||||
function build-pkg() {
|
function build-pkg() {
|
||||||
# --rm: Remove container after run.
|
# --rm: Remove container after run.
|
||||||
sudo docker-compose run --rm makepkg "${1}"
|
COMPOSE_ARGS=('run' '--rm' 'makepkg')
|
||||||
|
if [ "${INTERACTIVE}" = "true" ]; then
|
||||||
|
COMPOSE_ARGS+=('interactive')
|
||||||
|
fi
|
||||||
|
COMPOSE_ARGS+=("${1}")
|
||||||
|
|
||||||
|
sudo docker-compose "${COMPOSE_ARGS[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function push-pkg() {
|
function push-pkg() {
|
||||||
@ -46,15 +52,16 @@ function main() {
|
|||||||
start-docker || return $?
|
start-docker || return $?
|
||||||
is-installed "docker-compose" || return $?
|
is-installed "docker-compose" || return $?
|
||||||
|
|
||||||
# PKGS=(xorg-meta de-p1st-systemd de-p1st-sudo de-p1st-screen de-p1st-pacman de-p1st-pacman-mirrorlist de-p1st-networkmanager de-p1st-ucode-placeholder de-p1st-ucode-intel de-p1st-ucode-amd de-p1st-nano de-p1st-mkinitcpio de-p1st-makepkg de-p1st-grub de-p1st-font de-p1st-keyboard-de de-p1st-keyboard-x11-de de-p1st-gnupg de-p1st-redshift de-p1st-theme de-p1st-gpu-generic de-p1st-gpu-amdgpu de-p1st-installer de-p1st-repo)
|
if [ "${1}" = "interactive" ]; then
|
||||||
# for PKG in "${PKGS[@]}"; do
|
echo "Interactive mode enabled"
|
||||||
# build-pkg "${PKG}" || return $?
|
INTERACTIVE=true
|
||||||
# done
|
shift; # remove first argument
|
||||||
|
fi
|
||||||
|
|
||||||
# Stage1
|
# Stage1
|
||||||
build-and-push xorg-meta de-p1st-locale de-p1st-systemd de-p1st-sudo de-p1st-screen de-p1st-htop de-p1st-pacman de-p1st-pacman-mirrorlist de-p1st-networkmanager de-p1st-ucode-placeholder de-p1st-ucode-intel de-p1st-ucode-amd de-p1st-nano de-p1st-mkinitcpio de-p1st-makepkg de-p1st-grub de-p1st-font de-p1st-keyboard-de de-p1st-keyboard-x11-de de-p1st-gnupg de-p1st-redshift de-p1st-theme de-p1st-sddm-autologin-placeholder de-p1st-sddm-autologin-yoda de-p1st-sddm-theme-default de-p1st-sddm-theme-nordic de-p1st-gpu-generic de-p1st-gpu-amdgpu de-p1st-installer de-p1st-repo || return $?
|
build-and-push xorg-meta de-p1st-locale de-p1st-systemd de-p1st-sudo de-p1st-screen de-p1st-htop de-p1st-pacman de-p1st-pacman-mirrorlist de-p1st-networkmanager de-p1st-ucode-placeholder de-p1st-ucode-intel de-p1st-ucode-amd de-p1st-nano de-p1st-mkinitcpio de-p1st-makepkg de-p1st-grub de-p1st-font de-p1st-keyboard-de de-p1st-keyboard-x11-de de-p1st-gnupg de-p1st-redshift de-p1st-theme de-p1st-sddm-autologin-placeholder de-p1st-sddm-autologin-yoda de-p1st-sddm-theme-default de-p1st-sddm-theme-nordic de-p1st-gpu-generic de-p1st-gpu-amdgpu de-p1st-installer de-p1st-repo de-p1st-ssh-key-placeholder de-p1st-ssh-key-yoda || return $?
|
||||||
# Stage2
|
# Stage2
|
||||||
build-and-push de-p1st-smartcard de-p1st-kernel-default de-p1st-kernel-lts de-p1st-dns || return $?
|
build-and-push de-p1st-smartcard de-p1st-kernel-default de-p1st-kernel-lts de-p1st-dns de-p1st-ssh || return $?
|
||||||
# Stage3
|
# Stage3
|
||||||
build-and-push de-p1st-base || return $?
|
build-and-push de-p1st-base || return $?
|
||||||
# Stage4
|
# Stage4
|
@ -1,7 +1,13 @@
|
|||||||
version: '3.7'
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
# usage: sudo docker-compose run --rm makepkg
|
# usage:
|
||||||
|
# - use PKGBUILD found in /pkg
|
||||||
|
# sudo docker-compose run --rm makepkg
|
||||||
|
# sudo docker-compose run --rm makepkg interactive
|
||||||
|
# - use PKGBUILD found in /pkg/<RelativePath>
|
||||||
|
# sudo docker-compose run --rm makepkg <RelativePath>
|
||||||
|
# sudo docker-compose run --rm makepkg interactive <RelativePath>
|
||||||
makepkg:
|
makepkg:
|
||||||
build: .
|
build: .
|
||||||
|
|
||||||
|
@ -13,10 +13,14 @@ function build-pkg(){
|
|||||||
cp -r "${PKG}" /tmp/pkg
|
cp -r "${PKG}" /tmp/pkg
|
||||||
cd /tmp/pkg
|
cd /tmp/pkg
|
||||||
|
|
||||||
|
MAKEPKG_ARGS=('--syncdeps')
|
||||||
|
if [ "${INTERACTIVE}" != "true" ]; then
|
||||||
|
MAKEPKG_ARGS+=('--noconfirm') # --noconfirm is passed to pacman
|
||||||
|
fi
|
||||||
|
|
||||||
# Build the package.
|
# Build the package.
|
||||||
# One could add argument "--noconfirm" to "makepkg" (which will be passed to Pacman) for non-interactive mode.
|
|
||||||
set +e
|
set +e
|
||||||
makepkg --syncdeps
|
makepkg "${MAKEPKG_ARGS[@]}"
|
||||||
saved="$?"
|
saved="$?"
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -43,6 +47,11 @@ function main(){
|
|||||||
# Refresh mirrors
|
# Refresh mirrors
|
||||||
sudo pacman -Sy
|
sudo pacman -Sy
|
||||||
|
|
||||||
|
if [ "${1}" = "interactive" ]; then
|
||||||
|
INTERACTIVE=true
|
||||||
|
shift; # remove first argument
|
||||||
|
fi
|
||||||
|
|
||||||
# If first argument is zero, use default directory
|
# If first argument is zero, use default directory
|
||||||
if [ -z "${1}" ]; then
|
if [ -z "${1}" ]; then
|
||||||
PKG=/pkg
|
PKG=/pkg
|
||||||
|
Loading…
Reference in New Issue
Block a user