Adding more concrete specs

This commit is contained in:
2026-04-27 10:25:41 -04:00
parent b01ef3b6d8
commit 1a4f32b5bd
5 changed files with 20 additions and 8 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ Latest upstream version tracked in this repo: `1.12.15`
- Downloads the current upstream tarball.
- 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.
- Removes the upstream auto-update manifest so RPM remains the update path.
- Sets `resources/package-type` to `rpm`.
@@ -39,7 +40,7 @@ Artifacts are written to `dist/`.
Use COPR's SCM source type with:
- Clone URL: this repository
- Spec file: `SPECS/element-desktop.spec`
- Spec template: `SPECS/element-desktop.spec.in`
- SRPM build method: `make srpm`
- Enable only `x86_64` binary chroots for this package
@@ -1,8 +1,7 @@
%{!?upstream_version:%global upstream_version 0}
%global debug_package %{nil}
Name: element-desktop
Version: %{upstream_version}
Version: @VERSION@
Release: 1%{?dist}
Summary: Secure messaging and collaboration desktop client
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
%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
+1 -2
View File
@@ -23,13 +23,12 @@ mkdir -p \
"$ROOT_DIR/scripts/fetch-source.sh" "$TOPDIR/SOURCES" >/dev/null
version="$(cat "$TOPDIR/SOURCES/.upstream-version")"
cp "$ROOT_DIR/SPECS/element-desktop.spec" "$TOPDIR/SPECS/"
cp "$ROOT_DIR/SOURCES/element-desktop.desktop" "$TOPDIR/SOURCES/"
"$ROOT_DIR/scripts/render-spec.sh" "$version" "$TOPDIR/SPECS/element-desktop.spec"
rpmbuild -ba \
--target "$RPM_TARGET" \
--define "_topdir $TOPDIR" \
--define "upstream_version $version" \
"$TOPDIR/SPECS/element-desktop.spec"
cp "$TOPDIR/SRPMS/"*.src.rpm "$OUTDIR/"
+1 -2
View File
@@ -23,13 +23,12 @@ mkdir -p \
"$ROOT_DIR/scripts/fetch-source.sh" "$TOPDIR/SOURCES" >/dev/null
version="$(cat "$TOPDIR/SOURCES/.upstream-version")"
cp "$ROOT_DIR/SPECS/element-desktop.spec" "$TOPDIR/SPECS/"
cp "$ROOT_DIR/SOURCES/element-desktop.desktop" "$TOPDIR/SOURCES/"
"$ROOT_DIR/scripts/render-spec.sh" "$version" "$TOPDIR/SPECS/element-desktop.spec"
rpmbuild -bs \
--target "$RPM_TARGET" \
--define "_topdir $TOPDIR" \
--define "upstream_version $version" \
"$TOPDIR/SPECS/element-desktop.spec"
cp "$TOPDIR/SRPMS/"*.src.rpm "$OUTDIR/"
+14
View File
@@ -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"