From a6bc30a31c532ef5756352188151723d1188f17b Mon Sep 17 00:00:00 2001 From: alpemwarrior Date: Fri, 14 May 2021 02:02:28 +0000 Subject: [PATCH] Add 64-bit .rpm package build to CI for Fedora. --- .gitlab-ci.yml | 27 +++++++++++++++++++ fedora/OpenRGB.spec | 66 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 fedora/OpenRGB.spec diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e7b4867c..08db20cd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -108,6 +108,33 @@ before_script: - openrgb-dbgsym*.deb expire_in: 30 days +#-----------------------------------------------------------------------# +# Linux (.rpm) 64-bit Build Target # +#-----------------------------------------------------------------------# +"Linux 64 rpm": + image: fedora:34 + stage: build + script: + - dnf install rpmdevtools dnf-plugins-core -y + - rpmdev-setuptree + - ls /root/ + - cp fedora/OpenRGB.spec /root/rpmbuild/SPECS + - cp ../OpenRGB /root/rpmbuild/SOURCES/ -r + - cd /root/rpmbuild/SOURCES + - tar -cf OpenRGB.tar.gz OpenRGB/ + - cd .. + - dnf builddep SPECS/OpenRGB.spec -y + - rpmbuild -ba SPECS/OpenRGB.spec + - cd RPMS/x86_64/ + - mv openrgb*.rpm ${CI_PROJECT_DIR}/ + - cd ${CI_PROJECT_DIR} + + artifacts: + name: "${CI_PROJECT_NAME}_Linux_64_rpm_${CI_COMMIT_SHORT_SHA}" + paths: + - openrgb*.rpm + expire_in: 30 days + #-----------------------------------------------------------------------# # Windows (32-bit) Build Target # #-----------------------------------------------------------------------# diff --git a/fedora/OpenRGB.spec b/fedora/OpenRGB.spec new file mode 100644 index 00000000..d5190e7a --- /dev/null +++ b/fedora/OpenRGB.spec @@ -0,0 +1,66 @@ +%global _name OpenRGB + +Name: openrgb +Version: 0.5 +Release: 1%{?dist} +Summary: Open source RGB lighting control that doesn't depend on manufacturer software + +License: GPLv2 +URL: https://gitlab.com/CalcProgrammer1/%{_name} +Source0: OpenRGB.tar.gz + +BuildRequires: gcc-c++ libusb-devel libstdc++-devel qt5-qtbase-devel desktop-file-utils hidapi-devel +Requires: hicolor-icon-theme + +%description +Open source RGB lighting control that doesn't depend on manufacturer software. Supports Windows and Linux. + +ASUS, ASRock, Corsair, G.Skill, Gigabyte, HyperX, MSI, Razer, ThermalTake, and more supported + +%prep +cp %{_sourcedir}/%{_name}/* %{_builddir} -r + +%build +cd %{_builddir} +%qmake_qt5 PREFIX=%{_prefix} +%make_build + +%install +%make_install INSTALL_ROOT=%{buildroot} + +#icon +install -Dpm 644 qt/%{_name}.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{_name}.png + +#desktop +desktop-file-install %{_sourcedir}/%{_name}/qt/%{_name}.desktop + +%post -n %{name} +if [ -S /run/udev/control ]; then + udevadm control --reload + udevadm trigger +fi + +%files +%{_bindir}/%{name} +%{_datadir}/icons/hicolor/128x128/apps/%{_name}.png +%{_datadir}/applications/%{_name}.desktop +%{_datadir}/pixmaps/%{_name}.png +/lib/udev/rules.d/60-%{name}.rules +%license LICENSE +%doc README.md + +%changelog +* Mon May 03 2021 Pol Rius - 0.5-0 +- Modified to build in Gitlab's CI + +* Mon Dec 07 2020 Artem S. Tashkinov - 0.5-0 +- Updated to 0.5 + +* Mon Sep 28 2020 Artem S. Tashkinov - 0.4-0 +- Updated to 0.4 + +* Sat May 16 2020 Carlos Mogas da Silva - 0.2-2 +- Applied review changes in https://bugzilla.redhat.com/show_bug.cgi?id=1835958#c1 + +* Thu May 14 2020 Carlos Mogas da Silva - 0.2-1 +- Initial import