mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 20:45:32 +00:00
contrib/rpm: allow building of a git archive
No need for a make dist.
This commit is contained in:
parent
e3e0a49075
commit
9e9ec1a3da
|
@ -343,7 +343,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
|
||||||
#%patch1 -p1
|
#%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
gtkdocize
|
||||||
autoreconf --install --force
|
autoreconf --install --force
|
||||||
intltoolize --automake --copy --force
|
intltoolize --automake --copy --force
|
||||||
%configure \
|
%configure \
|
||||||
|
|
|
@ -68,9 +68,13 @@ COMMIT_FULL="${COMMIT_FULL:-$(git rev-parse --verify HEAD || die "Error reading
|
||||||
COMMIT="${COMMIT:-$(git rev-parse --verify HEAD | sed 's/^\(.\{10\}\).*/\1/' || die "Error reading HEAD revision")}"
|
COMMIT="${COMMIT:-$(git rev-parse --verify HEAD | sed 's/^\(.\{10\}\).*/\1/' || die "Error reading HEAD revision")}"
|
||||||
USERNAME="${USERNAME:-"$(git config user.name) <$(git config user.email)>"}"
|
USERNAME="${USERNAME:-"$(git config user.name) <$(git config user.email)>"}"
|
||||||
SPECFILE="$(abs_path "$SPECFILE" "$SCRIPTDIR/NetworkManager.spec")"
|
SPECFILE="$(abs_path "$SPECFILE" "$SCRIPTDIR/NetworkManager.spec")"
|
||||||
_SOURCE="$SOURCE"
|
if [ "$SOURCE" ]; then
|
||||||
SOURCE="$(abs_path "$SOURCE" "$(ls -1 "$GITDIR/NetworkManager-$VERSION"*.tar* 2>/dev/null | head -n1)")"
|
[[ -f "$SOURCE" ]] || die "could not find source $SOURCE"
|
||||||
[[ -f "$SOURCE" ]] || die "could not find source ${_SOURCE:-$GITDIR/NetworkManager-$VERSION*.tar*} . Did you execute \`make dist\`? Otherwise set \$SOURCE variable"
|
else
|
||||||
|
SOURCE="$(abs_path "$GITDIR/NetworkManager-$VERSION".tar.xz)"
|
||||||
|
[[ -f "$SOURCE" ]] || (cd "$GITDIR" && git archive --prefix="NetworkManager-$VERSION"/ HEAD) |xz >"$SOURCE"
|
||||||
|
fi
|
||||||
|
|
||||||
SOURCE_NETWORKMANAGER_CONF="$(abs_path "$SOURCE_NETWORKMANAGER_CONF" "$SCRIPTDIR/NetworkManager.conf")"
|
SOURCE_NETWORKMANAGER_CONF="$(abs_path "$SOURCE_NETWORKMANAGER_CONF" "$SCRIPTDIR/NetworkManager.conf")"
|
||||||
SOURCE_CONFIG_SERVER="$(abs_path "$SOURCE_CONFIG_SERVER" "$SCRIPTDIR/00-server.conf")"
|
SOURCE_CONFIG_SERVER="$(abs_path "$SOURCE_CONFIG_SERVER" "$SCRIPTDIR/00-server.conf")"
|
||||||
SOURCE_CONFIG_CONNECTIVITY_FEDORA="$(abs_path "$SOURCE_CONFIG_CONNECTIVITY_FEDORA" "$SCRIPTDIR/20-connectivity-fedora.conf")"
|
SOURCE_CONFIG_CONNECTIVITY_FEDORA="$(abs_path "$SOURCE_CONFIG_CONNECTIVITY_FEDORA" "$SCRIPTDIR/20-connectivity-fedora.conf")"
|
||||||
|
|
Loading…
Reference in a new issue