gnugo/gnugo.spec

106 lines
3.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package gnugo (Version 3.8)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: gnugo
BuildRequires: emacs-x11 fdupes ncurses-devel xemacs
Url: http://www.gnu.org/software/gnugo/gnugo.html
License: GPL-3.0+
Group: Amusements/Games/Board/Other
Summary: Chinese Game "Go"
Version: 3.9.1
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: gnugo-%{version}.tar.bz2
Source1: suse-start-gnugo.el
Source2: xemacs-auto-autoloads.el
Patch0: xemacs.patch
Patch1: mouse-2-dont-insert-junk.patch
PreReq: %install_info_prereq
%description
Asian board game. /usr/share/doc/packages/gnugo
Authors:
--------
Man L. Li <manli@cs.uh.edu>
%prep
%setup -q
%patch0 -p 1
%patch1 -p 1
%build
%configure
make
pushd interface/xpms
emacs -batch --no-site-file \
-l ../make-xpms-file.el -f make-xpms-file gnugo-xpms.el *.xpm
popd
%install
%makeinstall
rm -f $RPM_BUILD_ROOT/usr/share/info/dir*
# GNU Emacs:
mkdir -p $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/gnugo
for i in $(find . -name "*.el")
do
emacs -no-site-file -q -batch -f batch-byte-compile $i
install -m 644 ${i} ${i}c \
$RPM_BUILD_ROOT/usr/share/emacs/site-lisp/gnugo
done
install -m 644 $RPM_SOURCE_DIR/suse-start-gnugo.el \
$RPM_BUILD_ROOT/usr/share/emacs/site-lisp
# XEmacs:
find . -name "*.elc" | xargs rm
mkdir -p $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/gnugo
for i in $(find . -name "*.el")
do
xemacs -no-site-file -q -batch -f batch-byte-compile $i
install -m 644 ${i} ${i}c \
$RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/gnugo
install -m 644 $RPM_SOURCE_DIR/xemacs-auto-autoloads.el \
$RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/gnugo/auto-autoloads.el
done
%fdupes $RPM_BUILD_ROOT/usr/share
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%files
%defattr(-,root,root)
%doc COPYING AUTHORS THANKS ChangeLog TODO README NEWS
%{_bindir}/*
/%_infodir/*
/%_mandir/man?/*
%dir %{_datadir}/emacs/site-lisp/gnugo/
%{_datadir}/emacs/site-lisp/gnugo/*
%{_datadir}/emacs/site-lisp/suse-start-gnugo.el
%dir %{_datadir}/xemacs/site-packages/
%dir %{_datadir}/xemacs/site-packages/lisp/
%dir %{_datadir}/xemacs/site-packages/lisp/gnugo/
%{_datadir}/xemacs/site-packages/lisp/gnugo/*
%changelog