%global debug_package %{nil} # The tarball contains odd named directory; use variables to make %prep work %global dir_name oscar-sql Name: oscar20 Version: 2.0.1 Release: 1%{?dist} Summary: Open Source CPAP Analysis Reporter License: GPLv3 URL: https://sleepfiles.com/OSCAR # The source of this package was pulled from upstreams's vcs. # Use the following command to generate the tar ball: # git clone https://gitlab.com/CrimsonNape/oscar-sql.git # tar cvjf oscar-sql-v%{version}.tar.bz2 oscar-sql/ Source0: oscar-sql-v%{version}.tar.bz2 # Upstream provides none of the following files Source1: org.oscar-team.OSCAR20.desktop Source2: OSCAR20.1 BuildRequires: qt6-qtserialport-devel BuildRequires: qt6-qttools-devel BuildRequires: qt6-linguist BuildRequires: zlib-devel BuildRequires: mesa-libGL-devel BuildRequires: mesa-libGLU-devel BuildRequires: libX11-devel BuildRequires: glibc-devel BuildRequires: libstdc++-devel BuildRequires: libappstream-glib BuildRequires: desktop-file-utils Requires: qt6-qtserialport Requires: qt6-qttools-libs-help %description OpenSource CPAP Analysis Reporter - OSCAR OSCAR is a derivative of SleepyHead version 1.1.0,created when that was abandoned by Mark Watkins. SleepyHead was a cross platform, opensource sleep tracking program for reviewing CPAP and Oximetry data, which are devices used in the treatment of Sleep Disorders like Obstructive Sleep Apnea. It was released under the GPL version 3 license. See the file COPYING for those details. SleepyHead was written by Mark Watkins (aka Jedimark), an Australian software developer afflicted with sleep apnea. %prep %setup -q -n %{dir_name}-v%{version} %build mkdir build cd build %if 0%{?rhel} && 0%{?rhel} >= 9 qmake6 QMAKE_CXXFLAGS+=-Wno-error=unused-parameter QMAKE_CFLAGS+=-Wno-error=strict-aliasing ../OSCAR_QT.pro %endif %if 0%{?fedora} qmake6 QMAKE_CXXFLAGS+=-Wno-deprecated-declarations QMAKE_CXXFLAGS+=-Wno-error=stringop-overread QMAKE_CXXFLAGS+=-Wno-misleading-indentation ../OSCAR_QT.pro %endif make %{?_smp_mflags} %install install -Dm 0755 build/oscar/OSCAR20 $RPM_BUILD_ROOT%{_bindir}/OSCAR20 desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} install -Dpm 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/OSCAR20.1 # install icons num=( 1 2 3 4 ) name=( sm md lm lg ) pxl=( 24 64 96 256 ) for (( i=0; i<${#num[@]}; i++ )); do install -Dpm 0644 \ oscar/icons/logo-${name[$i]}.png \ %{buildroot}%{_datadir}/icons/hicolor/${pxl[$i]}x${pxl[$i]}/apps/OSCAR20.png done install -Dpm 0644 Building/Linux/OSCAR20.png \ %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/OSCAR20.png install -Dpm 0644 Building/Linux/OSCAR20.svg \ %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/OSCAR20.svg install -d %{buildroot}%{_datadir}/OSCAR20/Translations install -pm 0644 -t \ %{buildroot}%{_datadir}/OSCAR20/Translations/ oscar/translations/*.qm install -d %{buildroot}%{_datadir}/OSCAR20/Html install -pm 0644 -t \ %{buildroot}%{_datadir}/OSCAR20/Html/ build/oscar/Html/* install -d %{buildroot}%{_datadir}/OSCAR20/Help install -pm 0644 -t \ %{buildroot}%{_datadir}/OSCAR20/Help/ oscar/help/index.qhcp install -d %{buildroot}%{_datadir}/OSCAR20/Help/help_en install -pm 0644 -t \ %{buildroot}%{_datadir}/OSCAR20/Help/ oscar/help/help_en/* install -d %{buildroot}%{_datadir}/OSCAR20/Help/help_nl install -pm 0644 -t \ %{buildroot}%{_datadir}/OSCAR20/Help/ oscar/help/help_nl/* install -d %{buildroot}%{_datadir}/OSCAR20/Help/images install -pm 0644 -t \ %{buildroot}%{_datadir}/OSCAR20/Help/ oscar/help/images/* %post touch --no-create %{_datadir}/icons/hicolor >&/dev/null || : %postun if [ $1 -eq 0 ]; then touch --no-create %{_datadir}/icons/hicolor >&/dev/null || : gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : fi %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %license COPYING %doc README %{_bindir}/OSCAR20 %{_datadir}/applications/org.oscar-team.OSCAR20.desktop %{_datadir}/icons/hicolor/*/apps/OSCAR20.png %{_datadir}/icons/hicolor/scalable/apps/OSCAR20.svg %{_datadir}/OSCAR20/ %{_mandir}/man1/OSCAR20.1* %changelog * Tue Jun 30 2026 Johan Heikkila - 2.0.1-1 - Initial package of OSCAR 2.x - Package renamed to oscar20 to allow parallel installation with oscar 1.x - Update to upstream SQL backend release 2.0.1