]> git.pld-linux.org Git - packages/crafty.git/blob - crafty.spec
120ca264d70c9a382d78ca6903b9acf4f0ccd4c8
[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 URL:            http://www.limunltd.com/crafty/
28 BuildRequires:  libstdc++-devel
29 Provides:       chessprogram
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         specflags       -fomit-frame-pointer
33
34 %description
35 Crafty is a Unix chess program, distributed as source by its author,
36 Bob Hyatt. The program plays at about 2200 strength and frequently
37 beats GNU Chess on the same hardware.
38
39 %description -l pl
40 Crafty to uniksowy program szachowy rozpowszechniany w postaci
41 ¼ród³owej przez autora - Boba Hyatta. Program gra z si³± oko³o 2200 i
42 czêsto wygrywa z GNU Chess na tym samym sprzêcie.
43
44 %prep
45 %setup -q -c
46 %patch0 -p1
47 %patch1 -p1
48 cp %{SOURCE2} README
49 cp %{SOURCE1} .
50 cp %{SOURCE4} %{SOURCE5} .
51 cp %{SOURCE3} . 
52 gzip -d start.pgn.gz
53
54 %{__perl} -pi -e 's@.*machine/builtins.*@@' chess.h
55
56 %build
57 asmobj=""
58 optarch=""
59 target="LINUX"
60 %ifarch %{ix86}
61 optarch="-DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B"
62 asmobj="X86-elf.o"
63 %endif
64 %ifarch alpha
65 target="ALPHA"
66 %endif
67 %{__make} crafty-make \
68         target="$target" \
69         CC="%{__cc}" \
70         CXX="%{__cxx}" \
71         CFLAGS="%{rpmcflags} -Wall -pipe -D_REENTRANT" \
72         LDFLAGS="%{rpmldflags} -lpthread" \
73         opt="-DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS $optarch -DFAST" \
74         asm="$asmobj"
75         
76 #mkdir -p %{_prefix}/lib/games/crafty
77 #touch %{_prefix}/lib/games/crafty/book.lrn %{_prefix}/lib/games/crafty/position.{bin,lrn}
78 #./crafty << _END_
79 #books create start.pgn 60
80 #quit
81 #_END_
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/games/crafty,%{_desktopdir},%{_pixmapsdir}}
86 install crafty $RPM_BUILD_ROOT%{_bindir}
87 install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}
88 install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
89 #install books.bin $RPM_BUILD_ROOT%{_libdir}/games/crafty
90 #install -d %{_libdir}/games/crafty
91 #install books.bin %{_libdir}/games/crafty/books.bin
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %post
97 touch /usr/lib/games/crafty/book.lrn /usr/lib/games/crafty/position.{bin,lrn}
98 chgrp games /usr/lib/games/crafty/book.lrn \
99         /usr/lib/games/crafty/position.{bin,lrn}
100 chmod g+w /usr/lib/games/crafty/book.lrn \
101         /usr/lib/games/crafty/position.{bin,lrn}
102
103 %files
104 %defattr(644,root,root,755)
105 %doc crafty.faq crafty.doc.ascii crafty.doc.ps README
106 %attr(755,root,root) %{_bindir}/crafty
107 %dir %{_libdir}/games/crafty
108 #%{_libdir}/games/crafty/books.bin
109 %{_desktopdir}/*
110 %{_pixmapsdir}/*
This page took 0.060287 seconds and 3 git commands to generate.