swt2c / rpms / megaglest

Forked from rpms/megaglest 5 years ago
Clone
Blob Blame History Raw
Name:		megaglest
Version:	3.7.1
Release:	8%{?dist}
Summary:	Open Source 3d real time strategy game
License:	GPLv3+ and GPL+
Group:		Amusements/Games
Url:		http://megaglest.org/
Source0:	http://downloads.sourceforge.net/%{name}/files/%{name}-source-%{version}.tar.xz
BuildRequires:	cmake
BuildRequires:	desktop-file-utils
BuildRequires:	mesa-libGL-devel
BuildRequires:	ftgl-devel
BuildRequires:	glew-devel
BuildRequires:	gnutls-devel
BuildRequires:	help2man
BuildRequires:	openjpeg-devel
BuildRequires:	libcurl-devel
BuildRequires:	libicu-devel
BuildRequires:	libircclient-devel
BuildRequires:	libjpeg-turbo-devel
BuildRequires:	libvorbis-devel
BuildRequires:	lua-devel
BuildRequires:	miniupnpc-devel
BuildRequires:	openal-soft-devel
BuildRequires:	openssl-devel
BuildRequires:	libpng-devel
BuildRequires:	SDL-devel
BuildRequires:	SDL_mixer-devel
BuildRequires:	SDL_net-devel
BuildRequires:	subversion
BuildRequires:	xerces-c27-devel
BuildRequires:	wxGTK-devel
BuildRequires:	xorg-x11-server-Xvfb
BuildRequires:	zlib-devel
Requires:	glx-utils
Requires:	megaglest-data = %{version}
Requires:	p7zip
Obsoletes:	glest <= 3.2.2

# Correct use of XERCESC_INCLUDE and XERCESC_INCLUDE_DIR that
# should have the same value if xerces is found.
Patch0:		%{name}-3.6.0.3-xerces.patch
# Correct usage of xvfb-run when generating manpages
Patch1:		%{name}-3.6.0.2-help2man.patch
# Do not fail with cryptic message if there are missing translations
# just use english text
Patch2:		%{name}-3.6.0.3-translation-missing.patch
# http://sourceforge.net/tracker/?func=detail&aid=3598159&group_id=300350&atid=1266776
Patch3:		%{name}-color-picking.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=924874
# http://sourceforge.net/tracker/?func=detail&aid=3608835&group_id=300350&atid=1266776
Patch4:		%{name}-selection.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=996357
# http://megaglest.svn.sourceforge.net/viewvc/megaglest?view=revision&revision=3958
Patch5:		%{name}-miniupnpc-1.7.patch

%description
MegaGlest is an open source 3D-real-time strategy game, where you control
the armies of one of seven different factions: Tech, Magic, Egyptians,
Indians, Norsemen, Persian or Romans. The game is setup in one of 16
naturally looking settings, which -like the unit models- are crafted with
great appreciation for detail. Additional game data can be downloaded from
within the game at no cost.

%prep
%setup -q

%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%if 0%{?fedora} >= 20
%patch5 -p1
%endif

%build
mkdir -p build
pushd build
    export XERCESC_INCLUDE_DIR=%{_includedir}/xercesc-2.7.0
    export XERCESC_LIBRARY_DIR=%{_libdir}/xerces-c-2.7.0
    %cmake								\
	-DMEGAGLEST_BIN_INSTALL_PATH=%{_bindir}				\
	-DMEGAGLEST_ICON_INSTALL_PATH=%{_datadir}/icons			\
	..
    make %{?_smp_mflags}
popd

%install
make install DESTDIR=${RPM_BUILD_ROOT} -C build
install -d $RPM_BUILD_ROOT%{_datadir}/megaglest
for image in `ls $RPM_BUILD_ROOT%{_datadir}/icons`; do
    [ -e $RPM_BUILD_ROOT%{_datadir}/$image ] ||
	ln -sf %{_datadir}/icons/$image $RPM_BUILD_ROOT%{_datadir}/megaglest
done
# installed by megaglest-data
rm $RPM_BUILD_ROOT%{_datadir}/megaglest/megaglest.bmp
for file in megaglest megaglest_editor megaglest_g3dviewer; do
    desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/$file.desktop
done

%files
%doc AUTHORS.source_code.txt
%doc CHANGELOG.txt
%doc COPYRIGHT.source_code.txt
%doc gnu_gpl_3.0.txt
%doc README.txt
%{_bindir}/*
%{_datadir}/applications/megaglest*.desktop
%{_datadir}/icons/*
%{_mandir}/man6/*.6*
%{_datadir}/megaglest/*

%changelog
* Wed Aug 14 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 3.7.1-8
- Add support for minupnpc >= 1.7 (#996357)

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Mar 29 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 3.7.1-4
- Correct crash with NULL unit in selection (#924874)

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Jan 21 2013 Adam Tkac <atkac redhat com> - 3.7.1-4
- rebuild due to "jpeg8-ABI" feature drop

* Wed Jan 16 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 3.7.1-3
- Add patch suggested by upstream for better color picking selection mode.

* Thu Dec 13 2012 Adam Jackson <ajax@redhat.com> - 3.7.1-2
- Rebuild for glew 1.9.0

* Fri Nov 23 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 3.7.1-1
- Update to latest upstream release.
- Remove no longer required gcc 4.7 patch.
- Add versioned requires to megaglest-data.

* Thu Jul 19 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 3.6.0.3-5
- Do not use %%{_iconsdir} macro (#817315).
- Correct libjpeg-turbo-devel build requires (#817315).
- Add missing desktop-file-utils build requires (#817315).
- Update license tag to match source files (#817315).

* Fri Jul 13 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 3.6.0.3-4
- Add turbojpeg-devel to build requires.
- Install documentation (#817315).
- Correct sourceforge source url (#817315).

* Fri Jun  1 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 3.6.0.3-3
- Removed %%defattr.
- Update to build with gcc 4.7.
- Do not own %%{_datadir}/megaglest as megaglest-data is required.
- Remove comments about pending review requests of build requires.

* Wed May  2 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 3.6.0.3-2
- Remove no longer required patch to link to openssl and static libircclient.
- Update build requires for miniupnpc rename.

* Sat Apr 28 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 3.6.0.3-1
- Initial megaglest spec.