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