File elinks.spec of Package elinks

# norootforbuild
#
Name:           elinks
Version:        0.11.995
Release:        0
%define pkg_version 0.12pre5
#
License:        GPL
Group:          Productivity/Networking/Web/Browsers
#
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  libidn-devel openssl-devel python-devel ruby-devel gmp-devel zlib-devel
BuildRequires:  libbz2-devel libexpat-devel
BuildRequires:  guile-devel
#
Url:            http://elinks.or.cz/
Source:         http://elinks.or.cz/download/elinks-%{pkg_version}.tar.bz2
#
Summary:        An advanced and well-established feature-rich text mode web browser
%description
ELinks is an advanced and well-established feature-rich text mode web
(HTTP/FTP/..) browser. ELinks can render both frames and tables, is highly
customizable and can be extended via Lua or Guile scripts. It is very portable
and runs on a variety of platforms. Check the about page for a more complete
description.

%prep
%setup -n elinks-%{pkg_version}

%build
#./autogen.sh
export CFLAGS="%{optflags} -fstack-protector -I/usr/include/js/"
export LIBS="-lm" # for spidermonkey
%configure \
    --enable-nntp \
    --enable-cgi \
    --enable-gopher \
    --enable-finger \
    --enable-exmode \
    --enable-html-highlight \
    --enable-88-colors \
    --enable-256-colors \
    --enable-leds \
    --with-idn \
    --without-lua \
    --with-perl \
    --with-ruby \
    --without-guile \
    --with-python \
    --without-see \
    --with-xterm \
    --enable-bittorrent
%{__make}

%install
%makeinstall
%{__rm} -f %{buildroot}%{_datadir}/locale/locale.alias
%find_lang %{name}
#
%define _pkgdocdir %{buildroot}%{_docdir}/%{name}
%{__install} -Dd -m 0755 %{_pkgdocdir}/scripts
%{__cp} -r                                                                 \
        ABOUT-NLS AUTHORS BUGS ChangeLog COPYING INSTALL NEWS README       \
        features.* SITES THANKS TODO doc/*.txt doc/html                    \
        contrib/*.conf contrib/*.vim contrib/*.css contrib/TIPS-AND-TRICKS \
    %{_pkgdocdir}
%{__install} -m 0644 contrib/wipe-out-ssl* contrib/conv/* \
    %{_pkgdocdir}/scripts/
for lang in perl python guile ruby lua ; do
    %{__install} -Dd -m 0755 %{_pkgdocdir}/${lang}
    %{__install} -m 0644 contrib/${lang}/* \
        %{_pkgdocdir}/${lang}/
done

%clean
%{__rm} -rf %{buildroot};

%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/%{name}
%{_mandir}/man?/%{name}*
%doc %{_docdir}/%{name}

%changelog
openSUSE Build Service is sponsored by