File urlview.spec of Package urlview

#
# spec file for package urlview
#
# Copyright (c) 2011 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:           urlview
Version:        0.9
Release:        717
License:        GPLv2+
Summary:        An URL extractor/viewer
Url:            ftp://ftp.mutt.org/pub/mutt/contrib/
Group:          Productivity/Networking/Web/Browsers
Source:         urlview-%{version}.tar.bz2
Source1:        skel.urlview
Patch0:         urlview-%{version}.dif
Patch1:         url_handler.diff
BuildRequires:  ncurses-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
urlview presents a menu of all URLs from a given text file (e.g., a
mail). The user may then view the information located on those URLs.

%prep
%setup -q
%patch0
%patch1

%__rm -rf regex/

%build
aclocal
automake -a --foreign
autoconf
%if 0%{?suse_version}
%{suse_update_config -f}
%endif
CC="%__cc" \
CFLAGS="-W -Wall -Wstrict-prototypes -Wpointer-arith %{optflags} -pipe -I. -D_GNU_SOURCE" \
%configure
%__make %{?_smp_flags}

%install
mkdir -p "%{buildroot}%{_sysconfdir}"
mkdir -p "%{buildroot}%{_mandir}/man1"
make DESTDIR=%{buildroot} install
%if 0%{?suse_version}
%__install -m 755 url_handler.sh.suse "%{buildroot}%{_bindir}/url_handler.sh"
%__install -m 644 urlview.conf.suse "%{buildroot}%{_sysconfdir}/urlview.conf"
%__install -D -m 644 "%{S:1}" "%{buildroot}%{_sysconfdir}/skel/.urlview"
%endif

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README
%if 0%{?suse_version}
%config(noreplace) %{_sysconfdir}/skel/.urlview
# maybe a user edits this...
%config %{_bindir}/url_handler.sh
%config %{_sysconfdir}/urlview.conf
%endif
%{_bindir}/urlview
%doc %{_mandir}/man1/urlview.1%{ext_man}

%changelog
openSUSE Build Service is sponsored by