Skip to content

Commit

Permalink
Finish rpm builder
Browse files Browse the repository at this point in the history
  • Loading branch information
justin025 committed Dec 1, 2024
1 parent 632788d commit eec89cd
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 10 deletions.
28 changes: 27 additions & 1 deletion .github/workflows/release-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ jobs:
asset_name: OnTheSpot-arm64.dmg
asset_content_type: application/x-apple-diskimage


linux-x86_64-build:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -161,3 +160,30 @@ jobs:
asset_path: dist/OnTheSpot-x86_64.AppImage
asset_name: OnTheSpot-x86_64.AppImage
asset_content_type: application/octet-stream

rpm-x86_64-build:
runs-on: fedora-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Run rpm Build Script
run: scripts/build_rpm.sh
shell: bash

- name: Upload AppImage Executable
uses: actions/upload-artifact@v4
with:
name: OnTheSpot.rpm
path: dist/OnTheSpot.rpm

- name: Upload to Release (AppImage)
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/OnTheSpot.rpm
asset_name: OnTheSpot-x86_64.rpm
asset_content_type: application/octet-stream
27 changes: 19 additions & 8 deletions distros/fedora/onthespot.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,34 @@ Name: onthespot
Version: 1.0.3
Release: 1%{?dist}
Summary: A music downloader
License: MIT
License: GPL-2.0
Source0: onthespot-1.0.3-py3-none-any.whl
Source1: org.onthespot.OnTheSpot.desktop
BuildArch: noarch

%description
A music downloader.
BuildRequires: python3-devel
BuildRequires: python3-pip

Requires: python3-flask
Requires: python3-mutagen
Requires: python3-pillow
Requires: python3-pyperclip
Requires: python3-pyqt6
Requires: python3-requests
Requires: python3-urllib3
Requires: yt-dlp

%prep
# No preparation needed for a Wheel package
Provides: python3.13dist(librespot) = 0.0.9
Provides: python3.13dist(music-tag) = 0.4.3

%build
# No build step needed for a Wheel package
%description
A music downloader.

%install
mkdir -p %{buildroot}/usr/lib/python3/site-packages
pip3 install --root %{buildroot} --no-deps --ignore-installed %{SOURCE0}
python3 -m pip install --root %{buildroot} --no-deps --ignore-installed %{SOURCE0}
# Only here because I'm to lazy to write another spec and plan on dropping music-tag
python3 -m pip install librespot music-tag

# Ensure that the executables are installed
mkdir -p %{buildroot}/usr/bin
Expand Down
1 change: 1 addition & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Customize **OnTheSpot** to fit your preferences by adjusting the settings in the
| **Raw Media Download** | Downloads an unmodified file from whatever service is selected. With this enabled file conversion and the embedding of any metadata is skipped. |
| **Download Delay** | Time (in seconds) to wait before initiating the next download. Helps prevent Spotify's rate limits. |
| **Download Chunk Size** | The chunk size in which to download files. |
| **Maximum Download Workers** | Set the maximum number of download workers. Only change this setting if you know what you're doing. |
| **Translate File Path** | Translate file paths into the application language. |
| **Metadata Separator** | Set the separator for metadata fields with multiple values (default: `; `). |
| **Overwrite Existing Collection** | If a file already exists re-embed metadata in your selected format. |
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cp dist/onthespot-*-py3-none-any.whl ~/rpmbuild/SOURCES/
cp src/onthespot/resources/org.onthespot.OnTheSpot.desktop ~/rpmbuild/SOURCES/
cp distros/fedora/onthespot.spec ~/rpmbuild/SPECS/
rpmbuild -ba ~/rpmbuild/SPECS/onthespot.spec
cp ~/rpmbuild/RPMS/noarch/onthespot-*.noarch.rpm dist/
cp ~/rpmbuild/RPMS/noarch/onthespot-*.noarch.rpm dist/OnTheSpot.rpm


echo " => Done! Packaged rpm is available in 'dist/OnTheSpot.rpm'."

0 comments on commit eec89cd

Please sign in to comment.