81 lines
2.7 KiB
RPMSpec
81 lines
2.7 KiB
RPMSpec
#
|
|
# spec file for package perl-Object-Event
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define cpan_name Object-Event
|
|
Name: perl-Object-Event
|
|
Version: 1.230.0
|
|
Release: 0
|
|
# 1.23 -> normalize -> 1.230.0
|
|
%define cpan_version 1.23
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Class that provides an event callback interface
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/E/EL/ELMEX/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(AnyEvent) >= 3.5
|
|
BuildRequires: perl(common::sense)
|
|
Requires: perl(AnyEvent) >= 3.5
|
|
Requires: perl(common::sense)
|
|
Provides: perl(Object::Event) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
This module was mainly written for AnyEvent::XMPP, AnyEvent::IRC,
|
|
AnyEvent::HTTPD and BK to provide a consistent API for registering and
|
|
emitting events. Even though I originally wrote it for those modules I
|
|
released it separately in case anyone may find this module useful.
|
|
|
|
For more comprehensive event handling see also Glib and POE.
|
|
|
|
This class provides a simple way to extend a class, by inheriting from this
|
|
class, with an event callback interface.
|
|
|
|
You will be able to register callbacks for events, identified by their
|
|
names (a string) and call them later by invoking the 'event' method with
|
|
the event name and some arguments.
|
|
|
|
There is even a syntactic sugar which allows to call methods on the
|
|
instances of Object::Event-derived classes, to invoke events. For this
|
|
feature see the EVENT METHODS section of this document.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
%make_build
|
|
|
|
%check
|
|
make test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc Changes README samples
|
|
|
|
%changelog
|