Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > c51cf2e19353661a41c63e79c7a7cf23 > files > 9

w3m-0.5.2-11.mga1.src.rpm

# TODO add option to remove dependencies

%define gcversion gc6.3
%define Summary   Pager that can also be used as textbased webbrowser

Summary:        %{Summary}
Name:           w3m
Version:        0.5.2
Release:        %mkrel 11
Group:          Networking/WWW
License:        MIT-like
URL:            http://w3m.sourceforge.net/
Source0:        http://prdownloads.sourceforge.net/w3m/%{name}-%{version}.tar.gz
Source1:        http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/%{gcversion}.tar.gz
Source2:        w3mconfig
# let help handle japanese
Patch0:         w3m-0.4.1-helpcharset.patch
# statically with libgc
Patch1:         w3m-0.5.2-static-libgc.patch
# port to gcc4
Patch2:         w3m-0.5.1-gcc4.patch
# disable check for sys_errlist ( why ? )
Patch3:		w3m-0.5.2-syserror.patch
# fix string format error
Patch4:		w3m-0.5.2-literal.patch
# security fix 
Patch5:		w3m-CVE-2010-2074.patch
Provides:       webclient
BuildRequires:  gpm-devel
BuildRequires:	gtk+2-devel
BuildRequires:	libgdk_pixbuf2.0-devel
BuildRequires:  imlib2-devel
BuildRequires:  ncurses-devel
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig
BuildRequires:  termcap-devel
BuildRequires:  ungif-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}

%define _requires_exceptions        perl(w3mhelp-.*)

%description
W3m is a text-based web browser as well as a pager like `more' or
`less'. With w3m you can browse web pages through a terminal emulator
window (xterm, rxvt or something like that). Moreover, w3m can be used
as a text formatting tool which typesets HTML into plain text. w3m also
provides w3mman which is a great manpage browser.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1 -b .syserror
%patch4 -p1 -b .literal
%patch5 -p0 -b .CVE-2010-2074

rm -rf gc
tar xf %{SOURCE1}
mv %{gcversion} gc

%{__cp} -a %{SOURCE2} w3mconfig

%build
sed -i s/showaudio/mplayer/ config.h.in

(cd gc;
%{make} ABI_FLAG="%{optflags} -fPIC" gc.a
mkdir lib
ln -s ../gc.a lib/libgc.a
)

%{configure2_5x} \
                --with-browser=%{_bindir}/www-browser \
                --with-editor=%{_bindir}/vi \
                --with-mailer=/bin/mail \
                --with-termlib=ncurses \
                --enable-alarm \
                --enable-ansi-color \
                --enable-bgcolor \
                --enable-color \
                --enable-cookie \
                --enable-dict \
                --enable-digest-auth \
                --enable-external-uri-loader \
                --enable-gopher \
                --enable-help-cgi \
                --enable-history \
                --enable-image \
                --enable-ipv6 \
                --disable-japanese \
                --disable-kanjisymbols \
                --enable-keymap=w3m \
                --enable-menu \
                --enable-mouse \
                --enable-nntp \
                --enable-sslverify \
                --enable-w3mmailer \
                --disable-xface \
                --enable-m17n \
                --enable-unicode \
                --with-charset=UTF-8 \
                --with-gc=`pwd`/gc 

make

%install
rm -rf %{buildroot}

install -d %{buildroot}/{%{_bindir},{%{_datadir},%{_libdir}}/%{name},%{_mandir}/{,ja_JP.ujis}/man1}

%{makeinstall_std}

install -m0644 doc-jp/w3m.1 %{buildroot}/%{_mandir}/ja_JP.ujis/man1
install -m0644 doc/w3m.1 %{buildroot}/%{_mandir}/man1

install -d %{buildroot}%{_sysconfdir}/w3m
install -m0644 w3mconfig %{buildroot}%{_sysconfdir}/w3m/config

rm -rf %{buildroot}/%{_mandir}/ja*

%find_lang %{name}

%post
%update_menus

%postun
%clean_menus

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
%doc README doc doc-jp w3mhelp-lynx_*
%dir %{_sysconfdir}/w3m
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/w3m/config
%attr(0755,root,root) %{_bindir}/*
%{_libdir}/%{name}
%{_datadir}/%{name}
%{_mandir}/man1/*


%changelog
* Sun May 15 2011 pterjan <pterjan> 0.5.2-11.mga1
+ Revision: 99039
- Rebuild for fixed find-requires

* Sat Apr 30 2011 misc <misc> 0.5.2-10.mga1
+ Revision: 93814
- increase release to match the one of Mandriva
- document patches

* Sun Mar 06 2011 saispo <saispo> 0.5.2-1.mga1
+ Revision: 65219
- Fix imlib BuildRequires
- imported package w3m