Adding more concrete specs
This commit is contained in:
@@ -11,6 +11,7 @@ Latest upstream version tracked in this repo: `1.12.15`
|
|||||||
|
|
||||||
- Downloads the current upstream tarball.
|
- Downloads the current upstream tarball.
|
||||||
- Derives the version from the tarball root directory.
|
- Derives the version from the tarball root directory.
|
||||||
|
- Renders a concrete spec file with that version before invoking `rpmbuild`.
|
||||||
- Repackages the prebuilt binaries into an RPM.
|
- Repackages the prebuilt binaries into an RPM.
|
||||||
- Removes the upstream auto-update manifest so RPM remains the update path.
|
- Removes the upstream auto-update manifest so RPM remains the update path.
|
||||||
- Sets `resources/package-type` to `rpm`.
|
- Sets `resources/package-type` to `rpm`.
|
||||||
@@ -39,7 +40,7 @@ Artifacts are written to `dist/`.
|
|||||||
Use COPR's SCM source type with:
|
Use COPR's SCM source type with:
|
||||||
|
|
||||||
- Clone URL: this repository
|
- Clone URL: this repository
|
||||||
- Spec file: `SPECS/element-desktop.spec`
|
- Spec template: `SPECS/element-desktop.spec.in`
|
||||||
- SRPM build method: `make srpm`
|
- SRPM build method: `make srpm`
|
||||||
- Enable only `x86_64` binary chroots for this package
|
- Enable only `x86_64` binary chroots for this package
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
%{!?upstream_version:%global upstream_version 0}
|
|
||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: element-desktop
|
Name: element-desktop
|
||||||
Version: %{upstream_version}
|
Version: @VERSION@
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Secure messaging and collaboration desktop client
|
Summary: Secure messaging and collaboration desktop client
|
||||||
License: Apache-2.0 AND BSD-3-Clause AND MIT
|
License: Apache-2.0 AND BSD-3-Clause AND MIT
|
||||||
@@ -51,5 +50,5 @@ install -Dpm 0644 resources/build/icon.png \
|
|||||||
%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
|
%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Apr 27 2026 Codex <codex@openai.com> - 0-1
|
* Mon Apr 27 2026 Codex <codex@openai.com> - @VERSION@-1
|
||||||
- Initial RPM packaging for upstream Element Desktop tarballs
|
- Initial RPM packaging for upstream Element Desktop tarballs
|
||||||
@@ -23,13 +23,12 @@ mkdir -p \
|
|||||||
"$ROOT_DIR/scripts/fetch-source.sh" "$TOPDIR/SOURCES" >/dev/null
|
"$ROOT_DIR/scripts/fetch-source.sh" "$TOPDIR/SOURCES" >/dev/null
|
||||||
version="$(cat "$TOPDIR/SOURCES/.upstream-version")"
|
version="$(cat "$TOPDIR/SOURCES/.upstream-version")"
|
||||||
|
|
||||||
cp "$ROOT_DIR/SPECS/element-desktop.spec" "$TOPDIR/SPECS/"
|
|
||||||
cp "$ROOT_DIR/SOURCES/element-desktop.desktop" "$TOPDIR/SOURCES/"
|
cp "$ROOT_DIR/SOURCES/element-desktop.desktop" "$TOPDIR/SOURCES/"
|
||||||
|
"$ROOT_DIR/scripts/render-spec.sh" "$version" "$TOPDIR/SPECS/element-desktop.spec"
|
||||||
|
|
||||||
rpmbuild -ba \
|
rpmbuild -ba \
|
||||||
--target "$RPM_TARGET" \
|
--target "$RPM_TARGET" \
|
||||||
--define "_topdir $TOPDIR" \
|
--define "_topdir $TOPDIR" \
|
||||||
--define "upstream_version $version" \
|
|
||||||
"$TOPDIR/SPECS/element-desktop.spec"
|
"$TOPDIR/SPECS/element-desktop.spec"
|
||||||
|
|
||||||
cp "$TOPDIR/SRPMS/"*.src.rpm "$OUTDIR/"
|
cp "$TOPDIR/SRPMS/"*.src.rpm "$OUTDIR/"
|
||||||
|
|||||||
@@ -23,13 +23,12 @@ mkdir -p \
|
|||||||
"$ROOT_DIR/scripts/fetch-source.sh" "$TOPDIR/SOURCES" >/dev/null
|
"$ROOT_DIR/scripts/fetch-source.sh" "$TOPDIR/SOURCES" >/dev/null
|
||||||
version="$(cat "$TOPDIR/SOURCES/.upstream-version")"
|
version="$(cat "$TOPDIR/SOURCES/.upstream-version")"
|
||||||
|
|
||||||
cp "$ROOT_DIR/SPECS/element-desktop.spec" "$TOPDIR/SPECS/"
|
|
||||||
cp "$ROOT_DIR/SOURCES/element-desktop.desktop" "$TOPDIR/SOURCES/"
|
cp "$ROOT_DIR/SOURCES/element-desktop.desktop" "$TOPDIR/SOURCES/"
|
||||||
|
"$ROOT_DIR/scripts/render-spec.sh" "$version" "$TOPDIR/SPECS/element-desktop.spec"
|
||||||
|
|
||||||
rpmbuild -bs \
|
rpmbuild -bs \
|
||||||
--target "$RPM_TARGET" \
|
--target "$RPM_TARGET" \
|
||||||
--define "_topdir $TOPDIR" \
|
--define "_topdir $TOPDIR" \
|
||||||
--define "upstream_version $version" \
|
|
||||||
"$TOPDIR/SPECS/element-desktop.spec"
|
"$TOPDIR/SPECS/element-desktop.spec"
|
||||||
|
|
||||||
cp "$TOPDIR/SRPMS/"*.src.rpm "$OUTDIR/"
|
cp "$TOPDIR/SRPMS/"*.src.rpm "$OUTDIR/"
|
||||||
|
|||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
ROOT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
|
||||||
|
VERSION="${1:-}"
|
||||||
|
OUTFILE="${2:-}"
|
||||||
|
TEMPLATE="$ROOT_DIR/SPECS/element-desktop.spec.in"
|
||||||
|
|
||||||
|
if [ -z "$VERSION" ] || [ -z "$OUTFILE" ]; then
|
||||||
|
echo "usage: $0 VERSION OUTFILE" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed "s/@VERSION@/$VERSION/g" "$TEMPLATE" > "$OUTFILE"
|
||||||
Reference in New Issue
Block a user