mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 01:46:19 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6d0ac6b9a8 | ||
![]() |
66a4357f3e | ||
![]() |
db2f82bf19 | ||
![]() |
e0a84aefc3 | ||
![]() |
98bd7e3760 | ||
![]() |
3e79cb8f4a | ||
![]() |
1cf402eae9 | ||
![]() |
0469d3c902 | ||
![]() |
f6b1b1ba45 |
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
SHELL=/bin/bash
|
||||
|
||||
V=1.1.0
|
||||
V=1.1.1
|
||||
BUILDTOOLVER ?= $(V)
|
||||
|
||||
PREFIX = /usr/local
|
||||
|
@@ -69,6 +69,7 @@ Component: pkgctl db remove
|
||||
- bash
|
||||
- binutils
|
||||
- coreutils
|
||||
- curl
|
||||
- diffutils
|
||||
- fakeroot
|
||||
- findutils
|
||||
@@ -90,6 +91,7 @@ Component: pkgctl db remove
|
||||
|
||||
- bat (pretty printing)
|
||||
- nvchecker (version checking)
|
||||
- pacman-contrib (--update-checksums options for pkgctl build)
|
||||
|
||||
### Development Dependencies
|
||||
|
||||
|
@@ -154,6 +154,7 @@ pkgctl_build() {
|
||||
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
||||
pkgctl_build_check_option_group_repo '--repo' "${REPO}" "${TESTING}" "${STAGING}"
|
||||
REPO="${2}"
|
||||
RELEASE_OPTIONS+=("--repo" "${REPO}")
|
||||
shift 2
|
||||
;;
|
||||
--arch)
|
||||
@@ -204,11 +205,13 @@ pkgctl_build() {
|
||||
-s|--staging)
|
||||
pkgctl_build_check_option_group_repo '--staging' "${REPO}" "${TESTING}" "${STAGING}"
|
||||
STAGING=1
|
||||
RELEASE_OPTIONS+=("--staging")
|
||||
shift
|
||||
;;
|
||||
-t|--testing)
|
||||
pkgctl_build_check_option_group_repo '--testing' "${REPO}" "${TESTING}" "${STAGING}"
|
||||
TESTING=1
|
||||
RELEASE_OPTIONS+=("--testing")
|
||||
shift
|
||||
;;
|
||||
-c|--clean)
|
||||
@@ -495,7 +498,7 @@ pkgctl_build() {
|
||||
|
||||
# release the build
|
||||
if (( RELEASE )); then
|
||||
pkgctl_release --repo "${pkgrepo}" "${RELEASE_OPTIONS[@]}"
|
||||
pkgctl_release "${RELEASE_OPTIONS[@]}"
|
||||
fi
|
||||
|
||||
# reset common PKGBUILD variables
|
||||
|
@@ -31,12 +31,21 @@ export PACKAGING_REPO_RELEASE_HOST=repos.archlinux.org
|
||||
export PKGBASE_MAINTAINER_URL=https://archlinux.org/packages/pkgbase-maintainer
|
||||
export AUR_URL_SSH=aur@aur.archlinux.org
|
||||
|
||||
# ensure TERM is set with a fallback to dumb
|
||||
export TERM=${TERM:-dumb}
|
||||
|
||||
# check if messages are to be printed using color
|
||||
if [[ -t 2 && "$TERM" != dumb ]] || [[ ${DEVTOOLS_COLOR} == always ]]; then
|
||||
colorize
|
||||
PURPLE="$(tput setaf 5)"
|
||||
DARK_GREEN="$(tput setaf 2)"
|
||||
UNDERLINE="$(tput smul)"
|
||||
if tput setaf 0 &>/dev/null; then
|
||||
PURPLE="$(tput setaf 5)"
|
||||
DARK_GREEN="$(tput setaf 2)"
|
||||
UNDERLINE="$(tput smul)"
|
||||
else
|
||||
PURPLE="\e[35m"
|
||||
DARK_GREEN="\e[32m"
|
||||
UNDERLINE="\e[4m"
|
||||
fi
|
||||
else
|
||||
# shellcheck disable=2034
|
||||
declare -gr ALL_OFF='' BOLD='' BLUE='' GREEN='' RED='' YELLOW='' PURPLE='' DARK_GREEN='' UNDERLINE=''
|
||||
@@ -108,7 +117,9 @@ cleanup() {
|
||||
if [[ -n ${WORKDIR:-} ]] && $_setup_workdir; then
|
||||
rm -rf "$WORKDIR"
|
||||
fi
|
||||
tput cnorm >&2
|
||||
if tput setaf 0 &>/dev/null; then
|
||||
tput cnorm >&2
|
||||
fi
|
||||
exit "${1:-0}"
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,9 @@ makepkg_source_package() {
|
||||
export LIBMAKEPKG_SRCINFO_SH=1
|
||||
write_srcinfo() { print_srcinfo; }
|
||||
|
||||
set +e -- -F --source
|
||||
# explicitly instruct makepkg to not sign the source package, even when
|
||||
# the BUILDENV array in makepkg.conf contains 'sign'
|
||||
set +e -- -F --source --nosign
|
||||
# shellcheck source=/usr/bin/makepkg
|
||||
source "$(command -v makepkg)"
|
||||
)
|
||||
|
@@ -99,6 +99,7 @@ mapfile -t files < <(
|
||||
# shellcheck disable=SC2145
|
||||
cat "$SRCPKGDEST"/*"$SRCEXT" |
|
||||
ssh $server '
|
||||
export TERM="'"${TERM}"'"
|
||||
temp="${XDG_CACHE_HOME:-$HOME/.cache}/offload-build" &&
|
||||
mkdir -p "$temp" &&
|
||||
temp=$(mktemp -d -p "$temp") &&
|
||||
@@ -114,7 +115,9 @@ mapfile -t files < <(
|
||||
if [[ -f /usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf ]]; then
|
||||
makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf"
|
||||
fi &&
|
||||
makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist &&
|
||||
while read -r file; do
|
||||
[[ -f "${file}" ]] && printf "%s\n" "${file}" ||:
|
||||
done < <(makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist) &&
|
||||
printf "%s\n" "${temp}/PKGBUILD"
|
||||
')
|
||||
|
||||
|
Reference in New Issue
Block a user