%global beta rc1 %global ver 099%{beta} Name: dbgl Version: 0.99 Release: 0.%{beta}%{?dist} Summary: DOSBox Game Launcher License: GPLv2+ URL: https://dbgl.org BuildArch: noarch Source0: https://dbgl.org/beta/src%{ver}.zip Source1: org.dbgl.DBGL.desktop Source2: org.dbgl.DBGL.metainfo.xml BuildRequires: java-devel >= 1:17.0 BuildRequires: ant BuildRequires: desktop-file-utils BuildRequires: unzip Requires: hicolor-icon-theme Requires: java >= 1:17.0 Requires: javapackages-tools %description DBGL is a frontend or launcher for DOS games using DOSBox, or a DOSBox derivative. %prep unzip %{SOURCE0} %build ant distlinux rm -rf build.xml libtest src build_ant %install rm -rf %{name}-%{version} mkdir %{name}-%{version} tar -xf dist/dbgl%{ver}.tar.gz -C %{name}-%{version} rm -rf dist # setup package directory mkdir -p %{buildroot}/%{_javadir}/%{name} cp -a %{name}-%{version}/* %{buildroot}/%{_javadir}/%{name} # setup symlink to launcher script mkdir -p %{buildroot}/%{_bindir} #ln -s %{_javadir}/%{name}/%{name} %{buildroot}/%{_bindir} %jpackage_script org.dbgl.gui.Launcher "-Djava.library.path=lib" "-Ddbgl.data.userhome=true" "dbgl" %{name} true # setup desktop icon mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/256x256/apps cp -a %{name}-%{version}/dbgl.png %{buildroot}/%{_datadir}/icons/hicolor/256x256/apps/org.dbgl.DBGL.png # setup desktop launcher mkdir -p %{buildroot}/%{_datadir}/applications cp -a %{SOURCE1} %{buildroot}/%{_datadir}/applications/org.dbgl.DBGL.desktop desktop-file-validate %{buildroot}/%{_datadir}/applications/org.dbgl.DBGL.desktop # setup metainfo mkdir -p %{buildroot}/%{_metainfodir} cp -a %{SOURCE2} %{buildroot}%{_metainfodir} #appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml %clean rm -rf %{name}-%{version} rm -rf %{buildroot} %files %{_bindir}/%{name} %{_javadir}/%{name} %{_datadir}/applications/org.dbgl.DBGL.desktop %{_datadir}/icons/hicolor/256x256/apps/org.dbgl.DBGL.png %{_metainfodir}/org.dbgl.DBGL.metainfo.xml %changelog * Tue Oct 29 2024 Robert de Rooy - 0.99-0.rc1 - Bump release