1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# RPM spec file for openEuler-recorder.
#
# Target: openEuler 24.03 LTS. The same spec builds unchanged on Fedora and
# RHEL clones because the payload is architecture independent: one bash
# script and one Python 3 / PyQt5 script, nothing is compiled.
#
# Build through the helper script (recommended):
# ./packaging/build-rpm.sh
# or directly, with the tarball already in SOURCES:
# rpmbuild -ba packaging/openEuler-recorder.spec
Name: openEuler-recorder
Version: 0.1.0
Release: 1%{?dist}
Summary: Lightweight X11 screen recorder built on ffmpeg x11grab
License: MIT
URL: https://github.com/BOU-A/openEuler-recorder
Source0: %{url}/archive/v%{version}.tar.gz
BuildArch: noarch
# The source tarball is produced by packaging/build-rpm.sh. rpmbuild derives
# its file name from the last component of Source0, so the tarball is called
# v<version>.tar.gz and unpacks to openEuler-recorder-<version>/, which is what
# the autosetup directive below expects.
#
# NOTE: never write a percent-sign macro name inside a comment. RPM expands
# macros in comments too, and the expansion can produce a line that starts
# with a directive, which the parser then rejects.
# No BuildRequires: nothing is compiled. The payload is a bash script and a
# Python script that are installed verbatim, so rpmbuild needs nothing beyond
# its own coreutils.
# Runtime requirements. Both front ends shell out to ffmpeg (x11grab input,
# libx264 encoder, pulse audio input); the GUI additionally imports PyQt5.
# Requires is used instead of Recommends so that a plain
# "dnf install openEuler-recorder" always produces a working program.
Requires: ffmpeg
Requires: python3-qt5
%description
openEuler-recorder records an X11 desktop through ffmpeg's x11grab input and
encodes it with libx264 into an H.264 MP4 file. Sound can be captured from
PulseAudio, and the capture region (WIDTHxHEIGHT+X+Y) and frame rate are
configurable.
The package ships two front ends:
openEuler-recorder command line: start, stop, status, list, play
openEuler-recorder-gui PyQt5 window with a system tray icon
Recordings are written to ~/Videos/Recordings.
%prep
%autosetup -n %{name}-%{version}
%build
# Nothing to compile: the package contains shell and Python scripts only.
%install
# Fixed installation layout. The desktop entry lookup and the icon theme
# lookup depend on these exact paths, so do not relocate them.
install -Dm755 openEuler-recorder %{buildroot}/usr/bin/openEuler-recorder
install -Dm755 openEuler-recorder-gui %{buildroot}/usr/bin/openEuler-recorder-gui
install -Dm644 share/applications/openEuler-recorder-gui.desktop %{buildroot}/usr/share/applications/openEuler-recorder-gui.desktop
install -Dm644 share/icons/hicolor/scalable/apps/openEuler-recorder.svg %{buildroot}/usr/share/icons/hicolor/scalable/apps/openEuler-recorder.svg
%check
# Cheap guard against a broken CLI script slipping into the package.
bash -n openEuler-recorder
%files
# The desktop entry carries Exec=openEuler-recorder-gui (resolved through PATH)
# and Icon=openEuler-recorder, so it is installed verbatim; this spec performs no
# text substitution on it.
#
# The doc directive installs README.md as /usr/share/doc/openEuler-recorder/README.md,
# which is the README path of the documented layout.
%license LICENSE
%doc README.md
/usr/bin/openEuler-recorder
/usr/bin/openEuler-recorder-gui
/usr/share/applications/openEuler-recorder-gui.desktop
/usr/share/icons/hicolor/scalable/apps/openEuler-recorder.svg
%changelog
* Wed Dec 02 2026 BOUA <BOU-A@users.noreply.github.com> - 0.1.0-1
- Initial package
|