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