2024-07-20 00:10:54 +00:00
committed by Git OBS Bridge
parent cfce04f88c
commit ad9cf0dcb5

View File

@@ -1,7 +1,7 @@
# #
# spec file for package perl-Data-Buffer # spec file for package perl-Data-Buffer
# #
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -12,55 +12,66 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
%define modname Data-Buffer %define cpan_name Data-Buffer
Name: perl-Data-Buffer
Name: perl-%{modname} Version: 0.40.0
Version: 0.04 Release: 0
Release: 1 # 0.04 -> normalize -> 0.40.0
%define cpan_version 0.04
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Read/write buffer class Summary: Read/write buffer class
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/B/BT/BTROTT/%{cpan_name}-%{cpan_version}.tar.gz
BuildArch: noarch
BuildRequires: perl BuildRequires: perl
BuildRequires: perl-macros BuildRequires: perl-macros
License: GPL/Artistic Provides: perl(Data::Buffer) = %{version}
Group: Development/Libraries/Perl %undefine __perllib_provides
Source: %{modname}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires} %{perl_requires}
%description %description
Data::Buffer implements a low-level binary buffer in which you can get and put _Data::Buffer_ implements a low-level binary buffer in which you can get
integers, strings, and other data. Internally the implementation is based on and put integers, strings, and other data. Internally the implementation is
pack and unpack, such that Data::Buffer is really a layer on top of those based on 'pack' and 'unpack', such that _Data::Buffer_ is really a layer on
built-in functions. top of those built-in functions.
Authors: All of the _get_*_ and _put_*_ methods respect the internal offset state in
-------- the buffer object. This means that you should read data out of the buffer
Benjamin Trott <ben@rhumba.pair.com> in the same order that you put it in. For example:
$buf->put_int16(24);
$buf->put_int32(1233455);
$buf->put_int16(99);
$buf->get_int16; # 24
$buf->get_int32; # 1233455
$buf->get_int16; # 99
Of course, this assumes that you _know_ the order of the data items in the
buffer. If your setup is such that your sending and receiving processes
won't necessarily know what's inside the buffers they receive, take a look
at the _TEMPLATE USAGE_ section.
%prep %prep
%setup -q -n %{modname}-%{version} %autosetup -n %{cpan_name}-%{cpan_version}
%build %build
perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall" perl Makefile.PL INSTALLDIRS=vendor
make %make_build
%check
make test make test
%install %install
rm -rf %{buildroot} %perl_make_install
make DESTDIR=$RPM_BUILD_ROOT install_vendor
%perl_process_packlist %perl_process_packlist
%perl_gen_filelist
%clean %files -f %{name}.files
rm -rf %{buildroot} %doc Changes README
%files
%defattr(-, root, root)
%doc README Changes
%doc %{_mandir}/man?/*
%{perl_vendorlib}/Data
%{perl_vendorarch}/auto/Data
%changelog %changelog