]> git.pld-linux.org Git - packages/crafty.git/blobdiff - crafty.spec
- uncommented icon field
[packages/crafty.git] / crafty.spec
index 4e0f78e6be2834c87ab11987c79e1537e1f15ed0..44f9230ffeb8364bccd59e221b7b1e5ea740bfb6 100644 (file)
@@ -1,12 +1,12 @@
+Summary:       Superior chess program by Bob Hyatt for Unix systems
+Summary(pl):   Jeden z lepszych programów szachowych dla uniksów autorstwa Boba Hyatta
 Name:          crafty
-Version:       18.9
-Release:       2
+Version:       18.15
+Release:       1
 License:       GPL
 Group:         Applications/Games
-Summary:       Superior chess program by Bob Hyatt for Unix systems.
-Icon:          xchess.gif
 Source0:       ftp://ftp.cis.uab.edu/pub/hyatt/v18/%{name}-%{version}.tar.gz
-# Source0-md5: 439b591eb48957ce50bfd31f9bada8fb
+# Source0-md5: e98774ac9b515bb5487c1789f5e6af4c
 Source1:       ftp://ftp.cis.uab.edu/pub/hyatt/%{name}.faq
 # NoSource1-md5: f744727e291b6dec7e7c69bb3586b6dd
 Source2:       ftp://ftp.cis.uab.edu/pub/hyatt/read.me
@@ -17,37 +17,78 @@ Source4:    ftp://ftp.cis.uab.edu/pub/hyatt/v18/%{name}.doc.ascii
 # NoSource4-md5: 5fd73027a1de1674763562e1987197ba
 Source5:       ftp://ftp.cis.uab.edu/pub/hyatt/doc/%{name}.doc.ps
 # Source5-md5: 6cef69aa2f9ea1ceb74b6c14edc8291f
+Source6:       %{name}.desktop
+Source7:       xchess.png
 Patch0:                %{name}-paths.patch
+Patch1:                %{name}-Makefile.patch
+Icon:          xchess.gif
+BuildRequires: libstdc++-devel
 Provides:      chessprogram
-ExcludeArch:   axp
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                specflags       -fomit-frame-pointer
 
 %description
 Crafty is a Unix chess program, distributed as source by its author,
 Bob Hyatt. The program plays at about 2200 strength and frequently
 beats GNU Chess on the same hardware.
 
+%description -l pl
+Crafty to uniksowy program szachowy rozpowszechniany w postaci
+¼ród³owej przez autora - Boba Hyatta. Program gra z si³± oko³o 2200 i
+czêsto wygrywa z GNU Chess na tym samym sprzêcie.
+
 %prep
-%setup -q -c -T -a 0
-%patch -p1
-cp ${SOURCE2} README
-cp ${SOURCE1} .
-cp ${SOURCE4} ${SOURCE5} .
-cp ${SOURCE3} . ; gzip -d start.pgn.gz
+%setup -q
+%patch0 -p1
+%patch1 -p1
+cp %{SOURCE2} README
+cp %{SOURCE1} .
+cp %{SOURCE4} %{SOURCE5} .
+cp %{SOURCE3} . 
+gzip -d start.pgn.gz
+
+%{__perl} -pi -e 's@.*machine/builtins.*@@' chess.h
 
 %build
-%{__make} linux-elf
-mkdir -p %{_prefix}/lib/games/crafty
-touch %{_prefix}/lib/games/crafty/book.lrn %{_prefix}/lib/games/crafty/position.{bin,lrn}
-./crafty << _END_
-books create start.pgn 60
-quit
-_END_
+asmobj=""
+optarch=""
+target="LINUX"
+%ifarch %{ix86}
+optarch="-DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B"
+asmobj="X86-elf.o"
+%endif
+%ifarch alpha
+target="ALPHA"
+%endif
+%{__make} crafty-make \
+       target="$target" \
+       CC="%{__cc}" \
+       CXX="%{__cxx}" \
+       CFLAGS="%{rpmcflags} -Wall -pipe -D_REENTRANT" \
+       LDFLAGS="%{rpmldflags} -lpthread" \
+       opt="-DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS $optarch -DFAST" \
+       asm="$asmobj"
+       
+#mkdir -p %{_prefix}/lib/games/crafty
+#touch %{_prefix}/lib/games/crafty/book.lrn %{_prefix}/lib/games/crafty/position.{bin,lrn}
+#./crafty << _END_
+#books create start.pgn 60
+#quit
+#_END_
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d %{_prefix}/lib/games/crafty
-install -m 02755 -g games crafty %{_bindir}/crafty
-install -m 0644 -g games books.bin %{_prefix}/lib/games/crafty/books.bin
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/games/crafty,%{_desktopdir},%{_pixmapsdir}}
+install crafty $RPM_BUILD_ROOT%{_bindir}
+install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}
+install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
+#install books.bin $RPM_BUILD_ROOT%{_libdir}/games/crafty
+#install -d %{_libdir}/games/crafty
+#install books.bin %{_libdir}/games/crafty/books.bin
+
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %post
 touch /usr/lib/games/crafty/book.lrn /usr/lib/games/crafty/position.{bin,lrn}
@@ -56,15 +97,11 @@ chgrp games /usr/lib/games/crafty/book.lrn \
 chmod g+w /usr/lib/games/crafty/book.lrn \
         /usr/lib/games/crafty/position.{bin,lrn}
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
 %defattr(644,root,root,755)
-%doc crafty.faq
-%doc crafty.doc.ascii
-%doc crafty.doc.ps
-%doc README
-%dir %{_prefix}/lib/games/crafty
+%doc crafty.faq crafty.doc.ascii crafty.doc.ps README
 %attr(755,root,root) %{_bindir}/crafty
-%{_prefix}/lib/games/crafty/books.bin
+%dir %{_libdir}/games/crafty
+#%{_libdir}/games/crafty/books.bin
+%{_desktopdir}/*
+%{_pixmapsdir}/*
This page took 0.0774 seconds and 4 git commands to generate.