File w3m.spec of Package w3m

#
# spec file for package w3m (Version 0.5.2)
#
# 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:           w3m
BuildRequires:  gcc-c++ gpm imlib2-devel ncurses-devel openssl-devel pkgconfig
Url:            http://w3m.sourceforge.net/
Version:        0.5.2
Release:        128.<RELEASE7>
Summary:        A text-based WWW browser
License:        BSD 3-Clause; X11/MIT
Group:          Productivity/Networking/Web/Browsers
Provides:       w3m_ssl web_browser
Obsoletes:      w3m_ssl
Source0:        http://prdownloads.sourceforge.net/w3m/w3m-%version.tar.bz2
Source1:        gc6.6.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch0:         w3m-disable-cookie-special-domain-check.patch
Patch1:         w3m-0.4.1-textarea-segfault.dif
Patch2:         w3m-0.4.1-session-mgmt.dif
Patch3:         w3m-helppaths.patch
Patch4:         w3m-inline-image.patch
Patch5:         w3m-uninitialized.patch
Patch6:         w3m-0.5.1-no-ASCII-equivalents-by-default.patch
Patch7:         w3m-tempdir-override.patch
Patch8:         w3m-parsetagx-crash.patch
Patch9:         w3m-history-crossdev.patch
Patch10:        gc-gcc4.patch
Patch11:        gc-configure.patch
Patch12:        w3m-CVE-2010-2074.patch
Patch13:        w3m-ssl-verify.patch

%package inline-image
License:        BSD 3-Clause; X11/MIT
Summary:        An inline image extension for w3m
Group:          Productivity/Networking/Web/Browsers
Requires:       w3m imlib2-loaders
Provides:       w3m:/usr/%_lib/w3m/w3mimgdisplay

%description
W3m is a pager and text-based WWW browser. It has a number of useful
features:

* w3m can render tables

* w3m can render frames (it converts the frames into a table)

* SSL support

* w3m can easily display documents from standard input

* w3m can handle cookies

* w3m is small

* w3m has mouse support

If w3m-inline-image is installed it can display graphics inside
terminals, even on the console on some platforms.



Authors:
--------
    Akinori Ito <aito@ei5sun.yz.yamagata-u.ac.jp>
    Hans-J. Boehm <boehm@acm.org>
    many other contributors, see /usr/share/doc/packages/w3m/gc/README

%description inline-image
Inline image extension for w3m, the text-based WWW browser.

When this package is installed w3m can display images inline in an X
terminal (if it runs in a graphical X Window System environment).

See http://www2u.biglobe.ne.jp/%7Ehsaka/w3m/index.html#js for a demo.



Authors:
--------
    Akinori Ito <aito@ei5sun.yz.yamagata-u.ac.jp>
    Hans-J. Boehm <boehm@acm.org>
    many other contributors, see /usr/share/doc/packages/w3m/gc/README

%prep
%setup -q -b 1
%patch0 -p1
%patch1 -p1
%patch2
%patch3 -p1
%patch4
%patch5
%patch6
%patch7 -p1
%patch8 -p1
%patch9 -p1
pushd ../gc*
%patch10
%patch11
popd
%patch12
%patch13

%build
export CFLAGS="$RPM_OPT_FLAGS -DUSE_BUFINFO -fno-strict-aliasing"
pushd ../gc*
./configure --prefix=/usr --disable-shared --disable-threads
make
make install DESTDIR=$RPM_BUILD_DIR/gc_install
popd
./configure	--bindir=/usr/bin \
		--mandir=%_mandir \
		--libdir=%_libdir \
		--libexecdir=%_libdir \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-ipv6 \
		--enable-alarm \
		--enable-ansi-color \
		--enable-digest-auth \
		--enable-external-uri-loader \
		--enable-gopher \
		--enable-history \
		--enable-image=x11,fb \
		--enable-keymap=lynx \
		--enable-m17n \
		--enable-mouse \
		--enable-nls \
		--enable-nntp \
		--enable-sslverify \
		--enable-unicode \
		--disable-w3mmailer \
		--with-gc=$RPM_BUILD_DIR/gc_install/usr
make HELP_DIR="%_defaultdocdir/%name"

%install
make install DESTDIR=$RPM_BUILD_ROOT HELP_DIR="%_defaultdocdir/%name"
install -m 755 Bonus/*.cgi $RPM_BUILD_ROOT/usr/%_lib/w3m/cgi-bin
%find_lang %{name}

%files -f %{name}.lang
%defattr(-,root,root)
/usr/bin/w3m
/usr/bin/w3mman
%dir /usr/%_lib/w3m/
/usr/%_lib/w3m/inflate
%dir /usr/%_lib/w3m/cgi-bin
/usr/%_lib/w3m/cgi-bin/w3mbookmark
/usr/%_lib/w3m/cgi-bin/w3mhelperpanel
/usr/%_lib/w3m/xface2xpm
/usr/%_lib/w3m/cgi-bin/2ch.cgi
/usr/%_lib/w3m/cgi-bin/backslash_to_slash.cgi
/usr/%_lib/w3m/cgi-bin/dirlist.cgi
/usr/%_lib/w3m/cgi-bin/goodict.cgi
/usr/%_lib/w3m/cgi-bin/google.cgi
/usr/%_lib/w3m/cgi-bin/multipart.cgi
/usr/%_lib/w3m/cgi-bin/smb.cgi
/usr/%_lib/w3m/cgi-bin/utf8.cgi
/usr/%_lib/w3m/cgi-bin/w3mhelp.cgi
/usr/%_lib/w3m/cgi-bin/w3mmail.cgi
/usr/%_lib/w3m/cgi-bin/w3mman2html.cgi
%lang(ja) %_mandir/ja
%_mandir/man1/w3mman.1.gz
%_mandir/man1/w3m.1.gz
%_defaultdocdir/w3m

%files inline-image
%defattr(-,root,root)
/usr/%_lib/w3m/w3mimgdisplay

%changelog
openSUSE Build Service is sponsored by