Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/build-rpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build RPM

on:
workflow_dispatch:

jobs:
build-rpm:
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Build RPM in Fedora container
run: |
docker run --rm \
-v ${{ github.workspace }}:/work \
-w /work \
fedora:43 \
bash -euc '
dnf install -y \
rpm-build \
python3-devel \
python3-pip \
python3-packaging \
python3-wheel \
python3-hatchling \
pyproject-rpm-macros \
curl
curl -Ls https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"

UV_VERSION_OUT=$(uv version)
NAME=$(echo "$UV_VERSION_OUT" | awk "{print \$1}")
VERSION=$(echo "$UV_VERSION_OUT" | awk "{print \$2}")

uv build --sdist

mkdir -p rpmbuild/SOURCES rpmbuild/SPECS
cp dist/${NAME}-${VERSION}.tar.gz rpmbuild/SOURCES/
cp rpm/${NAME}.spec rpmbuild/SPECS/

cd rpmbuild
rpmbuild -ba SPECS/${NAME}.spec --define "_topdir $(pwd)"
'

- name: Upload RPM artifacts
uses: actions/upload-artifact@v5
with:
name: rpm-package
path: rpmbuild/RPMS/**/*.rpm
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ var/
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
Expand Down
11 changes: 0 additions & 11 deletions VoiceRecorder.pyw

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
15 changes: 10 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readme = "README.md"
requires-python = ">=3.12"

dependencies = [
"pyside6>=6.10.0",
"pyside6>=6.9.2",
]

[project.gui-scripts]
Expand All @@ -31,10 +31,12 @@ package = true


[tool.hatch.build.targets.sdist]
include = ["voicerecorder"]

[tool.hatch.build.targets.wheel]
include = ["voicerecorder"]
exclude = [
".ruff_cache",
".github",
".cache",
".venv",
]


[tool.ruff]
Expand Down Expand Up @@ -83,3 +85,6 @@ check = ["check-format", "check-lint"]
fix-format = "ruff format ."
fix-lint = "ruff check --fix ."
fix = ["fix-format", "fix-lint"]

rcc = "pyside6-rcc -o ./src/voicerecorder/voicerecorder_rc.py ./voicerecorder.qrc"
uic = "pyside6-uic --from-imports -o ./src/voicerecorder/mainwindow_ui.py ./ui/mainwindow.ui"
48 changes: 48 additions & 0 deletions rpm/voicerecorder.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Name: voicerecorder
Version: 0.6.0
Release: 1%{?dist}
Summary: VoiceRecorder is a simple voice/audio recording application

License: MIT
URL: https://github.com/espdev/VoiceRecorder
Source0: %{name}-%{version}.tar.gz

BuildArch: noarch

BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-packaging
BuildRequires: python3-hatchling
BuildRequires: pyproject-rpm-macros

Requires: python3-pyside6

%description
VoiceRecorder is a simple voice/audio recording application.

%prep
%autosetup -n %{name}-%{version}

%generate_buildrequires
%pyproject_buildrequires -R

%build
%pyproject_wheel

%install
%pyproject_install

install -Dpm 644 voicerecorder.desktop %{buildroot}%{_datadir}/applications/voicerecorder.desktop
install -Dpm 644 icons/mic.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/voicerecorder.png

%files
%license LICENSE
%doc README.md
%{python3_sitelib}/voicerecorder*
%{_bindir}/voicerecorder
%{_datadir}/applications/voicerecorder.desktop
%{_datadir}/icons/hicolor/32x32/apps/voicerecorder.png

%changelog
* Tue Nov 04 2025 Evgeny Prilepin <esp.home@gmail.com> - 0.6.0
- Initial RPM release
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
QHBoxLayout, QHeaderView, QLabel, QMainWindow,
QMenuBar, QPushButton, QSizePolicy, QSpacerItem,
QStatusBar, QTableView, QVBoxLayout, QWidget)
from . import mainwindow_rc
from . import voicerecorder_rc

class Ui_MainWindow(object):
def setupUi(self, MainWindow):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
\x90\xde6\x00\x00\x00\x00IEND\xaeB`\x82\
"

qt_resource_name = b'\
qt_resource_name = b"\
\x00\x05\
\x00o\xa6S\
\x00i\
Expand Down Expand Up @@ -230,36 +230,33 @@
\x07\x8b\xa6\x84\
\x00r\
\x00e\x00c\x00o\x00r\x00d\
'
"

qt_resource_struct = b'\
qt_resource_struct = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x000\x00\x00\x00\x00\x00\x01\x00\x00\x02\xf3\
\x00\x00\x01\x99}\xe7\xed:\
\x00\x00\x01|\xbeG,\x8e\
\x00\x00\x00<\x00\x00\x00\x00\x00\x01\x00\x00\x05\xb4\
\x00\x00\x01\x99}\xe7\xed:\
\x00\x00\x01|\xbeG,\x8e\
\x00\x00\x00\x22\x00\x00\x00\x00\x00\x01\x00\x00\x01z\
\x00\x00\x01\x99}\xe7\xed:\
\x00\x00\x01|\xbeG,\x8e\
\x00\x00\x00H\x00\x00\x00\x00\x00\x01\x00\x00\x06\xea\
\x00\x00\x01\x99}\xe7\xed:\
\x00\x00\x01|\xbeG,\x8e\
\x00\x00\x00V\x00\x00\x00\x00\x00\x01\x00\x00\x08:\
\x00\x00\x01\x99}\xe7\xed:\
\x00\x00\x01|\xbeG,\x8e\
\x00\x00\x00f\x00\x00\x00\x00\x00\x01\x00\x00\x09\x84\
\x00\x00\x01\x99}\xe7\xed:\
\x00\x00\x01|\xbeG,\x8e\
\x00\x00\x00\x10\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x99}\xe7\xed:\
'

\x00\x00\x01|\xbeG,\x8e\
"

def qInitResources():
QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)


def qCleanupResources():
QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)


qInitResources()
8 changes: 4 additions & 4 deletions voicerecorder/mainwindow.ui → ui/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<string>MainWindow</string>
</property>
<property name="windowIcon">
<iconset resource="mainwindow.qrc">
<iconset resource="../voicerecorder.qrc">
<normaloff>:/icons/mic</normaloff>:/icons/mic</iconset>
</property>
<widget class="QWidget" name="centralwidget">
Expand Down Expand Up @@ -64,7 +64,7 @@
<string>Record</string>
</property>
<property name="icon">
<iconset resource="mainwindow.qrc">
<iconset resource="../voicerecorder.qrc">
<normaloff>:/icons/record</normaloff>:/icons/record</iconset>
</property>
<property name="iconSize">
Expand All @@ -87,7 +87,7 @@
<string>Pause</string>
</property>
<property name="icon">
<iconset resource="mainwindow.qrc">
<iconset resource="../voicerecorder.qrc">
<normaloff>:/icons/pause</normaloff>:/icons/pause</iconset>
</property>
<property name="checkable">
Expand Down Expand Up @@ -147,7 +147,7 @@
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources>
<include location="mainwindow.qrc"/>
<include location="../voicerecorder.qrc"/>
</resources>
<connections>
<connection>
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions voicerecorder.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=VoiceRecorder
Comment=VoiceRecorder is a simple voice/audio recording application
Exec=voicerecorder
Icon=voicerecorder
Categories=Audio;Utility;
Terminal=false
File renamed without changes.