diff --git a/.gitignore b/.gitignore index bc059e5..f967ea1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,3 @@ /darkplaces-0.8.1.tar.xz /d0_blind_id-0.8.2.tar.xz /darkplaces-0.8.2.tar.xz -/darkplaces-0.8.5.tar.xz -/darkplaces-0.8.6.tar.xz diff --git a/darkplaces-crypto.patch b/darkplaces-crypto.patch new file mode 100644 index 0000000..4b55816 --- /dev/null +++ b/darkplaces-crypto.patch @@ -0,0 +1,23 @@ +diff -uNr darkplaces.orig/crypto.c darkplaces/crypto.c +--- darkplaces.orig/crypto.c 2015-01-13 19:56:14.000000000 +0300 ++++ darkplaces/crypto.c 2015-01-17 21:41:25.746541231 +0300 +@@ -103,7 +103,7 @@ + + #ifdef LINK_TO_CRYPTO + +-#include ++#include "d0_blind_id/d0_blind_id.h" + + #define d0_blind_id_dll 1 + #define Crypto_OpenLibrary() true +diff -uNr darkplaces.orig/crypto-keygen-standalone.c darkplaces/crypto-keygen-standalone.c +--- darkplaces.orig/crypto-keygen-standalone.c 2015-01-13 19:56:14.000000000 +0300 ++++ darkplaces/crypto-keygen-standalone.c 2015-01-17 21:42:21.623844788 +0300 +@@ -1,6 +1,6 @@ + #define _GNU_SOURCE + +-#include ++#include "d0_blind_id/d0_blind_id.h" + + #include + #include diff --git a/sources b/sources index ad0ac6c..d08e3f7 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (darkplaces-0.8.6.tar.xz) = 4aaaa70891c499f25d4fddeaa9923fef1408f670fc34a0595a38d7eaae03e47fbcd3da8e7c2b035fcc8c1dd417e0369778b596fd8745198fe6f33feea1b6b64c +SHA512 (d0_blind_id-0.8.2.tar.xz) = ec167e1cde8eb888fe39fb2154de263c655e46e3e67efec9b4c224b0c413468610432867a7061385ad5e0ae3ecb3de7e0435642915c683d1164913b40a704095 +SHA512 (darkplaces-0.8.2.tar.xz) = d94c98f05785d5c568e4890aa1030d23d35ed92c03067388bdaac5ff0febe12deae54c4e1b700bcbe84873a532053df8ccbdc8bad1d070c7091dae565d705682 diff --git a/xonotic-gcc11.patch b/xonotic-gcc11.patch deleted file mode 100644 index 04f5509..0000000 --- a/xonotic-gcc11.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/dpsoftrast.c b/dpsoftrast.c -index 7f13246..35bf59d 100644 ---- a/darkplaces/dpsoftrast.c -+++ b/darkplaces/dpsoftrast.c -@@ -198,6 +198,14 @@ DPSOFTRAST_State_Triangle); - - #define DPSOFTRAST_DRAW_MAXSUBSPAN 16 - -+/* This structure is 16 byte aligned. We need its size suitably aligned as -+ well since we build arrays of this object. The easiest way to do that it -+ force alignment on a key field. That way we don't have to introduce -+ manual padding and compute the right amount. -+ -+ An even better solution would be to move the pointer to be the first -+ field, then ensure suitable alignment on startx. But I don't know -+ the code well enough to know if that's safe. */ - typedef ALIGN(struct DPSOFTRAST_State_Span_s - { - int triangle; // triangle this span was generated by -@@ -205,7 +213,7 @@ typedef ALIGN(struct DPSOFTRAST_State_Span_s - int y; // framebuffer y coord - int startx; // usable range (according to pixelmask) - int endx; // usable range (according to pixelmask) -- unsigned char *pixelmask; // true for pixels that passed depth test, false for others -+ __attribute__ ((aligned (16))) unsigned char *pixelmask; // true for pixels that passed depth test, false for others - int depthbase; // depthbuffer value at x (add depthslope*startx to get first pixel's depthbuffer value) - int depthslope; // depthbuffer value pixel delta - } diff --git a/xonotic.spec b/xonotic.spec index e8b3e03..daa7b2d 100644 --- a/xonotic.spec +++ b/xonotic.spec @@ -1,35 +1,36 @@ %global _hardened_build 1 -%global dpver 20230620 +%global dpver 20170401 %global dqmirror1 http://distcache.freebsd.org/ports-distfiles/quake-data/quakesw-1.0.6.tar.gz %global dqmirror2 https://www.libsdl.org/projects/quake/data/quakesw-1.0.6.tar.gz Summary: Multiplayer, deathmatch oriented first person shooter Name: xonotic -Version: 0.8.6 -Release: 7%{?dist} -License: GPL-2.0-or-later and LGPL-2.0-or-later +Version: 0.8.2 +Release: 4%{?dist} +License: GPLv2+ and LGPLv2+ and BSD +Group: Amusements/Games URL: http://www.xonotic.org/ # Custom tarball: # wget http://dl.xonotic.org/xonotic-%{version}.zip # unzip xonotic-%{version}.zip # cd Xonotic/source/ # cp ../misc/logos/icons_png/xonotic_256.png darkplaces/ -# tar -cJf darkplaces-%{version}.tar.xz darkplaces/ +# tar -cf darkplaces-%{version}.tar.xz darkplaces/ +# tar -cf d0_blind_id-%{version}.tar.xz d0_blind_id/ Source0: darkplaces-%{version}.tar.xz Source1: %{name}.desktop +Source2: d0_blind_id-%{version}.tar.xz Source10: darkplaces-quake.sh Source11: darkplaces-quake.autodlrc Source12: darkplaces-quake.desktop -Patch0: %{name}-gcc11.patch -BuildRequires: make -BuildRequires: gcc +Patch0: darkplaces-crypto.patch BuildRequires: alsa-lib-devel BuildRequires: desktop-file-utils BuildRequires: file BuildRequires: libX11-devel BuildRequires: mesa-libGL-devel -%if 0%{?rhel} && 0%{?rhel} <= 7 +%if 0%{?rhel} BuildRequires: libjpeg-devel %else BuildRequires: libjpeg-turbo-devel @@ -43,15 +44,20 @@ BuildRequires: zlib-devel Requires: xonotic-data = %{version} Requires: darkplaces = %{dpver}-%{release} Requires: opengl-games-utils +Obsoletes: nexuiz <= 2.5.2 +Provides: nexuiz = %{name}-%{version} %description Xonotic is a fast-paced, chaotic, and intense multiplayer first person shooter, focused on providing basic, old style deathmatches. %package server +Group: Amusements/Games Summary: Dedicated server for the Xonotic first person shooter Requires: xonotic-data = %{version} Requires: darkplaces-server = %{dpver}-%{release} +Obsoletes: nexuiz-server <= 2.5.2 +Provides: nexuiz-server = %{name}-%{version} %description server @@ -63,10 +69,10 @@ This is the Xonotic dedicated server required to host network games. %package -n darkplaces Summary: Modified Quake engine Version: %{dpver} +Group: Amusements/Games # This is necessary as these libraries are loaded during runtime # and therefore it isn't picked up by RPM during build Requires: zlib libvorbis libjpeg curl -Recommends: d0_blind_id %description -n darkplaces DarkPlaces is a modified Quake engine. @@ -74,6 +80,7 @@ DarkPlaces is a modified Quake engine. %package -n darkplaces-server Summary: Quake engine server Version: %{dpver} +Group: Amusements/Games # This is necessary as these libraries are loaded during runtime # and therefore it isn't picked up by RPM during build Requires: zlib curl @@ -84,6 +91,7 @@ DarkPlaces Quake engine server. %package -n darkplaces-quake Summary: Multiplayer, deathmatch oriented first person shooter Version: %{dpver} +Group: Amusements/Games Requires: autodownloader Requires: opengl-games-utils Requires: darkplaces = %{dpver}-%{release} @@ -97,6 +105,7 @@ and abominable Rocket and Grenade Launchers. %package -n darkplaces-quake-server Summary: Dedicated DarkPlaces Quake server Version: %{dpver} +Group: Amusements/Games Requires: darkplaces-server = %{dpver}-%{release} %description -n darkplaces-quake-server @@ -113,17 +122,25 @@ sed -i 's,MIRROR2,%{dqmirror2},g' $(basename %{SOURCE11}) sed -i 's/\r//' darkplaces.txt sed -i 's,/usr/X11R6/,/usr/,g' makefile makefile.inc sed -i 's/nexuiz/xonotic/g' makefile makefile.inc +cd .. +tar -C darkplaces/ -xvf %{SOURCE2} -%patch -P 0 -p2 +%patch0 -p0 %build + +#pushd d0_blind_id +#%%configure --disable-rijndael --without-openssl +#make +#popd + export DP_FS_BASEDIR=%{_datadir}/xonotic #export DP_CRYPTO_STATIC_LIBDIR="." #export DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR="." -make release OPTIM_RELEASE="$RPM_OPT_FLAGS -std=gnu17" STRIP=: -make cl-xonotic OPTIM_RELEASE="$RPM_OPT_FLAGS -std=gnu17" STRIP=: -make sdl-xonotic OPTIM_RELEASE="$RPM_OPT_FLAGS -std=gnu17" STRIP=: -make sv-xonotic OPTIM_RELEASE="$RPM_OPT_FLAGS -std=gnu17" STRIP=: +make release OPTIM_RELEASE="$RPM_OPT_FLAGS" STRIP=: +make cl-xonotic OPTIM_RELEASE="$RPM_OPT_FLAGS" STRIP=: +make sdl-xonotic OPTIM_RELEASE="$RPM_OPT_FLAGS" STRIP=: +make sv-xonotic OPTIM_RELEASE="$RPM_OPT_FLAGS" STRIP=: %install rm -rf %{buildroot} @@ -162,6 +179,8 @@ done install -Dpm 644 $(basename %{SOURCE11}) %{buildroot}%{_datadir}/darkplaces/quake.autodlrc +#install -Dpm 755 d0_blind_id/blind_id %{buildroot}%{_bindir}/blind_id + # Register as an application to be visible in the software center # # NOTE: It would be *awesome* if this file was maintained by the upstream @@ -233,6 +252,31 @@ SentUpstream: 2014-09-23 EOF +%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 || : + +%post -n darkplaces +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun -n darkplaces +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans -n darkplaces +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + %files %{_bindir}/xonotic-sdl-wrapper %{_bindir}/xonotic-glx @@ -270,81 +314,6 @@ EOF %changelog -* Fri Jul 25 2025 Fedora Release Engineering - 0.8.6-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Mon Feb 17 2025 Gwyn Ciesla - 0.8.6-6 -- Set PrefersNonDefaultGPU to false, BZ 2345949. - -* Sun Jan 19 2025 Fedora Release Engineering - 0.8.6-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Sat Jul 20 2024 Fedora Release Engineering - 0.8.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Sat Jan 27 2024 Fedora Release Engineering - 0.8.6-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 0.8.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 20 2023 Gwyn Ciesla - 0.8.6-1 -- 0.8.6 - -* Wed Mar 01 2023 Gwyn Ciesla - 0.8.5-4 -- migrated to SPDX license - -* Sat Jan 21 2023 Fedora Release Engineering - 0.8.5-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sun Jul 31 2022 Gwyn Ciesla - 0.8.5-2 -- Correct date. - -* Fri Jul 29 2022 Gwyn Ciesla - 0.8.5-1 -- 0.8.5 - -* Sat Jul 23 2022 Fedora Release Engineering - 0.8.2-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Feb 24 2022 Daniel Rusek - 0.8.2-17 -- Set PrefersNonDefaultGPU to true - -* Sat Jan 22 2022 Fedora Release Engineering - 0.8.2-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 0.8.2-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Thu Jan 28 2021 Fedora Release Engineering - 0.8.2-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Dec 30 2020 Igor Raits - 0.8.2-13 -- Implement support for generating & sending UUID - -* Tue Dec 08 2020 Jeff Law - 0.8.2-12 -- Fix alignment vs size diagnostic for gcc-11 - -* Wed Jul 29 2020 Fedora Release Engineering - 0.8.2-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Jan 31 2020 Fedora Release Engineering - 0.8.2-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Sat Jul 27 2019 Fedora Release Engineering - 0.8.2-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 03 2019 Fedora Release Engineering - 0.8.2-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 0.8.2-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Feb 09 2018 Fedora Release Engineering - 0.8.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Fri Jan 05 2018 Igor Gnatenko - 0.8.2-5 -- Remove obsolete scriptlets - * Thu Aug 03 2017 Fedora Release Engineering - 0.8.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild