|
|
02dc321 |
Name: perl-JavaScript-Minifier
|
|
|
23e7104 |
Version: 1.16
|
|
|
959aa64 |
Release: 1%{?dist}
|
|
|
02dc321 |
Summary: Perl extension for minifying JavaScript code
|
|
|
2fb5065 |
License: GPL+ or Artistic
|
|
|
17ebf5b |
URL: https://metacpan.org/release/JavaScript-Minifier
|
|
|
17ebf5b |
Source0: https://cpan.metacpan.org/authors/id/Z/ZO/ZOFFIX/JavaScript-Minifier-%{version}.tar.gz
|
|
|
02dc321 |
BuildArch: noarch
|
|
|
23e7104 |
BuildRequires: coreutils
|
|
|
24911a0 |
BuildRequires: make
|
|
|
992cd67 |
BuildRequires: perl-generators
|
|
|
2c8b788 |
BuildRequires: perl-interpreter
|
|
|
f42c282 |
BuildRequires: perl(Config)
|
|
|
2c8b788 |
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
|
|
27e48c3 |
BuildRequires: perl(strict)
|
|
|
27e48c3 |
BuildRequires: perl(warnings)
|
|
|
24fd3c5 |
# Run-Time
|
|
|
24fd3c5 |
BuildRequires: perl(Exporter)
|
|
|
27e48c3 |
# Tests
|
|
|
ebddefb |
BuildRequires: perl(blib)
|
|
|
bf573f4 |
BuildRequires: perl(File::Spec)
|
|
|
bf573f4 |
BuildRequires: perl(IO::Handle)
|
|
|
bf573f4 |
BuildRequires: perl(IPC::Open3)
|
|
|
02dc321 |
BuildRequires: perl(Test::More)
|
|
|
27e48c3 |
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
|
02dc321 |
|
|
|
02dc321 |
%description
|
|
|
2c8b788 |
This module removes unnecessary white space from JavaScript code. The
|
|
|
02dc321 |
primary requirement developing this module is to not break working
|
|
|
02dc321 |
code: if working JavaScript is in input then working JavaScript is
|
|
|
2c8b788 |
output. It is O.K. if the input has missing semi-colons, snips like '++
|
|
|
02dc321 |
+' or '12 .toString()', for example. Internet Explorer conditional
|
|
|
02dc321 |
comments are copied to the output but the code inside these comments
|
|
|
02dc321 |
will not be minified.
|
|
|
02dc321 |
|
|
|
90c05e5 |
%package tests
|
|
|
90c05e5 |
Summary: Tests for %{name}
|
|
|
90c05e5 |
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
90c05e5 |
Requires: perl-Test-Harness
|
|
|
90c05e5 |
Requires: perl(lib)
|
|
|
90c05e5 |
|
|
|
90c05e5 |
%description tests
|
|
|
90c05e5 |
Tests from %{name}. Execute them
|
|
|
90c05e5 |
with "%{_libexecdir}/%{name}/test".
|
|
|
90c05e5 |
|
|
|
02dc321 |
%prep
|
|
|
02dc321 |
%setup -q -n JavaScript-Minifier-%{version}
|
|
|
f42c282 |
# Remove /usr/bin/env from shebang
|
|
|
24911a0 |
perl -MConfig -i -pe 's/^#!.*/$Config{startperl}/' examples/minify.pl
|
|
|
02dc321 |
|
|
|
90c05e5 |
# Help file to recognise the Perl scripts and normalize shebangs
|
|
|
90c05e5 |
for F in t/*.t; do
|
|
|
90c05e5 |
if head -1 "$F" | grep -q -e '^#!.*perl\b' ; then
|
|
|
90c05e5 |
perl -MConfig -pi -e 's|^#!.*perl\b|$Config{startperl}|' "$F"
|
|
|
90c05e5 |
else
|
|
|
90c05e5 |
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F"
|
|
|
90c05e5 |
fi
|
|
|
90c05e5 |
chmod +x "$F"
|
|
|
90c05e5 |
done
|
|
|
90c05e5 |
|
|
|
02dc321 |
%build
|
|
|
24911a0 |
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
|
|
24911a0 |
%{make_build}
|
|
|
02dc321 |
|
|
|
02dc321 |
%install
|
|
|
24911a0 |
%{make_install}
|
|
|
90c05e5 |
|
|
|
90c05e5 |
# Install tests
|
|
|
90c05e5 |
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
|
|
90c05e5 |
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
|
|
90c05e5 |
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
|
|
90c05e5 |
#!/bin/bash
|
|
|
90c05e5 |
set -e
|
|
|
90c05e5 |
# Some tests write into temporary files/directories. The easiest solution
|
|
|
90c05e5 |
# is to copy the tests into a writable directory and execute them from there.
|
|
|
90c05e5 |
DIR=$(mktemp -d)
|
|
|
90c05e5 |
pushd "$DIR"
|
|
|
90c05e5 |
cp -a %{_libexecdir}/%{name}/* ./
|
|
|
90c05e5 |
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
|
|
90c05e5 |
popd
|
|
|
90c05e5 |
rm -rf "$DIR"
|
|
|
90c05e5 |
EOF
|
|
|
90c05e5 |
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
|
|
90c05e5 |
|
|
|
02dc321 |
%{_fixperms} $RPM_BUILD_ROOT/*
|
|
|
02dc321 |
|
|
|
02dc321 |
%check
|
|
|
90c05e5 |
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
|
|
02dc321 |
make test
|
|
|
02dc321 |
|
|
|
02dc321 |
%files
|
|
|
27e48c3 |
%doc Changes README examples
|
|
|
02dc321 |
%{perl_vendorlib}/*
|
|
|
02dc321 |
%{_mandir}/man3/*
|
|
|
02dc321 |
|
|
|
90c05e5 |
%files tests
|
|
|
90c05e5 |
%{_libexecdir}/%{name}
|
|
|
90c05e5 |
|
|
|
02dc321 |
%changelog
|
|
|
23e7104 |
* Thu Mar 04 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.16-1
|
|
|
23e7104 |
- 1.16 bump
|
|
|
90c05e5 |
- Package tests
|
|
|
23e7104 |
|
|
|
959aa64 |
* Wed Feb 03 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.15-1
|
|
|
959aa64 |
- 1.15 bump
|
|
|
959aa64 |
|
|
|
7db167a |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-20
|
|
|
7db167a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
7db167a |
|
|
|
12b7852 |
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-19
|
|
|
12b7852 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
12b7852 |
|
|
|
db7d83d |
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.14-18
|
|
|
db7d83d |
- Perl 5.32 rebuild
|
|
|
db7d83d |
|
|
|
ebddefb |
* Fri Feb 28 2020 Petr Pisar <ppisar@redhat.com> - 1.14-17
|
|
|
ebddefb |
- Build-require blib for tests
|
|
|
ebddefb |
|
|
|
76b6ebf |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-16
|
|
|
76b6ebf |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
76b6ebf |
|
|
|
531c224 |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-15
|
|
|
531c224 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
531c224 |
|
|
|
0f5fccd |
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.14-14
|
|
|
0f5fccd |
- Perl 5.30 rebuild
|
|
|
0f5fccd |
|
|
|
40fc79a |
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-13
|
|
|
40fc79a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
40fc79a |
|
|
|
bf6f763 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-12
|
|
|
bf6f763 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
bf6f763 |
|
|
|
d51cc9b |
* Wed Jun 27 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.14-11
|
|
|
d51cc9b |
- Perl 5.28 rebuild
|
|
|
d51cc9b |
|
|
|
4fdbd7b |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-10
|
|
|
4fdbd7b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
4fdbd7b |
|
|
|
f42c282 |
* Tue Nov 07 2017 Petr Pisar <ppisar@redhat.com> - 1.14-9
|
|
|
f42c282 |
- Remove /usr/bin/env from shebang
|
|
|
f42c282 |
|
|
|
94e0eca |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-8
|
|
|
94e0eca |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
94e0eca |
|
|
|
591e962 |
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.14-7
|
|
|
591e962 |
- Perl 5.26 rebuild
|
|
|
591e962 |
|
|
|
8ec8562 |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-6
|
|
|
8ec8562 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
8ec8562 |
|
|
|
a7d4ca8 |
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.14-5
|
|
|
a7d4ca8 |
- Perl 5.24 rebuild
|
|
|
a7d4ca8 |
|
|
|
791569c |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-4
|
|
|
791569c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
791569c |
|
|
|
a8d39a4 |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.14-3
|
|
|
a8d39a4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
a8d39a4 |
|
|
|
7371a41 |
* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.14-2
|
|
|
7371a41 |
- Perl 5.22 rebuild
|
|
|
7371a41 |
|
|
|
60a39e5 |
* Mon Apr 27 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.14-1
|
|
|
60a39e5 |
- 1.14 bump
|
|
|
60a39e5 |
|
|
|
24fd3c5 |
* Fri Mar 20 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.13-1
|
|
|
24fd3c5 |
- 1.13 bump
|
|
|
24fd3c5 |
|
|
|
5c1802c |
* Wed Oct 08 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.12-1
|
|
|
5c1802c |
- 1.12 bump
|
|
|
5c1802c |
|
|
|
1c13644 |
* Tue Aug 26 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.11-3
|
|
|
1c13644 |
- Perl 5.20 rebuild
|
|
|
1c13644 |
|
|
|
8b1756e |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-2
|
|
|
8b1756e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
8b1756e |
|
|
|
bf573f4 |
* Fri Jan 31 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.11-1
|
|
|
bf573f4 |
- 1.11 bump
|
|
|
bf573f4 |
|
|
|
216bfe1 |
* Fri Jan 24 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.09-1
|
|
|
216bfe1 |
- 1.09 bump
|
|
|
216bfe1 |
|
|
|
2fb5065 |
* Tue Jan 21 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.08-1
|
|
|
2fb5065 |
- 1.08 bump
|
|
|
2fb5065 |
|
|
|
27e48c3 |
* Mon Jan 20 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.06-1
|
|
|
27e48c3 |
- 1.06 bump
|
|
|
27e48c3 |
- Modernize spec file
|
|
|
27e48c3 |
|
|
|
18f8f03 |
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.05-13
|
|
|
18f8f03 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
18f8f03 |
|
|
|
e2e63e5 |
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 1.05-12
|
|
|
e2e63e5 |
- Perl 5.18 rebuild
|
|
|
e2e63e5 |
|
|
|
ac2292c |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.05-11
|
|
|
ac2292c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
ac2292c |
|
|
|
30d9fd4 |
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.05-10
|
|
|
30d9fd4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
30d9fd4 |
|
|
|
56d3140 |
* Fri Jun 08 2012 Petr Pisar <ppisar@redhat.com> - 1.05-9
|
|
|
56d3140 |
- Perl 5.16 rebuild
|
|
|
56d3140 |
|
|
|
4e5dd22 |
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.05-8
|
|
|
4e5dd22 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
4e5dd22 |
|
|
|
c4d17a0 |
* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.05-7
|
|
|
c4d17a0 |
- Perl mass rebuild
|
|
|
c4d17a0 |
|
|
|
ab7572c |
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.05-6
|
|
|
ab7572c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
ab7572c |
|
|
|
a68d0ba |
* Mon Dec 20 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.05-5
|
|
|
a68d0ba |
- 661697 rebuild for fixing problems with vendorach/lib
|
|
|
a68d0ba |
|
|
|
ebd3097 |
* Sun May 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.05-4
|
|
|
ebd3097 |
- Mass rebuild with perl-5.12.0
|
|
|
ebd3097 |
|
|
|
15ad03d |
* Mon Dec 7 2009 Stepan Kasal <skasal@redhat.com> - 1.05-3
|
|
|
15ad03d |
- rebuild against perl 5.10.1
|
|
|
15ad03d |
|
|
|
322444b |
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.05-2
|
|
|
322444b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
322444b |
|
|
|
02dc321 |
* Wed Apr 29 2009 Marcela Mašláňová <mmaslano@redhat.com> 1.05-1
|
|
|
02dc321 |
- Specfile autogenerated by cpanspec 1.78.
|