1 |
# TODO add option to remove dependencies |
2 |
|
3 |
%define gcversion gc6.3 |
4 |
%define Summary Pager that can also be used as textbased webbrowser |
5 |
|
6 |
Summary: %{Summary} |
7 |
Name: w3m |
8 |
Version: 0.5.3 |
9 |
Release: %mkrel 1 |
10 |
Group: Networking/WWW |
11 |
License: MIT-like |
12 |
URL: http://w3m.sourceforge.net/ |
13 |
Source0: http://prdownloads.sourceforge.net/w3m/%{name}-%{version}.tar.gz |
14 |
Source1: http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/%{gcversion}.tar.gz |
15 |
Source2: w3mconfig |
16 |
# let help handle japanese |
17 |
Patch0: w3m-0.4.1-helpcharset.patch |
18 |
# statically with libgc |
19 |
Patch1: w3m-0.5.3-static-libgc.patch |
20 |
# port to gcc4 |
21 |
Patch2: w3m-0.5.1-gcc4.patch |
22 |
# fix string format error |
23 |
Patch4: w3m-0.5.2-literal.patch |
24 |
Provides: webclient |
25 |
BuildRequires: gpm-devel |
26 |
BuildRequires: gtk+2-devel |
27 |
BuildRequires: libgdk_pixbuf2.0-devel |
28 |
BuildRequires: imlib2-devel |
29 |
BuildRequires: ncurses-devel |
30 |
BuildRequires: openssl-devel |
31 |
BuildRequires: pkgconfig |
32 |
BuildRequires: termcap-devel |
33 |
BuildRequires: ungif-devel |
34 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} |
35 |
|
36 |
%define _requires_exceptions perl(w3mhelp-.*) |
37 |
|
38 |
%description |
39 |
W3m is a text-based web browser as well as a pager like `more' or |
40 |
`less'. With w3m you can browse web pages through a terminal emulator |
41 |
window (xterm, rxvt or something like that). Moreover, w3m can be used |
42 |
as a text formatting tool which typesets HTML into plain text. w3m also |
43 |
provides w3mman which is a great manpage browser. |
44 |
|
45 |
%prep |
46 |
%setup -q |
47 |
%patch0 -p1 |
48 |
%patch1 -p1 |
49 |
%patch2 -p1 |
50 |
%patch4 -p1 -b .literal |
51 |
|
52 |
rm -rf gc |
53 |
tar xf %{SOURCE1} |
54 |
mv %{gcversion} gc |
55 |
|
56 |
%{__cp} -a %{SOURCE2} w3mconfig |
57 |
|
58 |
%build |
59 |
sed -i s/showaudio/mplayer/ config.h.in |
60 |
|
61 |
(cd gc; |
62 |
%{make} ABI_FLAG="%{optflags} -fPIC" gc.a |
63 |
mkdir lib |
64 |
ln -s ../gc.a lib/libgc.a |
65 |
) |
66 |
|
67 |
%{configure2_5x} \ |
68 |
--with-browser=%{_bindir}/www-browser \ |
69 |
--with-editor=%{_bindir}/vi \ |
70 |
--with-mailer=/bin/mail \ |
71 |
--with-termlib=ncurses \ |
72 |
--enable-alarm \ |
73 |
--enable-ansi-color \ |
74 |
--enable-bgcolor \ |
75 |
--enable-color \ |
76 |
--enable-cookie \ |
77 |
--enable-dict \ |
78 |
--enable-digest-auth \ |
79 |
--enable-external-uri-loader \ |
80 |
--enable-gopher \ |
81 |
--enable-help-cgi \ |
82 |
--enable-history \ |
83 |
--enable-image \ |
84 |
--enable-ipv6 \ |
85 |
--disable-japanese \ |
86 |
--disable-kanjisymbols \ |
87 |
--enable-keymap=w3m \ |
88 |
--enable-menu \ |
89 |
--enable-mouse \ |
90 |
--enable-nntp \ |
91 |
--enable-sslverify \ |
92 |
--enable-w3mmailer \ |
93 |
--disable-xface \ |
94 |
--enable-m17n \ |
95 |
--enable-unicode \ |
96 |
--with-charset=UTF-8 \ |
97 |
--with-gc=`pwd`/gc |
98 |
|
99 |
make |
100 |
|
101 |
%install |
102 |
rm -rf %{buildroot} |
103 |
|
104 |
install -d %{buildroot}/{%{_bindir},{%{_datadir},%{_libdir}}/%{name},%{_mandir}/{,ja_JP.ujis}/man1} |
105 |
|
106 |
%{makeinstall_std} |
107 |
|
108 |
install -m0644 doc-jp/w3m.1 %{buildroot}/%{_mandir}/ja_JP.ujis/man1 |
109 |
install -m0644 doc/w3m.1 %{buildroot}/%{_mandir}/man1 |
110 |
|
111 |
install -d %{buildroot}%{_sysconfdir}/w3m |
112 |
install -m0644 w3mconfig %{buildroot}%{_sysconfdir}/w3m/config |
113 |
|
114 |
rm -rf %{buildroot}/%{_mandir}/ja* |
115 |
|
116 |
%find_lang %{name} |
117 |
|
118 |
%post |
119 |
%update_menus |
120 |
|
121 |
%postun |
122 |
%clean_menus |
123 |
|
124 |
%clean |
125 |
rm -rf %{buildroot} |
126 |
|
127 |
%files -f %{name}.lang |
128 |
%defattr(-,root,root) |
129 |
%doc README doc doc-jp w3mhelp-lynx_* |
130 |
%dir %{_sysconfdir}/w3m |
131 |
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/w3m/config |
132 |
%attr(0755,root,root) %{_bindir}/* |
133 |
%{_libdir}/%{name} |
134 |
%{_datadir}/%{name} |
135 |
%{_mandir}/man1/* |