| |
@@ -1,24 +1,22 @@
|
| |
%undefine __cmake_in_source_build
|
| |
|
| |
- %global buildno 20
|
| |
+ %global buildno 21
|
| |
%global buildid build%{buildno}
|
| |
- # The game contains a copy of these fonts, we replaces these with symlinks to the system versions of these fonts
|
| |
- %global fonts font(amiri) font(dejavusans) font(dejavusansmono) font(dejavuserif) font(widelands) font(lklug) font(wenquanyimicrohei)
|
| |
+ # The game contains a copy of these fonts, we replace these with symlinks to the system versions of these fonts
|
| |
+ %global fonts font(amiri) font(dejavusans) font(dejavusansmono) font(dejavuserif) font(widelands) font(gargi) font(wenquanyimicrohei) font(frankruehlclm)
|
| |
|
| |
Name: widelands
|
| |
Version: 0
|
| |
- Release: 0.80.%{buildid}%{?dist}
|
| |
+ Release: 0.82.%{buildid}%{?dist}
|
| |
Summary: Open source realtime-strategy game
|
| |
|
| |
License: GPLv2+
|
| |
URL: http://www.widelands.org
|
| |
- Source0: https://launchpad.net/widelands/%{buildid}/%{buildid}/+download/widelands-%{buildid}.tar.bz2
|
| |
- Source1: %{name}.desktop
|
| |
- Source2: %{name}.appdata.xml
|
| |
+ Source0: https://github.com/widelands/widelands/archive/%{buildid}/%{name}-%{buildid}.tar.gz
|
| |
+ # gnu++11 fix in CMakeLists.txt for PPC64 little-endian
|
| |
Patch0: widelands-build19-ppc64le.patch
|
| |
- Patch1: widelands-build20-gcc91.patch
|
| |
- Patch2: widelands-build20-gcc10.patch
|
| |
- Patch3: widelands-build20-boost173.patch
|
| |
+ # Fix failures on s390x due to uninitialized variables
|
| |
+ Patch1: widelands-build20-gcc10.patch
|
| |
|
| |
BuildRequires: SDL2-devel
|
| |
BuildRequires: SDL2_image-devel
|
| |
@@ -27,7 +25,8 @@
|
| |
BuildRequires: boost-devel >= 1.48.0
|
| |
BuildRequires: cmake
|
| |
BuildRequires: ctags
|
| |
- BuildRequires: desktop-file-utils libappstream-glib
|
| |
+ BuildRequires: desktop-file-utils
|
| |
+ BuildRequires: libappstream-glib
|
| |
BuildRequires: gettext
|
| |
BuildRequires: gcc
|
| |
BuildRequires: gcc-c++
|
| |
@@ -35,7 +34,8 @@
|
| |
BuildRequires: libpng-devel
|
| |
# For the %%build part generating the symlinks
|
| |
BuildRequires: fontconfig %{fonts}
|
| |
- Requires: hicolor-icon-theme %{fonts}
|
| |
+ Requires: hicolor-icon-theme
|
| |
+ Requires: %{fonts}
|
| |
|
| |
%description
|
| |
Widelands is an open source (GPLed), realtime-strategy game, using SDL and
|
| |
@@ -45,8 +45,10 @@
|
| |
|
| |
|
| |
%prep
|
| |
- %autosetup -p1 -n widelands-%{buildid}
|
| |
+ %setup -q -n widelands-%{buildid}
|
| |
|
| |
+ %patch0 -p1
|
| |
+ %patch1 -p1
|
| |
|
| |
%build
|
| |
LDFLAGS=-lGL
|
| |
@@ -63,17 +65,11 @@
|
| |
%install
|
| |
%cmake_install
|
| |
|
| |
- for i in 16 32 48 64 128; do
|
| |
- mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}x${i}/apps
|
| |
- ln -s /usr/share/%{name}/images/logos/wl-ico-${i}.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
|
| |
- done
|
| |
+ # Validate desktop file (provided by upstream)
|
| |
+ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
|
| |
|
| |
- mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
|
| |
- desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE1}
|
| |
- mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
|
| |
- install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/appdata
|
| |
- appstream-util validate-relax --nonet \
|
| |
- $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
|
| |
+ # Validate appdata (provided by upstream)
|
| |
+ appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_metainfodir}/*.appdata.xml
|
| |
|
| |
pushd $RPM_BUILD_ROOT
|
| |
# Replace fonts with system fonts. We used to have symlinks directly from
|
| |
@@ -130,22 +126,41 @@
|
| |
ln -s $(fc-match -f "%{file}" "monospace:bold:italic") \
|
| |
usr/share/%{name}/i18n/fonts/dejavu-fonts/DejaVuSansMono-BoldOblique.ttf
|
| |
|
| |
+ # Hebrew fonts
|
| |
+ rm -r usr/share/%{name}/i18n/fonts/Culmus
|
| |
+ mkdir usr/share/%{name}/i18n/fonts/culmus-fonts
|
| |
+ ln -s culmus-fonts usr/share/%{name}/i18n/fonts/Culmus
|
| |
+ ln -s $(fc-match -f "%{file}" "frankruehlclm:bold") \
|
| |
+ usr/share/%{name}/i18n/fonts/culmus-fonts/TaameyFrankCLM-Bold.ttf
|
| |
+ ln -s $(fc-match -f "%{file}" "frankruehlclm:bold:italic") \
|
| |
+ usr/share/%{name}/i18n/fonts/culmus-fonts/TaameyFrankCLM-BoldOblique.ttf
|
| |
+ ln -s $(fc-match -f "%{file}" "frankruehlclm:medium") \
|
| |
+ usr/share/%{name}/i18n/fonts/culmus-fonts/TaameyFrankCLM-Medium.ttf
|
| |
+ ln -s $(fc-match -f "%{file}" "frankruehlclm:medium:italic") \
|
| |
+ usr/share/%{name}/i18n/fonts/culmus-fonts/TaameyFrankCLM-MediumOblique.ttf
|
| |
+
|
| |
+ # Chinese fonts
|
| |
rm -r usr/share/%{name}/i18n/fonts/MicroHei
|
| |
mkdir usr/share/%{name}/i18n/fonts/wqy-microhei-fonts
|
| |
ln -s wqy-microhei-fonts usr/share/%{name}/i18n/fonts/MicroHei
|
| |
ln -s $(fc-match -f "%{file}" "wenquanyimicrohei") \
|
| |
usr/share/%{name}/i18n/fonts/wqy-microhei-fonts/wqy-microhei.ttc
|
| |
|
| |
- rm -r usr/share/%{name}/i18n/fonts/Sinhala
|
| |
- mkdir usr/share/%{name}/i18n/fonts/lklug-fonts
|
| |
- ln -s lklug-fonts usr/share/%{name}/i18n/fonts/Sinhala
|
| |
- ln -s $(fc-match -f "%{file}" "lklug") \
|
| |
- usr/share/%{name}/i18n/fonts/lklug-fonts/lklug.ttf
|
| |
+ # Devanagari (Hindu) fonts
|
| |
+ # Fedora doesn't ship Nakula, but other Devanagari font sets.
|
| |
+ # Gargi is a TTF font set and should be compatible.
|
| |
+ rm -r usr/share/%{name}/i18n/fonts/Nakula
|
| |
+ mkdir usr/share/%{name}/i18n/fonts/gargi-fonts
|
| |
+ ln -s gargi-fonts usr/share/%{name}/i18n/fonts/Nakula
|
| |
+ ln -s $(fc-match -f "%{file}" "gargi") \
|
| |
+ usr/share/%{name}/i18n/fonts/gargi-fonts/nakula.ttf
|
| |
|
| |
+ # In-game Latin fonts - shipped as a separate package
|
| |
rm -r usr/share/%{name}/i18n/fonts/Widelands/*
|
| |
ln -s $(fc-match -f "%{file}" "widelands") \
|
| |
usr/share/%{name}/i18n/fonts/Widelands/Widelands.ttf
|
| |
|
| |
+
|
| |
# Scripting magic to add proper %%lang() markings to the locale files
|
| |
find usr/share/widelands/locale/ -maxdepth 1 -type d -name \*_\* | sed -n 's#\(usr/share/widelands/locale/\(.*\)_.*\)#%lang(\2) /\1#p' > %{_builddir}/widelands-%{buildid}/%{name}.files
|
| |
find usr/share/widelands/locale/ -maxdepth 1 -type d ! -name "*_*" | sed -n -e 's#\(usr/share/widelands/locale/\(.\+\)\)#%lang(\2) /\1#p' >> %{_builddir}/widelands-%{buildid}/%{name}.files
|
| |
@@ -156,23 +171,31 @@
|
| |
%files -f %{name}.files
|
| |
%doc ChangeLog CREDITS
|
| |
%license COPYING
|
| |
+ %{_mandir}/man6/widelands.6.gz
|
| |
%{_bindir}/%{name}
|
| |
- %{_datadir}/icons/hicolor/16x16/apps/%{name}.png
|
| |
- %{_datadir}/icons/hicolor/32x32/apps/%{name}.png
|
| |
- %{_datadir}/icons/hicolor/48x48/apps/%{name}.png
|
| |
- %{_datadir}/icons/hicolor/64x64/apps/%{name}.png
|
| |
- %{_datadir}/icons/hicolor/128x128/apps/%{name}.png
|
| |
- %{_datadir}/appdata/%{name}.appdata.xml
|
| |
- %{_datadir}/applications/%{name}.desktop
|
| |
+ %{_datadir}/icons/hicolor/*/apps/*.png
|
| |
+ %{_metainfodir}/*.appdata.xml
|
| |
+ %{_datadir}/applications/*.desktop
|
| |
%dir %{_datadir}/%{name}
|
| |
%dir %{_datadir}/%{name}/locale
|
| |
|
| |
|
| |
%changelog
|
| |
+ * Fri Nov 27 2020 Andy Mender <andymenderunix@fedoraproject.org> - 0-0.82.build21
|
| |
+ - Unbundle Culmus fonts
|
| |
+
|
| |
+ * Thu Nov 26 2020 Andy Mender <andymenderunix@fedoraproject.org> - 0-0.81.build21
|
| |
+ - Update to build21
|
| |
+ - Clean up patches
|
| |
+ - Point Source0 to GitHub release tarballs
|
| |
+ - Fix new issues with fonts
|
| |
+ - Use appdata and desktop file provided by upstream
|
| |
+ - Update records in %%files section
|
| |
+
|
| |
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.80.build20
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
| |
|
| |
- * Wed Jun 03 2020 Jonathan Wakely <jwakely@redhat.com> - 0-0.79.
|
| |
+ * Wed Jun 03 2020 Jonathan Wakely <jwakely@redhat.com> - 0-0.79.build20
|
| |
- Rebuilt for Boost 1.73
|
| |
|
| |
* Sat May 16 2020 Pete Walter <pwalter@fedoraproject.org> - 0-0.78.build20
|
| |
Signed-off-by: Andy Mender andymenderunix@gmail.com
This PR updates Widelands to build21 (latest stable from upstream) and fixes related issues:
- Changes the Source0 field to point to GitHub release tarballs, since I think this is the primary upstream source
- Removed the Source1 and Source2 files, since upstream now provides appdata XML and a desktop file
- Removed icon related tweaks (upstream now also correctly ships icons)
- Fixed font related issues (Sinhala is no longer used upstream, Nakula was added and replaced with Gargi from our repos)
- Records in %%files were updated
I still need to unbundle Culmus fonts as I forgot about it before.