1 |
Summary: A set of Solitaire type games for the X Window System |
2 |
Name: xpat2 |
3 |
Version: 1.07 |
4 |
Release: %mkrel 26 |
5 |
License: GPLv2+ |
6 |
Group: Games/Cards |
7 |
Source: ftp://sunsite.unc.edu/pub/Linux/games/solitaires/%{name}-%{version}-src.tar.bz2 |
8 |
Patch0: xpat2-fixes.patch |
9 |
Patch1: xpat2-1.07-lib64.patch |
10 |
Patch2: xpat2-1.07-gcc41.patch |
11 |
Patch3: xpat2-1.07-fix-str-fmt.patch |
12 |
BuildRequires: imake |
13 |
BuildRequires: qt3-devel |
14 |
BuildRequires: perl |
15 |
BuildRequires: libxpm-devel |
16 |
BuildRoot: %{_tmppath}/%{name}-%{version}-root |
17 |
Requires(pre): rpm-helper |
18 |
|
19 |
%description |
20 |
Xpat2 is a generic patience or Solitaire game for the X Window System. |
21 |
|
22 |
Xpat2 can be used with different rules sets, so it can be used to play |
23 |
Spider, Klondike, and other card games. |
24 |
|
25 |
%prep |
26 |
%setup -q |
27 |
%patch0 -p1 -b kk1 |
28 |
%patch1 -p1 -b .lib64 |
29 |
%patch2 -p0 -b .gcc41 |
30 |
%patch3 -p0 |
31 |
|
32 |
%build |
33 |
make clean |
34 |
%__rm -f src/moc* |
35 |
%__rm -f src/mqmaskedit.cpp |
36 |
%__rm -f src/mqhelpwin.cpp |
37 |
|
38 |
export PATH=%{_bindir}/X11:$PATH |
39 |
|
40 |
find -type f | xargs perl -pi -e "s|/var/games/|/var/lib/games/|g" |
41 |
perl -p -i -e "s|xmkmf &&||" Makefile |
42 |
cd src |
43 |
xmkmf |
44 |
perl -p -i -e "s|CXXDEBUGFLAGS = .*|CXXDEBUGFLAGS = $RPM_OPT_FLAGS|" Makefile |
45 |
perl -p -i -e "s|CDEBUGFLAGS = .*|CDEBUGFLAGS = $RPM_OPT_FLAGS|" Makefile |
46 |
# 1.0.7-1 |
47 |
perl -p -i -e "s|chown.*||" Makefile |
48 |
perl -p -i -e "s|-lqt|-lqt-mt|" Makefile |
49 |
perl -p -i -e "s|LN = ln -s|LN = echo|" Makefile |
50 |
make CDEBUGFLAGS="$RPM_OPT_FLAGS" CXXDEBUGFLAGS="$RPM_OPT_FLAGS" |
51 |
|
52 |
|
53 |
%install |
54 |
rm -rf %buildroot |
55 |
%makeinstall DESTDIR=%buildroot \ |
56 |
XPATROOT=%buildroot/usr/games/lib/xpat \ |
57 |
XPATMANDIR=%buildroot/usr/share/man/man6 \ |
58 |
APPDEFSDIR=%buildroot/usr/lib |
59 |
install -m 755 -d %buildroot%{_menudir} |
60 |
mkdir -p %buildroot/var/lib/games/ |
61 |
touch %buildroot/var/lib/games/xpat.log |
62 |
mkdir -p %{buildroot}%{_datadir}/applications |
63 |
cat > %{buildroot}%{_datadir}/applications/mageia-%{name}.desktop << EOF |
64 |
[Desktop Entry] |
65 |
Name=%{name} |
66 |
Comment=A set of Solitaire type games for the X Window System |
67 |
Exec=%{_bindir}/%{name} |
68 |
Icon=cards_section |
69 |
Terminal=false |
70 |
Type=Application |
71 |
StartupNotify=true |
72 |
Categories=Qt;Game;CardGame; |
73 |
EOF |
74 |
|
75 |
%post |
76 |
%create_ghostfile /var/lib/games/xpat.log root games 664 |
77 |
|
78 |
%clean |
79 |
rm -rf %buildroot |
80 |
|
81 |
%files |
82 |
%defattr(-,root,root) |
83 |
%dir %{_prefix}/games/lib/xpat |
84 |
%{_prefix}/games/lib/xpat/* |
85 |
%{_mandir}/man6/xpat2.6* |
86 |
%attr(2755, root, games) %{_prefix}/bin/xpat2 |
87 |
%{_prefix}/lib/*/app-defaults/XPat |
88 |
%{_datadir}/applications/mageia-%{name}.desktop |
89 |
%attr(664, root, games) %ghost /var/lib/games/xpat.log |