]> git.pld-linux.org Git - packages/perl-JavaScript-Minifier.git/blob - perl-JavaScript-Minifier.spec
917929d09c28fbb2e09e431e842450210a9fae45
[packages/perl-JavaScript-Minifier.git] / perl-JavaScript-Minifier.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4
5 %define         pdir    JavaScript
6 %define         pnam    Minifier
7 Summary:        JavaScript::Minifier - Perl extension for minifying JavaScript code
8 Name:           perl-JavaScript-Minifier
9 Version:        1.14
10 Release:        1
11 # same as perl
12 License:        GPL v1+ or Artistic
13 Group:          Development/Languages/Perl
14 Source0:        http://www.cpan.org/modules/by-module/JavaScript/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5:  91e4cf0a4f5e317d5a5a8cf6d55700ac
16 URL:            http://search.cpan.org/dist/JavaScript-Minifier/
17 BuildRequires:  perl-devel >= 1:5.8.0
18 BuildRequires:  rpm-perlprov >= 4.1-13
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 This module removes unnecessary whitespace from JavaScript code. The
24 primary requirement developing this module is to not break working
25 code: if working JavaScript is in input then working JavaScript is
26 output. It is ok if the input has missing semi-colons, snips like '++
27 +' or '12 .toString()', for example. Internet Explorer conditional
28 comments are copied to the output but the code inside these comments
29 will not be minified.
30
31 The ECMAScript specifications allow for many different whitespace
32 characters: space, horizontal tab, vertical tab, new line, carriage
33 return, form feed, and paragraph separator. This module understands
34 all of these as whitespace except for vertical tab and paragraph
35 separator. These two types of whitespace are not minimized.
36
37 For static JavaScript files, it is recommended that you minify during
38 the build stage of web deployment. If you minify on-the-fly then it
39 might be a good idea to cache the minified file. Minifying static
40 files on-the-fly repeatedly is wasteful.
41
42 %prep
43 %setup -q -n %{pdir}-%{pnam}-%{version}
44
45 %build
46 %{__perl} Makefile.PL \
47         INSTALLDIRS=vendor
48 %{__make}
49
50 %{?with_tests:%{__make} test}
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 %{__make} pure_install \
55         DESTDIR=$RPM_BUILD_ROOT
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %files
61 %defattr(644,root,root,755)
62 %doc Changes README
63 %{perl_vendorlib}/JavaScript/*.pm
64 %{_mandir}/man3/*
This page took 0.057516 seconds and 2 git commands to generate.