Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPM Package #1403

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions RPM_check_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
sed -i -r "s/Version:\s*(\d*.)*/Version: $1/g" RPM_package.spec
53 changes: 53 additions & 0 deletions RPM_package.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Name: xemu
Version: 0.7.84
Release: 1%{?dist}
Summary: xemu: Original Xbox Emulator (RPM)

License: LGPL-2.1, GPL.2.0
URL: https://github.com/xemu-project/xemu
Source0: https://github.com/xemu-project/xemu/releases/latest/download/src.tar.gz

BuildRequires: libdrm-devel
BuildRequires: libslirp-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: gtk3-devel
BuildRequires: libpcap-devel
BuildRequires: libsamplerate-devel
BuildRequires: libaio-devel
BuildRequires: SDL2-devel
BuildRequires: libepoxy-devel
BuildRequires: pixman-devel
BuildRequires: gcc-c++
BuildRequires: ninja-build
BuildRequires: openssl-devel
BuildRequires: python3-pyyaml

#To update
Requires: libdrm-devel libslirp-devel mesa-libGLU-devel gtk3-devel libpcap-devel libsamplerate-devel libaio-devel SDL2-devel libepoxy-devel pixman-devel gcc-c++ ninja-build openssl-devel python3-pyyaml
#To update
%description
Xemu original xbox emulator package release for RPM based distributions.

%prep
rm -fr src
wget https://github.com/xemu-project/xemu/releases/lastes/download/src.tar.gz -O $HOME/rpmbuild/SOURCES/src.tar.gz
tar -xzf %{SOURCE0}

%build
./build.sh

%files
%license LICENSE
#TODO: Apply icon.png to executable, possibly using a .desktop file.
/icon.png
/xemu

%install
mkdir -p $HOME/.local/bin
cp ./ui/icons/xemu_128x128.png $RPM_BUILD_ROOT/icon.png
cp ./dist/xemu $RPM_BUILD_ROOT/xemu
install -m755 $RPM_BUILD_ROOT/xemu $HOME/.local/bin/xemu

%changelog
* Wed Mar 01 2023 f
-
24 changes: 24 additions & 0 deletions RPM_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Xemu RPM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this done separately instead of being part of the packaging steps in the main CI pipeline? This is also in the wrong directory in any case, so it won't run.

on:
push:
tags:
- v*

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: bash RPM_check_version.sh

- name: xemu RPM package
id: rpm
uses: xemu-project/xemu
with:
spec_file: "RPM_package.spec"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work? I don't think the xemu-project/xemu action exists


- name: Upload artifact
uses: actions/[email protected]
with:
name: Xemu RPM
path: ${{ steps.rpm.outputs.rpm_dir_path }}