mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 03:38:09 +02:00
This script comes handy to build from git tree without having to install build dependencies on the system, the actual build happens inside mock environment. https://github.com/NetworkManager/NetworkManager/pull/34
20 lines
421 B
Bash
Executable file
20 lines
421 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# mockbuild.sh
|
|
#
|
|
# Generate SRPM from git tree and rebuild it using mock.
|
|
|
|
SCRIPTDIR="$(dirname "$(readlink -f "$0")")"
|
|
FEDORAVER=$(sed -E 's/.*([0-9]{2}).*/\1/g' /etc/fedora-release)
|
|
ARCH=$(uname -m)
|
|
SRPM=${SCRIPTDIR}/latest/SRPMS/NetworkManager*.src.rpm
|
|
|
|
alias mock="mock -r fedora-${FEDORAVER}-${ARCH}"
|
|
|
|
# Generate SRPM
|
|
${SCRIPTDIR}/build_clean.sh --srpm --git
|
|
|
|
# Rebuild SRPM
|
|
mock --rebuild ${SRPM}
|
|
|
|
exit
|