+# TODO:
+# - check sounds - doesn't work for me
+
Summary: Advanced Strategic Command - a free, turn based strategy game
-Summary(pl): Advanced Strategic Command - turowa gra strategiczna
+Summary(pl.UTF-8): Advanced Strategic Command - turowa gra strategiczna
Name: asc
-Version: 1.10.2
-Release: 3
-License: GPL
+Version: 2.6.0.0
+Release: 1
+License: GPL v2+
Group: X11/Applications/Games/Strategy
-Source0: http://dl.sourceforge.net/asc-hq/%{name}-source-%{version}.tar.gz
-# Source0-md5: 61aca2f50c851c440c7d76b356d3d28b
+Source0: http://downloads.sourceforge.net/asc-hq/%{name}-%{version}.tar.bz2
+# Source0-md5: 3f0002f1d3ccdf447b4721a171ed2ac3
Source1: %{name}.desktop
-Source2: %{name}-mp3.tar.bz2
-# Source2-md5: a310728dc2919cb1f4f6c321c885ae61
-Patch0: %{name}-ac_fix.patch
-Patch1: %{name}-am_fix.patch
+Source2: %{name}.xpm
+Patch0: %{name}-configure.patch
+Patch1: %{name}-lua.patch
URL: http://www.asc-hq.org/
-BuildRequires: SDL-devel
+BuildRequires: SDL-devel >= 1.2.2
BuildRequires: SDL_image-devel
-BuildRequires: SDL_mixer-devel
-BuildRequires: SDLmm-devel
+BuildRequires: SDL_mixer-devel >= 1.2
+BuildRequires: SDL_sound-devel
BuildRequires: autoconf
BuildRequires: automake
-BuildRequires: libtool
-BuildRequires: paragui-devel
+BuildRequires: boost-devel >= 1.35.0
+BuildRequires: bzip2-devel >= 1.0.0
+BuildRequires: curl-devel >= 7.10.0
+BuildRequires: expat-devel
+BuildRequires: freetype-devel
+BuildRequires: libjpeg-devel
+BuildRequires: libpng-devel
+BuildRequires: libsigc++12-devel >= 1.2
+BuildRequires: libtool >= 2:1.5
+BuildRequires: lua51-devel
+BuildRequires: physfs-devel
+BuildRequires: pkgconfig
+BuildRequires: wxGTK2-unicode-gl-devel
+BuildRequires: xvid-devel
+BuildRequires: zip
+BuildRequires: zlib-devel
+Obsoletes: asc-music
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _datadir /usr/share
+%define specflags -fpermissive
%description
-ASC is a free, turn based strategy game. It is designed in the
-tradition of the Battle Isle series from Bluebyte and is currently
-available for Windows and Linux.
+ASC is a turn-based strategy game in the tradition of Battle Isle 2/3.
+It can be played against the computer or against other human players
+(either hotseat or by mail).
-%description -l pl
-ASC jest darmow±, turow± gr± strategiczn±. Zosta³a zaprojektowana
-w tradycji serii Battle Isle firmy Bluebyte. Obecnie jest dostêpna
-pod Windows i Linuksa.
+%description -l pl.UTF-8
+ASC jest turową grą strategiczną, która posiada korzenie w Battle Isle
+2/3. Grając w nią, można się zmierzyć z komputerem lub z innym
+człowiekiem (przy jednym komputerze, lub przez pocztę).
-%package music
-Summary: Music for Advanced Strategic Command
-Summary(pl): Muzyka do Advanced Strategic Command
+%package tools
+Summary: Tools for ASC
+Summary(pl.UTF-8): Narzedzia dla ASC
Group: X11/Applications/Games/Strategy
-Requires: %{name}
-%description music
-Music for Advanced Strategic Command in mp3 format.
+%description tools
+Map editor and other tools for ASC.
-%description music -l pl
-Muzyka do Advanced Strategic Command w formacie mp3.
+%description tools -l pl.UTF-8
+Edytor map i inne narzędzia dla ASC.
%prep
-%setup -q -a 2
-%patch0
-%patch1
+%setup -q
+%patch0 -p1
+%patch1 -p1
%build
%{__libtoolize}
%{__aclocal}
-%{__automake}
%{__autoconf}
+%{__autoheader}
+%{__automake}
%configure \
- CPPFLAGS="-I%{_includedir}" LDFLAGS="-L%{_libdir}" \
- --disable-paraguitest
+ --with-wx-config="wx-gtk2-unicode-config"
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_applnkdir}/Games/Strategy,%{_mandir}/man6,%{_docdir}/%{name}-%{version}/html/graphics}
+install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-install %{SOURCE1} $RPM_BUILD_ROOT%{_applnkdir}/Games/Strategy
-install doc/manpages/*.6 $RPM_BUILD_ROOT%{_mandir}/man6
-
-# bug in make install, so we do it here
-install data/*.con $RPM_BUILD_ROOT%{_datadir}/games/asc
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc TODO README AUTHORS ChangeLog doc/graphics doc/*.html doc/*.css
-%attr(2755,root,games) %{_bindir}/*
-%dir %{_datadir}/games/asc
-%{_datadir}/games/asc/*.zip
-%{_datadir}/games/asc/*.con
-%{_applnkdir}/Games/Strategy/*
-%{_mandir}/man6/*
+%doc ChangeLog source/TODO
+%attr(2755,root,games) %{_bindir}/%{name}
+%{_datadir}/games/%{name}
+%{_desktopdir}/%{name}.desktop
+%{_mandir}/man6/%{name}.6*
+%{_pixmapsdir}/%{name}.xpm
+%{_datadir}/appdata/asc.appdata.xml
-%files music
-%{_datadir}/games/asc/music
+%files tools
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/asc_demount
+%attr(755,root,root) %{_bindir}/asc_mapedit
+%attr(755,root,root) %{_bindir}/asc_mount
+%attr(755,root,root) %{_bindir}/asc_weaponguide
+%{_mandir}/man6/asc_demount.6*
+%{_mandir}/man6/asc_mapedit.6*
+%{_mandir}/man6/asc_mount.6*
+%{_mandir}/man6/asc_weaponguide.6*