File netmaj.spec of Package netmaj

Summary: Network Mahjong
Summary(ja_JP.utf8): ネットワーク対戦麻雀
Name: netmaj
Version: 2.0.7
Release: 1
Group: Amusements/Games
License: GPL
Source0: http://www.sfc.wide.ad.jp/~kusune/netmaj/files/%{name}-%{version}.tar.gz
Source1: http://www.sfc.wide.ad.jp/~kusune/netmaj/files/%{name}-xui-%{version}.tar.gz
Patch0: netmaj-2.0.7-turbolinux.patch
Patch1: netmaj-2.0.7-build.patch
URL: http://www.sfc.wide.ad.jp/~kusune/netmaj/
BuildRequires: xorg-x11-devel
BuildRequires: libXpm-devel
BuildRequires: ncurses-devel
BuildRequires: termcap
BuildRequires: imake

%description
network mahjong game.

%description -l ja_JP.utf8
ひとり遊びやネットワーク対戦が可能な麻雀です。
X 上やコンソール上で動作します。

%prep
%setup -q -n %{name} -a1
%patch0 -p1 -b .turbolinux
%patch1 -p1 -b .build

%build
#make libs
export LDFLAGS="-L/usr/%{_lib}/termcap -L/usr/%{_lib}/curses"
cd xui
xmkmf
cd ..
make

%install
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/%{name}
make install PREFIX=${RPM_BUILD_ROOT}
make install-pf PREFIX=${RPM_BUILD_ROOT}
%ifarch x86_64
mv ${RPM_BUILD_ROOT}/usr/lib ${RPM_BUILD_ROOT}/usr/lib64
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc COPYING.j DEVELOPMENT.j INPUT.j LOCALRULE.j
%doc PLAYING.j PLVIEW.j PROXY.j README.j THANKS.j TUNE.j WANTED.j
%doc html/
%{_bindir}/*
%{_libdir}/%{name}

%changelog
* Fri May 23 2014 y.kobayashi
- Rebuild for openSUSE
* Tue Jan 14 2014 Huaren Zhong <huaren.zhong@gmail.com> - 2.0.7
- Rebuild for Fedora
* Wed Oct  8 2003 Noriyuki Suzuki <noriyuki@turbolinux.co.jp>
- Initial build for Turbolinux