]> git.pld-linux.org Git - packages/crafty.git/blame_incremental - crafty.spec
- drop obsolete files
[packages/crafty.git] / crafty.spec
... / ...
CommitLineData
1# TODO:
2# - update to 21.6
3# - executable should be sgid games?
4Summary: Superior chess program by Bob Hyatt for Unix systems
5Summary(pl.UTF-8): Jeden z lepszych programów szachowych dla uniksów autorstwa Boba Hyatta
6Name: crafty
7Version: 20.1
8Release: 1
9License: GPL
10Group: Applications/Games
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
21Patch0: %{name}-paths.patch
22Patch1: %{name}-Makefile.patch
23Patch2: %{name}-MDK.patch
24URL: http://www.limunltd.com/crafty/
25BuildRequires: libstdc++-devel
26Provides: chessprogram
27Provides: chess_backend
28Suggests: xboard
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%define specflags -fomit-frame-pointer
32
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
38%description -l pl.UTF-8
39Crafty to uniksowy program szachowy rozpowszechniany w postaci
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.
42
43%prep
44%setup -q -a5 -a6
45%patch0 -p1
46%patch1 -p1
47%patch2 -p0
48mv doc/read.me README
49mv doc/* .
50mv bitmaps/README.bitmaps .
51rm -f bitmaps/gifs.tar
52cp %{SOURCE1} %{SOURCE2} .
53
54%{__perl} -pi -e 's@.*machine/builtins.*@@' chess.h
55
56%build
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"
75
76sh make_books
77# use large opening book
78mv large_book.bin book.bin
79
80%install
81rm -rf $RPM_BUILD_ROOT
82install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man6,%{_desktopdir},%{_pixmapsdir}} \
83 $RPM_BUILD_ROOT{%{_datadir}/%{name}/{bitmaps,sound,tb},/var/lib/%{name}}
84
85install crafty $RPM_BUILD_ROOT%{_bindir}
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
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
105
106%clean
107rm -rf $RPM_BUILD_ROOT
108
109%files
110%defattr(644,root,root,755)
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
117%{_datadir}/%{name}/*.lrn
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
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*
128%{_desktopdir}/*.desktop
129%{_pixmapsdir}/*
This page took 0.070231 seconds and 4 git commands to generate.