]> git.pld-linux.org Git - packages/perl-Web-Machine.git/blob - perl-Web-Machine.spec
- initial
[packages/perl-Web-Machine.git] / perl-Web-Machine.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define         pdir    Web
6 %define         pnam    Machine
7 Summary:        Web::Machine - A Perl port of Webmachine
8 Name:           perl-Web-Machine
9 Version:        0.17
10 Release:        1
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
19 %if %{with tests}
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
31 %endif
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
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.
41
42 Each resource is a state machine, and each request for a resource is
43 handled by running the request through that state machine.
44
45 Web::Machine is built on top of Plack, but it handles the full request
46 and response cycle.
47
48 See Web::Machine::Manual for more details on using Web::Machine in
49 general, and how Web::Machine and Plack interact.
50
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.
54
55
56
57 # %description -l pl.UTF-8 # TODO
58
59 %prep
60 %setup -q -n %{pdir}-%{pnam}-%{version}
61
62 %build
63 %{__perl} Makefile.PL \
64         INSTALLDIRS=vendor
65 %{__make}
66
67 %{?with_tests:%{__make} test}
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71
72 %{__make} pure_install \
73         DESTDIR=$RPM_BUILD_ROOT
74
75 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
76 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %files
82 %defattr(644,root,root,755)
83 %doc Changes INSTALL
84 %{perl_vendorlib}/Web/*.pm
85 %{perl_vendorlib}/Web/Machine
86 %{_mandir}/man3/*
87 %{_examplesdir}/%{name}-%{version}
This page took 0.099226 seconds and 4 git commands to generate.