mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-27 10:10:25 +01:00
merge: branch 'ih/spec_rm_snap'
spec: fix nmplugindir, remove snapshot and git_sha, move main info to the top https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2342
This commit is contained in:
commit
4cf6f0f9a8
2 changed files with 18 additions and 30 deletions
|
|
@ -6,17 +6,23 @@
|
|||
#
|
||||
# Note that it contains __PLACEHOLDERS__ that will be replaced by the accompanying 'build.sh' script.
|
||||
|
||||
Name: NetworkManager
|
||||
Summary: Network connection manager and user applications
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
URL: https://networkmanager.dev/
|
||||
Group: System Environment/Base
|
||||
|
||||
Epoch: 1
|
||||
Version: __VERSION__
|
||||
Release: __RELEASE_VERSION__%{?dist}
|
||||
|
||||
###############################################################################
|
||||
|
||||
%global wpa_supplicant_version 1:1.1
|
||||
|
||||
%global ppp_version %(pkg-config --modversion pppd 2>/dev/null || sed -n 's/^#define\\s*VERSION\\s*"\\([^\\s]*\\)"$/\\1/p' %{_includedir}/pppd/patchlevel.h 2>/dev/null | grep . || echo bad)
|
||||
%global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad)
|
||||
|
||||
%global epoch_version 1
|
||||
%global base_version __VERSION__
|
||||
%global release_version __RELEASE_VERSION__
|
||||
%global snapshot __SNAPSHOT__
|
||||
%global git_sha __COMMIT__
|
||||
%global bcond_default_debug __BCOND_DEFAULT_DEBUG__
|
||||
%global bcond_default_lto __BCOND_DEFAULT_LTO__
|
||||
%global bcond_default_test __BCOND_DEFAULT_TEST__
|
||||
|
|
@ -27,19 +33,10 @@
|
|||
%global obsoletes_ifcfg_rh 1:1.36.2
|
||||
|
||||
%global nmlibdir %{_prefix}/lib/%{name}
|
||||
%global nmplugindir %{_libdir}/%{name}/%{version_no_tilde}-%{release}
|
||||
%global nmplugindir %{_libdir}/%{name}/%{version}-%{release}
|
||||
|
||||
%global _hardened_build 1
|
||||
|
||||
%if "x%{?snapshot}" != "x"
|
||||
%global snapshot_dot .%{snapshot}
|
||||
%endif
|
||||
%if "x%{?git_sha}" != "x"
|
||||
%global git_sha_dot .%{git_sha}
|
||||
%endif
|
||||
|
||||
%global snap %{?snapshot_dot}%{?git_sha_dot}
|
||||
|
||||
%global systemd_units NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service nm-priv-helper.service
|
||||
|
||||
%global systemd_units_cloud_setup nm-cloud-setup.service nm-cloud-setup.timer
|
||||
|
|
@ -162,15 +159,6 @@
|
|||
|
||||
###############################################################################
|
||||
|
||||
Name: NetworkManager
|
||||
Summary: Network connection manager and user applications
|
||||
Epoch: %{epoch_version}
|
||||
Version: %{base_version}
|
||||
Release: %{release_version}%{?snap}%{?dist}
|
||||
Group: System Environment/Base
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
URL: https://networkmanager.dev/
|
||||
|
||||
#Source: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/releases/%{version_no_tilde}/downloads/%{name}-%{version_no_tilde}.tar.xz
|
||||
Source: __SOURCE1__
|
||||
Source1: NetworkManager.conf
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ exec 2>&1
|
|||
|
||||
UUID=`uuidgen`
|
||||
RELEASE_VERSION="${RELEASE_VERSION:-$(git rev-list HEAD | wc -l)}"
|
||||
SNAPSHOT="${SNAPSHOT:-%{nil\}}"
|
||||
VERSION="${VERSION:-$(get_version || die "Could not read $VERSION")}"
|
||||
COMMIT_FULL="${COMMIT_FULL:-$(git rev-parse --verify HEAD || die "Error reading HEAD revision")}"
|
||||
COMMIT="${COMMIT:-$(printf '%s' "$COMMIT_FULL" | sed 's/^\(.\{10\}\).*/\1/' || die "Error reading HEAD revision")}"
|
||||
|
|
@ -208,10 +207,6 @@ write_changelog
|
|||
|
||||
sed -e "s/__VERSION__/${VERSION/-/\~}/g" \
|
||||
-e "s/__RELEASE_VERSION__/$RELEASE_VERSION/g" \
|
||||
-e "s/__SNAPSHOT__/$SNAPSHOT/g" \
|
||||
-e "s/__COMMIT__/$COMMIT/g" \
|
||||
-e "s/__COMMIT_FULL__/$COMMIT_FULL/g" \
|
||||
-e "s/__SNAPSHOT__/$SNAPSHOT/g" \
|
||||
-e "s/__SOURCE1__/$(basename "$SOURCE")/g" \
|
||||
-e "s/__BCOND_DEFAULT_DEBUG__/$BCOND_DEFAULT_DEBUG/g" \
|
||||
-e "s/__BCOND_DEFAULT_LTO__/${BCOND_DEFAULT_LTO:-"%{nil}"}/g" \
|
||||
|
|
@ -232,7 +227,12 @@ case "$BUILDTYPE" in
|
|||
;;
|
||||
esac
|
||||
|
||||
rpmbuild --define "_topdir $TEMP" $RPM_BUILD_OPTION "$TEMPSPEC" $NM_RPMBUILD_ARGS || die "ERROR: rpmbuild FAILED"
|
||||
DIST=
|
||||
[[ "$COMMIT" != "" ]] && DIST=".${COMMIT}${DIST}"
|
||||
[[ "$SNAPSHOT" != "" ]] && DIST=".${SNAPSHOT}${DIST}"
|
||||
[[ "$DIST" != "" ]] && DIST=("--define" "dist ${DIST}$(rpmbuild --eval '%{dist}')")
|
||||
|
||||
rpmbuild --define "_topdir $TEMP" "${DIST[@]}" $RPM_BUILD_OPTION "$TEMPSPEC" $NM_RPMBUILD_ARGS || die "ERROR: rpmbuild FAILED"
|
||||
|
||||
LS_EXTRA=()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue