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