7af89e7
Name:           hedgewars
35dc011
Version:        0.9.18
0e0da28
Release:        12%{?dist}
60204cc
Summary:        Funny turn-based artillery game, featuring fighting Hedgehogs!
7af89e7
Group:          Amusements/Games
7af89e7
License:        GPL+
7af89e7
URL:            http://www.hedgewars.org/
567254f
# Note -3 upstream respun the tarbal...
567254f
Source0:        http://download.gna.org/hedgewars/hedgewars-src-%{version}-3.tar.bz2
7af89e7
Source1:        %{name}.desktop
60204cc
Source2:        %{name}.appdata.xml
4ce1ddb
Patch0:         hedgewars-compiler-opts.patch
862ceed
# Text.Show.ByteString currently isn't available in Fedora and for the
862ceed
# the time being we need to use a patch to have hedgewars-server not
862ceed
# use that function.
862ceed
# The patch below is a trimmed version of the patch Debian is using
862ceed
# avoid the same issue. The original patch is available from:
862ceed
# https://launchpadlibrarian.net/85736468/hedgewars_0.9.17-1~maverick0.1.debdiff
862ceed
Patch1:         hedgewars-no-bytestring.patch
ce1555e
# Lua 5.2
ce1555e
Patch2:		hedgewars-0.9.18-lua-5.2.patch
52505db
# A ghc update is doing stricter checking that causes a fatal error.
52505db
# This won't be needed in 0.9.19.
52505db
# I am not sure if removing the extra definition is right, but if builds 
52505db
# now, so I can do some more testing. But given it was probably wrong before 
52505db
# and still worked, it has a reasonable chance of working.
52505db
Patch3:		hedgewars-0.9.18-instance.patch
bdc2135
# ghc does not support -dynamic on arm
bdc2135
Patch4:         hedgewars-0.9.18-no-dyn-haskell.patch
7af89e7
BuildRequires:  fpc qt4-devel SDL_mixer-devel SDL_net-devel SDL_image-devel
45ec882
BuildRequires:  SDL_ttf-devel openssl-devel cmake desktop-file-utils
ce1555e
BuildRequires:  libpng-devel lua-devel
4ce1ddb
Requires:       dejavu-sans-fonts wqy-zenhei-fonts hicolor-icon-theme
8f26b58
# https://bugzilla.redhat.com/show_bug.cgi?id=520400
ae7b469
# no fpc on s390(x)
5433e09
ExcludeArch: ppc64 s390 s390x
7af89e7
7af89e7
%description
7af89e7
Hedgewars is a turn based strategy game but the real buzz is from watching the
7af89e7
devastation caused by those pesky hedgehogs with those fantastic weapons.
7af89e7
7af89e7
Each player controls a team of several hedgehogs. During the course of the
7af89e7
game, players take turns with one of their hedgehogs. They then use whatever
7af89e7
tools and weapons are available to attack and kill the opponents' hedgehogs,
7af89e7
thereby winning the game. Hedgehogs may move around the terrain in a variety
7af89e7
of ways, normally by walking and jumping but also by using particular tools
7af89e7
such as the "Rope" or "Parachute", to move to otherwise inaccessible areas.
7af89e7
88288f9
%package -n hedgewars-server
88288f9
Summary:        Standalone server for hedgewars
88288f9
Group:          Amusements/Games
a206bce
Requires:       %{name} = %{version}
88288f9
BuildRequires:  ghc-stm-devel
88288f9
BuildRequires:  ghc-dataenc-devel
88288f9
BuildRequires:  ghc-network-devel
a09d1e5
BuildRequires:  ghc-utf8-string-devel
4ce1ddb
BuildRequires:  ghc-hslogger-devel
0b56cba
BuildRequires:  ghc-haskell2010-devel
6ce2f0e
BuildRequires:  ghc-deepseq-devel
35dc011
BuildRequires:  ghc-vector-devel
88288f9
88288f9
%description -n hedgewars-server
88288f9
A standalone server that can be used for LAN play or a private internet server.
7af89e7
7af89e7
%prep
9522441
%setup -q -n %{name}-src-%{version}
35dc011
%patch0 -p1
862ceed
%patch1 -p1
ce1555e
%patch2 -p1 -b .lua-52
52505db
%patch3 -p0
bdc2135
%ifarch %{arm}
bdc2135
# ghc does not support -dynamic on arm
bdc2135
%patch4 -p1
bdc2135
%endif
6d969b6
# Make sure that we don't use bundled libraries
75302d4
rm -r misc/libfreetype misc/libtremor misc/libopenalbridge
7af89e7
35dc011
7af89e7
%build
88288f9
%cmake -DWITH_SERVER=1 .
90775f6
make %{?_smp_mflags} VERBOSE=1
7af89e7
7af89e7
7af89e7
%install
7af89e7
make install DESTDIR=$RPM_BUILD_ROOT
7af89e7
db06359
# replace private font copies with symlinks to system versions
bbf3e17
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/DejaVuSans-Bold.ttf
4ce1ddb
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/wqy-zenhei.ttc
bbf3e17
ln -s ../../../fonts/dejavu/DejaVuSans-Bold.ttf \
bbf3e17
  $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/DejaVuSans-Bold.ttf
