File perl-Browser-Open.spec of Package perl-Browser-Open

# vim: set sw=4 ts=4 et nu:
#
# spec file for package perl-Browser-Open
#
# 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:           perl-Browser-Open
Version:        0.03
Release:        0
Summary:        Open a browser in a given URL
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
Source:         http://search.cpan.org/CPAN/authors/id/M/ME/MELO/Browser-Open-%{version}.tar.gz
Url:            http://search.cpan.org/dist/Browser-Open
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires:  make
BuildRequires:  perl-macros
BuildRequires:  perl(ExtUtils::MakeMaker)
%if 0%{?suse_version} == 0 || 0%{?suse_version} >= 1120
BuildRequires:  perl(Test::More) >= 0.92
%endif
BuildRequires:  perl(parent)
Requires:       perl(parent)
Requires:       xdg-utils
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif

%description
The functions optionaly exported by this module allows you to open URLs in
the user browser.
A set of known commands per OS-name is tested for presence, and the first
one found is executed. With an optional parameter, all known commands are
checked.
The "open_browser" uses the "system()" function to execute the command. If
you want more control, you can get the command with the "open_browser_cmd"
or "open_browser_cmd_all" functions and then use whatever method you want
to execute it.

%prep
%setup -q -n "Browser-Open-%{version}"
%__sed -i '/^auto_install/d' Makefile.PL

%build
%__perl Makefile.PL PREFIX="%{_prefix}"
%__make %{?jobs:-j%{jobs}}

%install
%perl_make_install

%__rm "%{buildroot}%{perl_vendorlib}/Browser"/*.tmp

%perl_process_packlist

%if 0%{?suse_version} == 0 || 0%{?suse_version} >= 1120
%check
%__make test
%endif

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

%files
%defattr(-,root,root)
%doc Changes LICENSE README
%dir %{perl_vendorlib}/Browser
%{perl_vendorlib}/Browser/Open.pm
%doc %{perl_man3dir}/Browser::Open.%{perl_man3ext}%{ext_man}

%changelog
openSUSE Build Service is sponsored by