mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-15 02: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
|
SHELL=/bin/bash
|
||||||
|
|
||||||
V=1.1.0
|
V=1.1.1
|
||||||
BUILDTOOLVER ?= $(V)
|
BUILDTOOLVER ?= $(V)
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
@@ -69,6 +69,7 @@ Component: pkgctl db remove
|
|||||||
- bash
|
- bash
|
||||||
- binutils
|
- binutils
|
||||||
- coreutils
|
- coreutils
|
||||||
|
- curl
|
||||||
- diffutils
|
- diffutils
|
||||||
- fakeroot
|
- fakeroot
|
||||||
- findutils
|
- findutils
|
||||||
@@ -90,6 +91,7 @@ Component: pkgctl db remove
|
|||||||
|
|
||||||
- bat (pretty printing)
|
- bat (pretty printing)
|
||||||
- nvchecker (version checking)
|
- nvchecker (version checking)
|
||||||
|
- pacman-contrib (--update-checksums options for pkgctl build)
|
||||||
|
|
||||||
### Development Dependencies
|
### Development Dependencies
|
||||||
|
|
||||||
|
@@ -154,6 +154,7 @@ pkgctl_build() {
|
|||||||
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
||||||
pkgctl_build_check_option_group_repo '--repo' "${REPO}" "${TESTING}" "${STAGING}"
|
pkgctl_build_check_option_group_repo '--repo' "${REPO}" "${TESTING}" "${STAGING}"
|
||||||
REPO="${2}"
|
REPO="${2}"
|
||||||
|
RELEASE_OPTIONS+=("--repo" "${REPO}")
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--arch)
|
--arch)
|
||||||
@@ -204,11 +205,13 @@ pkgctl_build() {
|
|||||||
-s|--staging)
|
-s|--staging)
|
||||||
pkgctl_build_check_option_group_repo '--staging' "${REPO}" "${TESTING}" "${STAGING}"
|
pkgctl_build_check_option_group_repo '--staging' "${REPO}" "${TESTING}" "${STAGING}"
|
||||||
STAGING=1
|
STAGING=1
|
||||||
|
RELEASE_OPTIONS+=("--staging")
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-t|--testing)
|
-t|--testing)
|
||||||
pkgctl_build_check_option_group_repo '--testing' "${REPO}" "${TESTING}" "${STAGING}"
|
pkgctl_build_check_option_group_repo '--testing' "${REPO}" "${TESTING}" "${STAGING}"
|
||||||
TESTING=1
|
TESTING=1
|
||||||
|
RELEASE_OPTIONS+=("--testing")
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-c|--clean)
|
-c|--clean)
|
||||||
@@ -495,7 +498,7 @@ pkgctl_build() {
|
|||||||
|
|
||||||
# release the build
|
# release the build
|
||||||
if (( RELEASE )); then
|
if (( RELEASE )); then
|
||||||
pkgctl_release --repo "${pkgrepo}" "${RELEASE_OPTIONS[@]}"
|
pkgctl_release "${RELEASE_OPTIONS[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# reset common PKGBUILD variables
|
# 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 PKGBASE_MAINTAINER_URL=https://archlinux.org/packages/pkgbase-maintainer
|
||||||
export AUR_URL_SSH=aur@aur.archlinux.org
|
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
|
# check if messages are to be printed using color
|
||||||
if [[ -t 2 && "$TERM" != dumb ]] || [[ ${DEVTOOLS_COLOR} == always ]]; then
|
if [[ -t 2 && "$TERM" != dumb ]] || [[ ${DEVTOOLS_COLOR} == always ]]; then
|
||||||
colorize
|
colorize
|
||||||
PURPLE="$(tput setaf 5)"
|
if tput setaf 0 &>/dev/null; then
|
||||||
DARK_GREEN="$(tput setaf 2)"
|
PURPLE="$(tput setaf 5)"
|
||||||
UNDERLINE="$(tput smul)"
|
DARK_GREEN="$(tput setaf 2)"
|
||||||
|
UNDERLINE="$(tput smul)"
|
||||||
|
else
|
||||||
|
PURPLE="\e[35m"
|
||||||
|
DARK_GREEN="\e[32m"
|
||||||
|
UNDERLINE="\e[4m"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# shellcheck disable=2034
|
# shellcheck disable=2034
|
||||||
declare -gr ALL_OFF='' BOLD='' BLUE='' GREEN='' RED='' YELLOW='' PURPLE='' DARK_GREEN='' UNDERLINE=''
|
declare -gr ALL_OFF='' BOLD='' BLUE='' GREEN='' RED='' YELLOW='' PURPLE='' DARK_GREEN='' UNDERLINE=''
|
||||||
@@ -108,7 +117,9 @@ cleanup() {
|
|||||||
if [[ -n ${WORKDIR:-} ]] && $_setup_workdir; then
|
if [[ -n ${WORKDIR:-} ]] && $_setup_workdir; then
|
||||||
rm -rf "$WORKDIR"
|
rm -rf "$WORKDIR"
|
||||||
fi
|
fi
|
||||||
tput cnorm >&2
|
if tput setaf 0 &>/dev/null; then
|
||||||
|
tput cnorm >&2
|
||||||
|
fi
|
||||||
exit "${1:-0}"
|
exit "${1:-0}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,7 +28,9 @@ makepkg_source_package() {
|
|||||||
export LIBMAKEPKG_SRCINFO_SH=1
|
export LIBMAKEPKG_SRCINFO_SH=1
|
||||||
write_srcinfo() { print_srcinfo; }
|
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
|
# shellcheck source=/usr/bin/makepkg
|
||||||
source "$(command -v makepkg)"
|
source "$(command -v makepkg)"
|
||||||
)
|
)
|
||||||
|
@@ -99,6 +99,7 @@ mapfile -t files < <(
|
|||||||
# shellcheck disable=SC2145
|
# shellcheck disable=SC2145
|
||||||
cat "$SRCPKGDEST"/*"$SRCEXT" |
|
cat "$SRCPKGDEST"/*"$SRCEXT" |
|
||||||
ssh $server '
|
ssh $server '
|
||||||
|
export TERM="'"${TERM}"'"
|
||||||
temp="${XDG_CACHE_HOME:-$HOME/.cache}/offload-build" &&
|
temp="${XDG_CACHE_HOME:-$HOME/.cache}/offload-build" &&
|
||||||
mkdir -p "$temp" &&
|
mkdir -p "$temp" &&
|
||||||
temp=$(mktemp -d -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
|
if [[ -f /usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf ]]; then
|
||||||
makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf"
|
makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf"
|
||||||
fi &&
|
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"
|
printf "%s\n" "${temp}/PKGBUILD"
|
||||||
')
|
')
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user