4ce1ddb
ln -s ../../../fonts/wqy-zenhei/wqy-zenhei.ttc \
4ce1ddb
  $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/wqy-zenhei.ttc
bbf3e17
7af89e7
# below is the desktop file and icon stuff.
7af89e7
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
e6b9e24
desktop-file-install                            \
7af89e7
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
7af89e7
  %{SOURCE1}
7af89e7
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
ad6113e
install -p -m 644 misc/hedgewars_ico.png \
d62308d
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
d62308d
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/512x512/apps
d62308d
install -p -m 644 misc/hedgewars.png \
d62308d
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
60204cc
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
60204cc
install -p -m 644 %{SOURCE2} \
60204cc
  $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
7af89e7
7af89e7
7af89e7
%post
35dc011
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
7af89e7
7af89e7
%postun
35dc011
if [ $1 -eq 0 ] ; then
35dc011
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
35dc011
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
7af89e7
fi
7af89e7
35dc011
%posttrans
35dc011
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
35dc011
7af89e7
7af89e7
%files
7af89e7
%doc COPYING Fonts_LICENSE.txt README
7af89e7
%{_bindir}/%{name}
7af89e7
%{_bindir}/hwengine
7af89e7
%{_datadir}/%{name}
60204cc
%{_datadir}/appdata
e6b9e24
%{_datadir}/applications/%{name}.desktop
7af89e7
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
d62308d
%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
7af89e7
88288f9
%files -n hedgewars-server
88288f9
%{_bindir}/%{name}-server
88288f9
7af89e7
7af89e7
%changelog
0e0da28
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.18-12
0e0da28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0e0da28
60204cc
* Sun Oct 13 2013 Hans de Goede <hdegoede@redhat.com> - 0.9.18-11
60204cc
- Improve Summary (rhbz#971887)
60204cc
- Add an appdata file
60204cc
bdc2135
* Fri Aug 09 2013 Hans de Goede <hdegoede@redhat.com> - 0.9.18-10
bdc2135
- Don't pass -dynamic to ghc on arm, fixing FTBFS (rhbz#992471)
bdc2135
77ed0b1
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.18-9
77ed0b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
77ed0b1
8217ca8
* Sun Jun 23 2013 Bruno Wolff III <bruno@wolff.to> - 0.9.18-8
8217ca8
- Rebuild for ghc updates
8217ca8
ce1555e
* Wed May 15 2013 Tom Callaway <spot@fedoraproject.org> - 0.9.18-7
ce1555e
- rebuild for new lua 
ce1555e
b55857f
* Sat Mar 23 2013 Bruno Wolff III <bruno@wolff.to> - 0.9.18-6
b55857f
- Rebuild for ghc-dataenc soname bump
b55857f
e6b9e24
* Sun Feb 24 2013 Bruno Wolff III <bruno@wolff.to> - 0.9.18-5
e6b9e24
- Remove vendor prefix from desktop file
e6b9e24
ba035f4
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.18-4
ba035f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ba035f4
2aadc2c
* Fri Dec 21 2012 Bruno Wolff III <bruno@wolff.to> - 0.9.18-3
2aadc2c
- Allow screenshots to use png images
2aadc2c
7050486
* Sun Nov 18 2012 Hans de Goede <hdegoede@redhat.com> - 0.9.18-2
7050486
- Rebuild for ghc updates affecting the server
7050486
35dc011
* Thu Nov  1 2012 Hans de Goede <hdegoede@redhat.com> - 0.9.18-1
35dc011
- Update to latest upstream release: 0.9.18
a6f950a
- 0.9.18 release announcement: http://www.hedgewars.org/node/4090
35dc011
24c5c24
* Sat Aug 11 2012 Bruno Wolff III <bruno@wolff.to> - 0.9.17-8
b2b3732
- Rebuild for libffi soname bump
b2b3732
fde9af7
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.17-7
fde9af7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
fde9af7
b055814
* Sun Jun 24 2012 Bruno Wolff III <bruno@wolff.to> - 0.9.17-6
b055814
- Rebuild for some library updates
b055814
d62308d
* Sat May 12 2012 Bruno Wolff III <bruno@wolff.to> - 0.9.17-5
d62308d
- Add a 512x512 icon
d62308d
ae7b469
* Sat Mar 24 2012 Jens Petersen <petersen@redhat.com> - 0.9.17-4
ae7b469
- rebuild against new ghc
ae7b469
797adc4
* Fri Jan 06 2012 Bruno Wolff III <bruno@wolff.to> - 0.9.17-3
797adc4
- Rebuild for new ghc-utf8-string
797adc4
f96252b
* Thu Jan 05 2012 Bruno Wolff III <bruno@wolff.to> - 0.9.17-2
f96252b
- Rebuild for new ghc-dataenc
f96252b
7b52c21
* Sun Jan 01 2012 Bruno Wolff III <bruno@wolff.to> - 0.9.17-1
7b52c21
- Update to upstream 0.9.17
7b52c21
- Changelog at http://code.google.com/p/hedgewars/source/browse/ChangeLog.txt
7b52c21
- 0.9.16 release announcement: http://www.hedgewars.org/node/3291
7b52c21
- 0.9.17 release announcement: http://www.hedgewars.org/node/3405
862ceed
- Use modified Debian patch to work around Text.Show.ByteString not being available
6ce2f0e
- hedgewars-server now needs ghc-deepseq
7b52c21
ec92c35
* Fri Oct 21 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.9.15-10.2
e3313c8
- rebuild with new gmp without compat lib
e3313c8
ea0ff74
* Tue Oct 11 2011 Peter Schiffer <pschiffe@redhat.com> - 0.9.15-10.1
ea0ff74
- rebuild with new gmp
ea0ff74
6c8b4c0
* Sun Aug 28 2011 Bruno Wolff III <bruno@wolff.to> - 0.9.15-10
a08c178
- Rebuild for hslogger update
a08c178
fbe1b47
* Wed Aug 17 2011 Jens Petersen <petersen@redhat.com> - 0.9.15-9
fbe1b47
- rebuild for bumped ghc-dataenc
fbe1b47
57701f3
* Fri Jun 17 2011 Bruno Wolff III <bruno@wolff.to> - 0.9.15-8
57701f3
- Rebuild for various ghc library updates
57701f3
42b31e0
* Thu Mar 10 2011 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.9.15-7
42b31e0
- Enable build on sparcv9
42b31e0
416da17
* Tue Feb 15 2011 Jens Petersen <petersen@redhat.com> - 0.9.15-6
416da17
- rebuild for latest updates for haskell-platform-2011.1 and ghc-dataenc
416da17
1f016e5
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.15-5
1f016e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1f016e5
ec92c35
* Thu Feb 03 2011 Dan Horák <dan[at]danny.cz> 0.9.15-4
5433e09
- add s390(x) to ExcludeArch - no fpc or ghc there
5433e09
0a7abae
* Tue Feb 01 2011 Bruno Wolff III <bruno@wolff.to> 0.9.15-3
b30169b
- Rebuild for ghc-hslogger 1.1.3
b30169b
0a7abae
* Thu Jan 27 2011 Bruno Wolff III <bruno@wolff.to> 0.9.15-2
9127d2b
- Rebuild for qt soname bump
9127d2b
0b56cba
* Wed Jan 19 2011 Bruno Wolff III <bruno@wolff.to> 0.9.15-1
0b56cba
- Upstream release 0.9.15
0b56cba
- Announcement at http://www.hedgewars.org/node/2672
0b56cba
- Changelog at http://code.google.com/p/hedgewars/source/browse/ChangeLog.txt
0b56cba
- Fixes FTBFS due to depreciating Maybe for Data.Maybe
0b56cba
21b5e8b
* Sun Jan 16 2011 Bruno Wolff III <bruno@wolff.to> 0.9.14.1-3
21b5e8b
- Rebuild again for ghc7.
21b5e8b
4cdd4f4
* Sun Dec 05 2010 Bruno Wolff III <bruno@wolff.to> 0.9.14.1-2
4cdd4f4
- Rebuild for ghc-HUnit soname bump.
4cdd4f4
9fbfe63
* Sat Nov 27 2010 Bruno Wolff III <bruno@wolff.to> 0.9.14.1-1
9fbfe63
- Rebuild for ghc7.
9fbfe63
- Get upstream release 0.9.14.1 (0.9.14 was a preview release.)
9fbfe63
- Release announcement at: http://www.hedgewars.org/node/2573
9fbfe63
a913975
* Sun Nov 07 2010 Bruno Wolff III <bruno@wolff.to> 0.9.13-5
a913975
- Rebuild for soname bump in libHSffi-ghc6.
a913975
f21a2c1
* Mon Oct 04 2010 Bruno Wolff III <bruno@wolff.to> 0.9.13-4
f21a2c1
- Rebuild for soname bump in libHSdataenc.
f21a2c1
a206bce
* Mon Oct 04 2010 Bruno Wolff III <bruno@wolff.to> 0.9.13-3
a206bce
- Fix up the requires syntax to do what I mean.
a206bce
7bd87ce
* Sun Oct 03 2010 Bruno Wolff III <bruno@wolff.to> 0.9.13-2
7bd87ce
- The server needs to match the version of the game.
7bd87ce
4ce1ddb
* Sun Oct 03 2010 Bruno Wolff III <bruno@wolff.to> 0.9.13-1
4ce1ddb
- Update to 0.9.13 - Change summary at: http://www.hedgewars.org/node/2037
4ce1ddb
- Server logging enable now that ghc-hslogger is available.
4ce1ddb
a09d1e5
* Sun Jun 13 2010 Bruno Wolff III <bruno@wolff.to> 0.9.12-4
a09d1e5
- In F14 ghc-utf8-string-devel needs to be build required.
a09d1e5
88288f9
* Sun May 23 2010 Bruno Wolff III <bruno@wolff.to> 0.9.12-3
88288f9
- Fix FTBFS bug 595168 due to invalid -Nu option for fpc.
88288f9
- Add a dedicated server sub package (with logging disabled)
88288f9
6cb9df4
* Tue Dec  1 2009 Hans de Goede <hdegoede@redhat.com> 0.9.12-2
6cb9df4
- Use RPM_OPT_FLAGS when building c++ code and pass -g to fpc (#542000)
6cb9df4
db06359
* Mon Nov 23 2009 Hans de Goede <hdegoede@redhat.com> 0.9.12-1
db06359
- New upstream release 0.9.12
db06359
- Remove included google-droid font, use the font from the
db06359
  google-droid-sans-fonts package instead
db06359
4a98fe2
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.9.11-3
4a98fe2
- rebuilt with new openssl
4a98fe2
cac0826
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.11-2
cac0826
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
cac0826
6421091
* Mon May 25 2009 Hans de Goede <hdegoede@redhat.com> 0.9.11-1
6421091
- New upstream release 0.9.11
6421091
99521d2
* Wed Apr 15 2009 Hans de Goede <hdegoede@redhat.com> 0.9.10-1
99521d2
- New upstream release 0.9.10
99521d2
f11beab
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.9-2
f11beab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f11beab
d8b1d38
* Tue Jan 20 2009 Hans de Goede <hdegoede@redhat.com> 0.9.9-1
d8b1d38
- New upstream release 0.9.9
d8b1d38
- Fix dejavu font Requires (again) (rh 480458)
d8b1d38
40ecbb8
* Fri Jan 16 2009 Tomas Mraz <tmraz@redhat.com> 0.9.8-2
40ecbb8
- rebuild with new openssl
40ecbb8
acfbcd2
* Sat Jan 10 2009 Hans de Goede <hdegoede@redhat.com> 0.9.8-1
acfbcd2
- New upstream release 0.9.8
acfbcd2
f670365
* Sat Dec 27 2008 Hans de Goede <hdegoede@redhat.com> 0.9.7-3
f670365
- Fix dejavu font Requires
f670365
bbf3e17
* Fri Dec 26 2008 Hans de Goede <hdegoede@redhat.com> 0.9.7-2
bbf3e17
- Replace private dejavu copy with symlink to system version (rh 477396)
bbf3e17
11da7bd
* Tue Nov  4 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.7-1
11da7bd
- New upstream release 0.9.7
11da7bd
f383d56
* Wed Jul 30 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.6-1
f383d56
- New upstream release 0.9.6
f383d56
b06314b
* Wed Jul  9 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.5-1
b06314b
- New upstream release 0.9.5
b06314b
90775f6
* Thu Jun 26 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.4-1
90775f6
- New upstream release 0.9.4
90775f6
0a7abae
* Thu May  1 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.3-1
9522441
- New upstream release 0.9.3
9522441
c266960
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.2-2
c266960
- Autorebuild for GCC 4.3
c266960
c4944fc
* Tue Jan 22 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.2-1
c4944fc
- New upstream release 0.9.2
c4944fc
0e2ce43
* Sat Jan 12 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-5
0e2ce43
- Fix compilation with gcc 4.3
0e2ce43
8c80d5e
* Mon Sep 10 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-4
8c80d5e
- Remove ExcludeArch ppc64, freepascal is available on ppc64 now (bz 284401)
8c80d5e
47ebf83
* Mon Sep 10 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-3
47ebf83
- ExcludeArch ppc64, as freepascal (fpc) isn't available on ppc64 (bz 284401)
47ebf83
7af89e7
* Sun Sep  9 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-2
7af89e7
- Install data files into /usr/share/hedgewars instead of into
7af89e7
  /usr/share/hedgewars/hedgewars
7af89e7
- Minor desktop file cleanup
7af89e7
7af89e7
* Sun Aug 26 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-1
7af89e7
- Initial Fedora package