]> git.pld-linux.org Git - packages/crafty.git/blame - crafty.spec
- drop obsolete files
[packages/crafty.git] / crafty.spec
CommitLineData
cc87d8c6
PG
1# TODO:
2# - update to 21.6
841018d0 3# - executable should be sgid games?
0bdae430 4Summary: Superior chess program by Bob Hyatt for Unix systems
0c54837b 5Summary(pl.UTF-8): Jeden z lepszych programów szachowych dla uniksów autorstwa Boba Hyatta
03aaaa84 6Name: crafty
cc87d8c6 7Version: 20.1
841018d0 8Release: 1
03aaaa84 9License: GPL
8d214343 10Group: Applications/Games
cc87d8c6
PG
11Source0: ftp://ftp.cis.uab.edu/pub/hyatt/source/%{name}-%{version}.zip
12# Source0-md5: 1d88571c150544c3ed25247127bfc5bd
13Source1: ftp://ftp.cis.uab.edu/pub/hyatt/documentation/%{name}.doc.ascii
14# NoSource1-md5: 5fd73027a1de1674763562e1987197ba
15Source2: ftp://ftp.cis.uab.edu/pub/hyatt/documentation/%{name}.doc.ps
16# Source2-md5: 6cef69aa2f9ea1ceb74b6c14edc8291f
17Source3: %{name}.desktop
18Source4: xchess.png
19Source5: %{name}-misc.tar.bz2
20Source6: %{name}-bitmaps.tar.gz
03aaaa84 21Patch0: %{name}-paths.patch
308b988a 22Patch1: %{name}-Makefile.patch
cc87d8c6 23Patch2: %{name}-MDK.patch
33f0447b 24URL: http://www.limunltd.com/crafty/
d916a975 25BuildRequires: libstdc++-devel
8d214343 26Provides: chessprogram
cc87d8c6
PG
27Provides: chess_backend
28Suggests: xboard
308b988a 29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
03aaaa84 30
d916a975
JB
31%define specflags -fomit-frame-pointer
32
03aaaa84 33%description
34Crafty is a Unix chess program, distributed as source by its author,
35Bob Hyatt. The program plays at about 2200 strength and frequently
36beats GNU Chess on the same hardware.
37
143745c6 38%description -l pl.UTF-8
0bdae430 39Crafty to uniksowy program szachowy rozpowszechniany w postaci
143745c6
JR
40źródłowej przez autora - Boba Hyatta. Program gra z siłą około 2200 i
41często wygrywa z GNU Chess na tym samym sprzęcie.
0bdae430 42
03aaaa84 43%prep
cc87d8c6 44%setup -q -a5 -a6
d916a975
JB
45%patch0 -p1
46%patch1 -p1
cc87d8c6
PG
47%patch2 -p0
48mv doc/read.me README
49mv doc/* .
50mv bitmaps/README.bitmaps .
51rm -f bitmaps/gifs.tar
52cp %{SOURCE1} %{SOURCE2} .
03aaaa84 53
d916a975
JB
54%{__perl} -pi -e 's@.*machine/builtins.*@@' chess.h
55
03aaaa84 56%build
d916a975
JB
57asmobj=""
58optarch=""
59target="LINUX"
60%ifarch %{ix86}
61optarch="-DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B"
62asmobj="X86-elf.o"
63%endif
64%ifarch alpha
65target="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"
0ced2efe 75
cc87d8c6
PG
76sh make_books
77# use large opening book
78mv large_book.bin book.bin
03aaaa84 79
80%install
81rm -rf $RPM_BUILD_ROOT
cc87d8c6 82install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man6,%{_desktopdir},%{_pixmapsdir}} \
841018d0 83 $RPM_BUILD_ROOT{%{_datadir}/%{name}/{bitmaps,sound,tb},/var/lib/%{name}}
cc87d8c6 84
308b988a 85install crafty $RPM_BUILD_ROOT%{_bindir}
cc87d8c6
PG
86install xcrafty $RPM_BUILD_ROOT%{_bindir}
87install speak $RPM_BUILD_ROOT%{_bindir}/crafty-speak
88
89install book.bin books.bin crafty.hlp $RPM_BUILD_ROOT%{_datadir}/%{name}
90install bitmaps/* $RPM_BUILD_ROOT%{_datadir}/%{name}/bitmaps
91install tb/*.emd $RPM_BUILD_ROOT%{_datadir}/%{name}/tb
92
93install crafty.6 $RPM_BUILD_ROOT%{_mandir}/man6
94echo ".so crafty.6" > $RPM_BUILD_ROOT%{_mandir}/man6/xcrafty.6
95
96install %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
97install %{SOURCE4} $RPM_BUILD_ROOT%{_pixmapsdir}
98
841018d0
PG
99touch $RPM_BUILD_ROOT/var/lib/%{name}/book.lrn \
100 $RPM_BUILD_ROOT/var/lib/%{name}/position.{bin,lrn}
101
102for file in book.lrn position.{bin,lrn}; do
103 ln -s /var/lib/%{name}/$file $RPM_BUILD_ROOT%{_datadir}/%{name}/$file
104done
0bdae430
JB
105
106%clean
107rm -rf $RPM_BUILD_ROOT
03aaaa84 108
03aaaa84 109%files
110%defattr(644,root,root,755)
cc87d8c6
PG
111%doc crafty.doc* crafty.faq README* small.txt start.pgn tournament.howto
112%attr(755,root,root) %{_bindir}/crafty*
113%attr(755,root,root) %{_bindir}/xcrafty
114%dir %{_datadir}/%{name}
115%{_datadir}/%{name}/*.bin
116%{_datadir}/%{name}/*.hlp
841018d0 117%{_datadir}/%{name}/*.lrn
cc87d8c6
PG
118%dir %{_datadir}/%{name}/bitmaps
119%{_datadir}/%{name}/bitmaps/*.bm
120%{_datadir}/%{name}/bitmaps/*.gif
121%dir %{_datadir}/%{name}/tb
122%{_datadir}/%{name}/tb/*.emd
841018d0
PG
123%dir /var/lib/%{name}
124%attr(660,root,games) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/book.lrn
125%attr(660,root,games) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/position.bin
126%attr(660,root,games) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/position.lrn
127%{_mandir}/man6/*.6*
cae2c2a0 128%{_desktopdir}/*.desktop
612cba0b 129%{_pixmapsdir}/*
This page took 0.084889 seconds and 4 git commands to generate.