# vim: set sw=4 ts=4 et nu: Name: perl-Browser-Open Version: 0.03 Release: 0 Summary: Open a browser in a given URL Source: http://search.cpan.org/CPAN/authors/id/M/ME/MELO/Browser-Open-%{version}.tar.gz URL: http://search.cpan.org/dist/Browser-Open Group: Development/Libraries/Perl License: Perl License BuildRoot: %{_tmppath}/build-%{name}-%{version} %{perl_requires} BuildRequires: perl-macros BuildRequires: make BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::More) >= 0.92 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}