]> git.pld-linux.org Git - packages/crafty.git/blob - crafty.spec
5695e86994f8b7c67d6d62c6dbc3177ec40a68a8
[packages/crafty.git] / crafty.spec
1 Summary:        Superior chess program by Bob Hyatt for Unix systems
2 Summary(pl):    Jeden z lepszych programów szachowych dla uniksów autorstwa Boba Hyatta
3 Name:           crafty
4 Version:        19.5
5 Release:        1
6 License:        GPL
7 Group:          Applications/Games
8 Source0:        ftp://ftp.cis.uab.edu/pub/hyatt/v19/%{name}-%{version}.tar.gz
9 # Source0-md5:  390ed8badcd30d16361eef415d2dada7
10 Source1:        ftp://ftp.cis.uab.edu/pub/hyatt/%{name}.faq
11 # NoSource1-md5: f744727e291b6dec7e7c69bb3586b6dd
12 Source2:        ftp://ftp.cis.uab.edu/pub/hyatt/read.me
13 # NoSource2-md5: ce9a5e014d23f36c2540628ba0dc1c0b
14 Source3:        ftp://ftp.cis.uab.edu/pub/hyatt/common/start.pgn.gz
15 # Source3-md5:  c3c54b29351408298e3c7548f4faed93
16 Source4:        ftp://ftp.cis.uab.edu/pub/hyatt/v18/%{name}.doc.ascii
17 # NoSource4-md5: 5fd73027a1de1674763562e1987197ba
18 Source5:        ftp://ftp.cis.uab.edu/pub/hyatt/doc/%{name}.doc.ps
19 # Source5-md5:  6cef69aa2f9ea1ceb74b6c14edc8291f
20 Source6:        %{name}.desktop
21 Source7:        xchess.png
22 Patch0:         %{name}-paths.patch
23 Patch1:         %{name}-Makefile.patch
24 Icon:           xchess.gif
25 BuildRequires:  libstdc++-devel
26 Provides:       chessprogram
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         specflags       -fomit-frame-pointer
30
31 %description
32 Crafty is a Unix chess program, distributed as source by its author,
33 Bob Hyatt. The program plays at about 2200 strength and frequently
34 beats GNU Chess on the same hardware.
35
36 %description -l pl
37 Crafty to uniksowy program szachowy rozpowszechniany w postaci
38 ¼ród³owej przez autora - Boba Hyatta. Program gra z si³± oko³o 2200 i
39 czêsto wygrywa z GNU Chess na tym samym sprzêcie.
40
41 %prep
42 %setup -q -c
43 %patch0 -p1
44 %patch1 -p1
45 cp %{SOURCE2} README
46 cp %{SOURCE1} .
47 cp %{SOURCE4} %{SOURCE5} .
48 cp %{SOURCE3} . 
49 gzip -d start.pgn.gz
50
51 %{__perl} -pi -e 's@.*machine/builtins.*@@' chess.h
52
53 %build
54 asmobj=""
55 optarch=""
56 target="LINUX"
57 %ifarch %{ix86}
58 optarch="-DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B"
59 asmobj="X86-elf.o"
60 %endif
61 %ifarch alpha
62 target="ALPHA"
63 %endif
64 %{__make} crafty-make \
65         target="$target" \
66         CC="%{__cc}" \
67         CXX="%{__cxx}" \
68         CFLAGS="%{rpmcflags} -Wall -pipe -D_REENTRANT" \
69         LDFLAGS="%{rpmldflags} -lpthread" \
70         opt="-DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS $optarch -DFAST" \
71         asm="$asmobj"
72         
73 #mkdir -p %{_prefix}/lib/games/crafty
74 #touch %{_prefix}/lib/games/crafty/book.lrn %{_prefix}/lib/games/crafty/position.{bin,lrn}
75 #./crafty << _END_
76 #books create start.pgn 60
77 #quit
78 #_END_
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/games/crafty,%{_desktopdir},%{_pixmapsdir}}
83 install crafty $RPM_BUILD_ROOT%{_bindir}
84 install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}
85 install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
86 #install books.bin $RPM_BUILD_ROOT%{_libdir}/games/crafty
87 #install -d %{_libdir}/games/crafty
88 #install books.bin %{_libdir}/games/crafty/books.bin
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %post
94 touch /usr/lib/games/crafty/book.lrn /usr/lib/games/crafty/position.{bin,lrn}
95 chgrp games /usr/lib/games/crafty/book.lrn \
96         /usr/lib/games/crafty/position.{bin,lrn}
97 chmod g+w /usr/lib/games/crafty/book.lrn \
98         /usr/lib/games/crafty/position.{bin,lrn}
99
100 %files
101 %defattr(644,root,root,755)
102 %doc crafty.faq crafty.doc.ascii crafty.doc.ps README
103 %attr(755,root,root) %{_bindir}/crafty
104 %dir %{_libdir}/games/crafty
105 #%{_libdir}/games/crafty/books.bin
106 %{_desktopdir}/*
107 %{_pixmapsdir}/*
This page took 0.076098 seconds and 2 git commands to generate.