0d6c31a
# Copyright (c) 2007 oc2pus <toni@links2linux.de>
0d6c31a
# Copyright (c) 2007 Hans de Goede <j.w.r.degoede@hhs.nl>
0d6c31a
# This file and all modifications and additions to the pristine
0d6c31a
# package are under the same license as the package itself.
0d6c31a
0d6c31a
Name:           BlockOutII
dcd18d3
Version:        2.5
24409fb
Release:        16%{?dist}
0d6c31a
Summary:        A free adaptation of the original BlockOut DOS game
0d6c31a
License:        GPLv2+
0d6c31a
URL:            http://www.blockout.net/blockout2/
dcd18d3
Source0:        http://downloads.sourceforge.net/blockout/bl25-src.tar.gz
dcd18d3
Source1:        http://downloads.sourceforge.net/blockout/bl25-linux-x86.tar.gz
dcd18d3
Source2:        %{name}.desktop
0d6c31a
Patch0:         BlockOutII-2.3-syslibs.patch
dcd18d3
Patch1:         BlockOutII-2.3-bl2Home.patch
dcd18d3
Patch2:         BlockOutII-2.3-restore-resolution.patch
dcd18d3
Patch3:         BlockOutII-2.3-libpng15.patch
2e16492
# https://bugzilla.redhat.com/show_bug.cgi?id=1037001
dcd18d3
Patch4:         BlockOutII-2.3-format-security.patch
613d31d
BuildRequires:  gcc-c++
8d6ef93
BuildRequires:  SDL_mixer-devel libpng-devel desktop-file-utils ImageMagick
e1ea10c
Requires:       hicolor-icon-theme opengl-games-utils
0d6c31a
0d6c31a
%description
0d6c31a
BlockOut II is a free adaptation of the original BlockOut
0d6c31a
DOS game edited by California Dreams in 1989. BlockOut II
0d6c31a
has the same features than the original game with few graphic
0d6c31a
improvements. The score calculation is also nearly similar to
0d6c31a
the original game. BlockOut II has been designed by an addicted
0d6c31a
player for addicted players. BlockOut II is an open source
0d6c31a
project available for both Windows and Linux.
0d6c31a
0d6c31a
Blockout is a registered trademark of Kadon Enterprises, Inc.,
0d6c31a
used by permission for the BlockOut II application by Jean-Luc
0d6c31a
Pons.
0d6c31a
0d6c31a
%prep
dcd18d3
%setup -q -n BL_SRC -a 1
0d6c31a
%patch0 -p1
0d6c31a
%patch1 -p1
0d6c31a
%patch2 -p1
0d6c31a
%patch3 -p1
1154e8c
%patch4 -p1
1154e8c
1154e8c
# Convert the README and put it somewhere we can use it from %%doc
dcd18d3
iconv -f ISO8859-1 -t UTF8 BlockOut/README.txt > t;
dcd18d3
sed -i 's/\r//' t
dcd18d3
touch -r BlockOut/README.txt t
dcd18d3
mv t BlockOut/README.txt
1154e8c
1154e8c
# Remove bundled png library
1154e8c
rm -r ImageLib/src/png/png ImageLib/src/png/zlib
1154e8c
0d6c31a
0d6c31a
%build
1154e8c
pushd ImageLib/src
0d6c31a
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -Dlinux -c" \
0d6c31a
    CXXFLAGS="$RPM_OPT_FLAGS -Dlinux -c"
0d6c31a
popd
0d6c31a
1154e8c
pushd BlockOut
0d6c31a
make %{?_smp_mflags} \
1154e8c
    CXXFLAGS="$RPM_OPT_FLAGS -Dlinux `sdl-config --cflags` -I../ImageLib/src -c" \
dcd18d3
    ADD_LIBS="-L../ImageLib/src -limagelib -lpng -lz"
