3 %bcond_without tests # do not perform "make test"
7 Summary: Web::Machine - A Perl port of Webmachine
11 License: GPL v1+ or Artistic
12 Group: Development/Languages/Perl
13 Source0: http://www.cpan.org/modules/by-module/Web/%{pdir}-%{pnam}-%{version}.tar.gz
14 # Source0-md5: f62606a516068b9d889610fc2d51905c
15 URL: https://metacpan.org/release/Web-Machine
16 BuildRequires: perl-devel >= 1:5.8.0
17 BuildRequires: rpm-perlprov >= 4.1-13
18 BuildRequires: rpmbuild(macros) >= 1.745
20 BuildRequires: perl(HTTP::Headers::ActionPack) >= 0.07
21 BuildRequires: perl(IO::Handle::Util)
22 BuildRequires: perl(Test::FailWarnings)
23 BuildRequires: perl-HTTP-Message
24 BuildRequires: perl-Hash-MultiValue
25 BuildRequires: perl-Module-Runtime
26 BuildRequires: perl-Net-HTTP
27 BuildRequires: perl-Plack
28 BuildRequires: perl-Sub-Exporter
29 BuildRequires: perl-Test-Fatal
30 BuildRequires: perl-Try-Tiny
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 Web::Machine provides a RESTful web framework modeled as a state
37 machine. You define one or more resource classes. Each resource
38 represents a single RESTful URI end point, such as a user, an email,
39 etc. The resource class can also be the target for POST requests to
40 create a new user, email, etc.
42 Each resource is a state machine, and each request for a resource is
43 handled by running the request through that state machine.
45 Web::Machine is built on top of Plack, but it handles the full request
48 See Web::Machine::Manual for more details on using Web::Machine in
49 general, and how Web::Machine and Plack interact.
51 This is a port of Webmachine, actually it is much closer to the Ruby
52 version, with a little bit of the JavaScript version and even some of
53 the Python version thrown in for good measure.
57 # %description -l pl.UTF-8 # TODO
60 %setup -q -n %{pdir}-%{pnam}-%{version}
63 %{__perl} Makefile.PL \
67 %{?with_tests:%{__make} test}
70 rm -rf $RPM_BUILD_ROOT
72 %{__make} pure_install \
73 DESTDIR=$RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
76 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
79 rm -rf $RPM_BUILD_ROOT
82 %defattr(644,root,root,755)
84 %{perl_vendorlib}/Web/*.pm
85 %{perl_vendorlib}/Web/Machine
87 %{_examplesdir}/%{name}-%{version}