From 1d65704d8546d762e6e79e00a47cd61e532b09e9 Mon Sep 17 00:00:00 2001 From: Raphael Groner Date: Dec 15 2014 15:21:45 +0000 Subject: Initial import (rhbz#1157213) --- diff --git a/.gitignore b/.gitignore index e69de29..f568095 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,10 @@ +/brutalchess-0.5.2-fix-FTBFS.patch +/brutalchess-0.5.2-gcc4.3.patch +/brutalchess-0.5.2-gcc4.7.patch +/brutalchess-alpha-0.5.2-nofonts.tar.xz +/brutalchess.desktop +/brutalchess-fonts.diff +/brutalchess-freetype2.patch +/brutalchess-nofonts.sh +/brutalchess.png +/brutalchess.spec diff --git a/brutalchess.spec b/brutalchess.spec new file mode 100644 index 0000000..35f466f --- /dev/null +++ b/brutalchess.spec @@ -0,0 +1,161 @@ +%global pre alpha +%global title BrutalChess + +#global buildtex 0 + +Name: brutalchess +Version: 0.5.2 +Release: 3.%{pre}%{?dist} +Summary: Chess game with impressive 3D graphics + +License: GPLv2+ +URL: http://sf.net/projects/%{name} +##we don't want the original fonts due to legal reasoning +#http://sf.net/projects/%{name}/files/%{name}-%{pre}/%{name}-%{pre}-%{version}/%{name}-%{pre}-%{version}-src.tar.gz +Source0: %{name}-%{pre}-%{version}-nofonts.tar.xz +Source1: %{name}-nofonts.sh + +Patch0: https://sf.net/p/%{name}/patches/8/attachment/%{name}-freetype2.patch +# fonts: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584416 +Patch1: https://sf.net/p/%{name}/patches/7/attachment/%{name}-fonts.diff + +# features later: +# FIXME crafty https://sourceforge.net/p/brutalchess/patches/4/ +# FIXME PGN https://sourceforge.net/p/brutalchess/patches/3/ +# FIXME -l option https://sourceforge.net/p/brutalchess/patches/2/ + +Source10: http://slackbuilds.org/slackbuilds/14.1/games/%{name}/%{name}.desktop +Source11: http://slackbuilds.org/slackbuilds/14.1/games/%{name}/%{name}.png +Patch10: http://slackbuilds.org/slackbuilds/14.1/games/%{name}/%{name}-%{version}-fix-FTBFS.patch +Patch11: http://slackbuilds.org/slackbuilds/14.1/games/%{name}/%{name}-%{version}-gcc4.3.patch +Patch12: http://slackbuilds.org/slackbuilds/14.1/games/%{name}/%{name}-%{version}-gcc4.7.patch + +BuildRequires: libXt-devel mesa-libGL-devel libXi-devel libXmu-devel +BuildRequires: SDL-devel SDL_image-devel +BuildRequires: freetype-devel +BuildRequires: gnu-free-mono-fonts gnu-free-sans-fonts gnu-free-serif-fonts +BuildRequires: dos2unix doxygen +%if 0%{?buildtex:1} +BuildRequires: tex2html +BuildRequires: %{_bindir}/latex texlive-texconfig +BuildRequires: %{_bindir}/dvips %{_bindir}/ps2pdf %{_bindir}/psnup +%endif +BuildRequires: desktop-file-utils + + +%description +%{title} features full 3D graphics, an advanced particle engine, +and several different levels of intelligent AI, inspired by the once +popular "Battle Chess" released by Interplay circa 1988. + + +%package doc +Summary: Additional documentation files for the game %{title} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description doc +Extra documentation files for the game %{title}, like doxygen withfor +html and latex formats. + + +%prep +%setup -q +sed -i s,fonts,, Makefile.in +%patch0 -p0 +%patch1 -p1 +%patch10 +%patch11 +%patch12 -p1 +dos2unix NEWS README +doxygen -u + + +%build +##FIXME libXt support is a feature +%configure --with-x +make %{?_smp_mflags} +doxygen + +##distribute tex +cd doc +mv latex refman +cd refman +%if 0%{?buildtex:1} +# FIXME is the html from tarball generated from tex? +tex2html refman.tex +# FIXME latex issues ahead! +#make pdf +#make ps_2on1 pdf_2on1 +#make all +rm *.tex +%endif +make clean + + +%install +%make_install + +##misplaced content +rm -r %{buildroot}%{_datadir}/%{name}/doc + +##desktop +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE10} +install -d %{buildroot}%{_datadir}/pixmaps +cp -p %{SOURCE11} %{buildroot}%{_datadir}/pixmaps + +##fonts configuration made legally +##FIXME ugly hackery with symlinks for fixed file names, +##could change in future, maybe better ask upstream to patch source +install -d %{buildroot}%{_datadir}/%{name}/fonts +pushd %{buildroot}%{_datadir}/%{name}/fonts +find -name \*.TTF -or -name \*.tff -delete +ln -s ../../fonts/gnu-free/FreeSerifBold.ttf COOLVETI.TTF +ln -s ../../fonts/gnu-free/FreeSerif.ttf Ghostwri.ttf +ln -s ../../fonts/gnu-free/FreeMono.ttf VeraMono.ttf +ln -s ../../fonts/gnu-free/FreeSans.ttf ZERO__.TTF +popd + +##doxygen +install -d %{buildroot}%{_pkgdocdir} +cp -ap doc/html %{buildroot}%{_pkgdocdir} + + +%files +%doc AUTHORS COPYING ChangeLog NEWS README +# engine +%{_bindir}/%{name} +%{_libexecdir}/md3view +%{_libexecdir}/objview +# desktop & icon +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/%{name}.png +# data +%{_datadir}/%{name}/ +#%{_datadir}/%{name}/art/ +#%{_datadir}/%{name}/models/ +# fonts +#%{_datadir}/%{name}/fonts/ + +%files doc +%dir %{_pkgdocdir} +%doc doc/html/ +%doc doc/refman/ + + +%changelog +* Fri Dec 12 2014 Raphael Groner - 0.5.2-3.alpha +- fixes for review + +* Thu Dec 11 2014 Raphael Groner - 0.5.2-2.alpha +- fix broken BR for Xorg +- remove subpackages +- additional doc package + +* Sat Oct 25 2014 Raphael Groner - 0.5.2-1.alpha +- original by Timur Kristóf (rhbz #701812) +- desktop stuff and gcc patches from Slackware +- link freetype2 properly +- replace fonts, patch adopted from Debian +- macro title in description +- enhance documentation with doxygen and latex diff --git a/sources b/sources index e69de29..4e5ea56 100644 --- a/sources +++ b/sources @@ -0,0 +1,10 @@ +c66b821ec70b985018eaf6782921dd70 brutalchess-0.5.2-fix-FTBFS.patch +b3e3018c9c0631b22f991219f3ce76d3 brutalchess-0.5.2-gcc4.3.patch +80bb8ea179113ad79398d06e48080f1b brutalchess-0.5.2-gcc4.7.patch +e6ad86099e4ec43252123d4d47e02bdb brutalchess-alpha-0.5.2-nofonts.tar.xz +4abd623bb74e62815af1ea5fa989aef6 brutalchess.desktop +36cf17f62c81e6c687382818b3e60e1b brutalchess-fonts.diff +e8c07fd0be0a1d179a9bbac560ef4308 brutalchess-freetype2.patch +9f10d641dcc2a6ddf9e606d6f11db115 brutalchess-nofonts.sh +4ddb9873f0ba95e0b3b8b7758a7d9703 brutalchess.png +53fa278e2311d5e9374374a183b2eb2a brutalchess.spec