0d6c31a
popd
0d6c31a
8d6ef93
convert BlockOut/block_icon.ico BlockOutII.png
a6bbaa2
convert BlockOutII-2.png -resize 64x64 BlockOutII-64x64.png
8d6ef93
dcd18d3
0d6c31a
%install
0d6c31a
mkdir -p $RPM_BUILD_ROOT%{_bindir}
0d6c31a
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/images
0d6c31a
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/sounds
0d6c31a
1154e8c
install -m 755 BlockOut/blockout $RPM_BUILD_ROOT%{_bindir}/%{name}
e1ea10c
ln -s opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/%{name}-wrapper
dcd18d3
install -p -m 644 blockout/images/* $RPM_BUILD_ROOT%{_datadir}/%{name}/images
dcd18d3
install -p -m 644 blockout/sounds/* $RPM_BUILD_ROOT%{_datadir}/%{name}/sounds
0d6c31a
0d6c31a
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
dcd18d3
desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE2}
a6bbaa2
install -D -p -m 644 %{name}-1.png \
8d6ef93
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
a6bbaa2
install -D -p -m 644 %{name}-0.png \
8d6ef93
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
a6bbaa2
install -D -p -m 644 %{name}-2.png \
8d6ef93
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
a6bbaa2
install -D -p -m 644 %{name}-64x64.png \
a6bbaa2
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
dcd18d3
Richard Hughes 57f7f49
# Register as an application to be visible in the software center
Richard Hughes 57f7f49
#
Richard Hughes 57f7f49
# NOTE: It would be *awesome* if this file was maintained by the upstream
Richard Hughes 57f7f49
# project, translated and installed into the right place during `make install`.
Richard Hughes 57f7f49
#
Richard Hughes 57f7f49
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
Richard Hughes 57f7f49
#
Richard Hughes 57f7f49
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
Richard Hughes 57f7f49
cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml <
Richard Hughes 57f7f49
Richard Hughes 57f7f49
Richard Hughes 57f7f49
Richard Hughes 57f7f49
EmailAddress: jlp_38@yahoo.com
Richard Hughes 57f7f49
SentUpstream: 2014-09-17
Richard Hughes 57f7f49
-->
Richard Hughes 57f7f49
<application>
Richard Hughes 57f7f49
  <id type="desktop">BlockOutII.desktop</id>
Richard Hughes 57f7f49
  <metadata_license>CC0-1.0</metadata_license>
Richard Hughes 57f7f49
  <summary>A free adaptation of the original BlockOut game</summary>
Richard Hughes 57f7f49
  <description>
Richard Hughes 57f7f49
    

Richard Hughes 57f7f49
      BlockOut II is a game where the player moves and rotate 3D polycubes
Richard Hughes 57f7f49
      that are constantly falling with the objective of clearing layers of
Richard Hughes 57f7f49
      blocks.
Richard Hughes 57f7f49
      It is a free adaptation of the original BlockOut game released in 1989.
Richard Hughes 57f7f49
    

Richard Hughes 57f7f49
  </description>
Richard Hughes 57f7f49
  <url type="homepage">http://www.blockout.net/blockout2/</url>
Richard Hughes 57f7f49
  <screenshots>
Richard Hughes 57f7f49
    <screenshot type="default">http://www.blockout.net/blockout2/screenshots/scr1.jpg</screenshot>
Richard Hughes 57f7f49
    <screenshot>http://www.blockout.net/blockout2/screenshots/scr2.jpg</screenshot>
Richard Hughes 57f7f49
  </screenshots>
Richard Hughes 57f7f49
  
Richard Hughes 57f7f49
  <updatecontact>someone_who_cares@upstream_project.org</updatecontact>
Richard Hughes 57f7f49
   -->
Richard Hughes 57f7f49
</application>
Richard Hughes 57f7f49
EOF
0d6c31a
dcd18d3
0d6c31a
%files
0d6c31a
%doc BlockOut/README.txt
e1ea10c
%{_bindir}/%{name}*
0d6c31a
%{_datadir}/%{name}
Richard Hughes 57f7f49
%{_datadir}/appdata/%{name}.appdata.xml
65f8898
%{_datadir}/applications/%{name}.desktop
8d6ef93
%{_datadir}/icons/hicolor/*/apps/%{name}.png
dcd18d3
0d6c31a
0d6c31a
%changelog
24409fb
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-16
24409fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
24409fb
65e9921
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-15
65e9921
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
65e9921
0012b9f
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-14
0012b9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
0012b9f
9fe9703
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-13
9fe9703
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
9fe9703
94e0d85
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-12
94e0d85
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
94e0d85
0987fa8
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-11
0987fa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
0987fa8
3908cf0
* Sun Jan 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.5-10
3908cf0
- Remove obsolete scriptlets
3908cf0
ad9440b
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-9
ad9440b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
ad9440b
c31081e
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-8
c31081e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c31081e
36408ff
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-7
36408ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
36408ff
488f597
* Tue Feb  2 2016 Hans de Goede <hdegoede@redhat.com> - 2.5-6
488f597
- Add Keywords to .desktop file
488f597
630fba4
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-5
630fba4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
630fba4
a432514
* Sun May 03 2015 Kalev Lember <kalevlember@gmail.com> - 2.5-4
a432514
- Rebuilt for GCC 5 C++11 ABI change
a432514
Richard Hughes 57f7f49
* Thu Mar 26 2015 Richard Hughes <rhughes@redhat.com> - 2.5-3
Richard Hughes 57f7f49
- Add an AppData file for the software center
Richard Hughes 57f7f49
8d6ef93
* Mon Oct 27 2014 Hans de Goede <hdegoede@redhat.com> - 2.5-2
8d6ef93
- Found a better 48x48 icon
8d6ef93
dcd18d3
* Mon Oct 27 2014 Hans de Goede <hdegoede@redhat.com> - 2.5-1
dcd18d3
- New upstream release 2.5
dcd18d3
- Include a larger (128x128) icon (rhbz#1157498)
dcd18d3
2e16492
* Wed Oct 22 2014 Hans de Goede <hdegoede@redhat.com> - 2.4-10
37f69c4
- Fix crash when showing the highscore screen (rhbz#1154305)
2e16492
5ce5f00
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-9
5ce5f00
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
5ce5f00
ca7a283
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-8
ca7a283
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ca7a283
673b4f4
* Thu Dec 12 2013 Hans de Goede <hdegoede@redhat.com> - 2.4-7
673b4f4
- Fix building with -Werror=format-security (rhbz#1037001)
673b4f4
b6874a5
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-6
b6874a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
b6874a5
65f8898
* Wed Feb 13 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 2.4-5
65f8898
- remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
65f8898
3e9b2a6
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-4
3e9b2a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
3e9b2a6
bc3db24
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-3
bc3db24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
bc3db24
0ba88ff
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-2
0ba88ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
0ba88ff
1154e8c
* Wed Dec 14 2011 Hans de Goede <hdegoede@redhat.com> - 2.4-1
1154e8c
- Update to 2.4
1154e8c
- Fix building with new libpng
1154e8c
64590cd
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 2.3-9
64590cd
- Rebuild for new libpng
64590cd
39e6551
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-8
39e6551
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
39e6551
19832f1
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-7
19832f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
19832f1
9c0a90e
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-6
9c0a90e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9c0a90e
0e17233
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.3-5
0e17233
- Autorebuild for GCC 4.3
0e17233
e1ea10c
* Sat Dec  1 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-4
e1ea10c
- Use opengl-games-utils wrapper to show error dialog when DRI is missing
e1ea10c
0d6c31a
* Thu Nov 29 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-3
0d6c31a
- Fix restoration of resolution when leaving fullscreen
0d6c31a
- Don't use macros in cvs co instructions
0d6c31a
0d6c31a
* Mon Nov 26 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-2
0d6c31a
- Add missing libpng-devel BR (bz 398791)
0d6c31a
- Add include date in CVS tarbal reproduction instructions (bz 398791)
0d6c31a
0d6c31a
* Sat Nov 24 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-1
0d6c31a
- Initial Fedora Package based on the packman package