File emacs-w3.spec of Package emacs-w3

#
# spec file for package emacs-w3
#
# Copyright (c) 2012 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/
#



Name:           emacs-w3
BuildRequires:  emacs-nox
%define short_name w3
License:        GPL-2.0+
Group:          Productivity/Editors/Emacs
Provides:       w3 emacs_w3
Obsoletes:      emacs_w3
Requires:       emacs
Summary:        Emacs/W3--a WWW Browser for Emacs
Version:        cvs
Release:        794
# Original source: ftp://ftp.xemacs.org/pub/xemacs/emacs-w3/w3-4.0pre.46.tar.gz
#+ Source: ftp://ftp.xemacs.org/pub/xemacs/emacs-w3/w3-%{version}.tar.bz2
# CVS: :pserver:anoncvs@subversions.gnu.org:/cvs
# tar cjvf emacs-w3-cvs.tar.bz2 --exclude='*CVS*' --exclude='*.elc' w3
Source:         emacs-w3-cvs.tar.bz2
Source1:        suse-start-w3.el
Source2:        %{name}-README.SuSE
Patch0:         emacs_w3.dif
Patch1:         backquote.diff
# http://www.teu.ac.jp/nsit/%7Eyatagawa/comp/emacs/w3-4.0pre.46-mule-sysdp.el.patch
Patch2:         w3-4.0pre.46-mule-sysdp.el.patch
# http://article.gmane.org/gmane.emacs.devel/60013
Patch3:         w3-fetch-callback.diff
Patch4:         flavour.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
PreReq:         %install_info_prereq

%description
A Web browser for Emacs implemented in Emacs Lisp.

%define INSTALL install -m755 -s
%define INSTALL_SCRIPT install -m755
%define INSTALL_DIR install -d -m755
%define INSTALL_DATA install -m644

%prep
%setup0 -n %{short_name}
cp -p %{SOURCE1} .
cp -p %{SOURCE2} README.SuSE
%patch0 -p1
%patch1
# %patch2 -p0
%patch3
%patch4
# autoconf

%build
EMACS_VERSION=$(emacs --no-site --batch --eval \
  '(princ (format "%s.%s" emacs-major-version emacs-minor-version)))')
%configure \
            --with-lispdir=%{_prefix}/share/emacs/site-lisp/%{short_name} \
            --datadir=%{_prefix}/share/emacs/%{short_name}
rm -f lisp/*elc
make %{?_smp_mflags}

%install
make install prefix="$RPM_BUILD_ROOT%{_prefix}" \
     infodir="$RPM_BUILD_ROOT%{_infodir}" \
     lispdir="$RPM_BUILD_ROOT%{_prefix}/share/emacs/site-lisp/%{short_name}" \
     datadir="$RPM_BUILD_ROOT%{_prefix}/share/emacs/%{short_name}"
%{INSTALL_DATA} suse-start-%{short_name}.el \
     $RPM_BUILD_ROOT%{_prefix}/share/emacs/site-lisp/suse-start-%{short_name}.el

%post
%install_info --info-dir=%{_infodir} %{_infodir}/w3.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/w3.info.gz

%files
%defattr(-, root, root)
%doc BUGS INSTALL HOWTO README TODO
%doc contrib
%doc dot.emacs
%config %{_prefix}/share/emacs/site-lisp/suse-start-%{short_name}.el
%{_prefix}/share/emacs/site-lisp/%{short_name}
%{_infodir}/%{short_name}*
%{_prefix}/share/emacs/%{short_name}

%changelog
openSUSE Build Service is sponsored by