2016-03-18 21:34:33 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-Socket
|
|
|
|
#
|
2025-06-29 06:47:27 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2016-03-18 21:34:33 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-03-01 07:38:52 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-03-18 21:34:33 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-01-06 11:00:29 +00:00
|
|
|
%define cpan_name Socket
|
2016-03-18 21:34:33 +00:00
|
|
|
Name: perl-Socket
|
2025-07-20 05:23:59 +00:00
|
|
|
Version: 2.040
|
2016-08-03 11:49:17 +00:00
|
|
|
Release: 0
|
2019-03-01 07:38:52 +00:00
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
2022-05-06 14:09:13 +00:00
|
|
|
Summary: Networking constants and support functions
|
2020-07-08 13:18:00 +00:00
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
2025-06-29 06:47:27 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
|
2016-08-03 11:49:17 +00:00
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:17:07 +02:00
|
|
|
Source100: README.md
|
2016-03-18 21:34:33 +00:00
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
|
|
|
BuildRequires: perl(ExtUtils::CBuilder)
|
|
|
|
BuildRequires: perl(ExtUtils::Constant) >= 0.23
|
2016-08-03 11:49:17 +00:00
|
|
|
%{perl_requires}
|
2016-03-18 21:34:33 +00:00
|
|
|
|
|
|
|
%description
|
2016-08-03 11:49:17 +00:00
|
|
|
This module provides a variety of constants, structure manipulators and
|
|
|
|
other functions related to socket-based networking. The values and
|
|
|
|
functions provided are useful when used in conjunction with Perl core
|
|
|
|
functions such as socket(), setsockopt() and bind(). It also provides
|
|
|
|
several other support functions, mostly for dealing with conversions of
|
|
|
|
network addresses between human-readable and native binary forms, and for
|
|
|
|
hostname resolver operations.
|
|
|
|
|
|
|
|
Some constants and functions are exported by default by this module; but
|
|
|
|
for backward-compatibility any recently-added symbols are not exported by
|
|
|
|
default and must be requested explicitly. When an import list is provided
|
|
|
|
to the 'use Socket' line, the default exports are not automatically
|
|
|
|
imported. It is therefore best practice to always to explicitly list all
|
|
|
|
the symbols required.
|
|
|
|
|
|
|
|
Also, some common socket "newline" constants are provided: the constants
|
|
|
|
'CR', 'LF', and 'CRLF', as well as '$CR', '$LF', and '$CRLF', which map to
|
|
|
|
'\015', '\012', and '\015\012'. If you do not want to use the literal
|
|
|
|
characters in your programs, then use the constants provided here. They are
|
|
|
|
not exported by default, but can be imported individually, and with the
|
|
|
|
':crlf' export tag:
|
2016-03-18 21:34:33 +00:00
|
|
|
|
2023-06-13 07:33:19 +00:00
|
|
|
use Socket qw(:DEFAULT :crlf);
|
2016-08-03 11:49:17 +00:00
|
|
|
|
2023-06-13 07:33:19 +00:00
|
|
|
$sock->print("GET / HTTP/1.0$CRLF");
|
2016-08-03 11:49:17 +00:00
|
|
|
|
|
|
|
The entire getaddrinfo() subsystem can be exported using the tag
|
|
|
|
':addrinfo'; this exports the getaddrinfo() and getnameinfo() functions,
|
|
|
|
and all the 'AI_*', 'NI_*', 'NIx_*' and 'EAI_*' constants.
|
2016-03-18 21:34:33 +00:00
|
|
|
|
|
|
|
%prep
|
2025-06-29 06:47:27 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{version} -p1
|
2016-03-18 21:34:33 +00:00
|
|
|
|
|
|
|
%build
|
2019-03-01 07:38:52 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
2021-01-06 11:00:29 +00:00
|
|
|
%make_build
|
2016-03-18 21:34:33 +00:00
|
|
|
|
|
|
|
%check
|
2019-03-01 07:38:52 +00:00
|
|
|
make test
|
2016-03-18 21:34:33 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
2018-01-22 21:02:01 +00:00
|
|
|
%doc Changes
|
|
|
|
%license Artistic Copying LICENSE
|
2016-03-18 21:34:33 +00:00
|
|
|
|
|
|
|
%changelog
|