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

Name:           urlview
Version:        0.9
Release:        717
License:        GPLv2+
Summary:        An URL extractor/viewer
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

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.

%setup -q

%__rm -rf regex/

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

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

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

%if 0%{?suse_version}
%config(noreplace) %{_sysconfdir}/skel/.urlview
# maybe a user edits this...
%config %{_bindir}/
%config %{_sysconfdir}/urlview.conf
%doc %{_mandir}/man1/urlview.1%{ext_man}

openSUSE Build Service is sponsored by