Compare commits

..

3 commits

Author SHA1 Message Date
Jamie Nguyen
3919656309 Merge branch 'master' into el6 2014-06-29 18:18:52 +01:00
Jamie Nguyen
c4b7ca0d02 Merge branch 'master' into el6 2014-05-10 15:21:05 +01:00
T.C. Hollingsworth
7d6e17ffa1 missed compat symlink in %files 2014-01-19 18:07:10 -07:00
4 changed files with 159 additions and 1 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/uglify-js-1.3.4.tgz

View file

@ -1 +0,0 @@
Orphaned for 6+ weeks

1
sources Normal file
View file

@ -0,0 +1 @@
ea1e670d7872ca2c77a71a9ee51ddfd4 uglify-js-1.3.4.tgz

157
uglify-js1.spec Normal file
View file

@ -0,0 +1,157 @@
%{?nodejs_find_provides_and_requires}
#enable/disable tests in case the deps aren't there
%global enable_tests 0
Name: uglify-js1
Version: 1.3.4
Release: 9%{?dist}
Summary: JavaScript parser, mangler/compressor and beautifier toolkit
BuildArch: noarch
Group: Development/Tools
# BSD license in README.html
License: BSD
URL: https://github.com/mishoo/UglifyJS
Source0: http://registry.npmjs.org/uglify-js/-/uglify-js-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif
BuildRequires: nodejs-packaging
BuildRequires: web-assets-devel
%if 0%{?enable_tests}
BuildRequires: npm(nodeunit)
%endif
Requires: js-uglify-1 = %{version}-%{release}
%description
JavaScript parser, mangler/compressor and beautifier toolkit. This is the
classic 1.x version of uglify-js. Consider using the new version provided
in the uglify-js package.
This package ships the uglifyjs command-line tool and a library suitable for
use within Node.js.
%package -n js-uglify-1
Summary: JavaScript parser, mangler/compressor and beautifier toolkit - core library
Group: System Environment/Libraries
Obsoletes: uglify-js1-common < 1.3.4-4
Provides: uglify-js1-common = %{version}-%{release}
Requires: web-assets-filesystem
%description -n js-uglify-1
JavaScript parser, mangler/compressor and beautifier toolkit. This is the
classic 1.x version of uglify-js. Consider using the new version provided
in the uglify-js package.
This package ships a JavaScript library suitable for use by any JavaScript
runtime.
%prep
%setup -q -n package
%build
#nothing to do
%install
rm -rf %buildroot
mkdir -p %{buildroot}%{_jsdir}/uglify-js-1
cp -pr lib/* %{buildroot}%{_jsdir}/uglify-js-1
#compat symlink
mkdir -p %{buildroot}%{_datadir}
ln -sf javascript/uglify-js-1 %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{nodejs_sitelib}/uglify-js@1
cp -pr bin package.json uglify-js.js %{buildroot}%{nodejs_sitelib}/uglify-js@1
ln -sf %{_jsdir}/uglify-js-1 %{buildroot}%{nodejs_sitelib}/uglify-js@1/lib
##compat symlink so old modules continue to work
ln -sf uglify-js@1 %{buildroot}%{nodejs_sitelib}/%{name}
mkdir -p %{buildroot}%{_bindir}
ln -sf ../lib/node_modules/uglify-js1/bin/uglifyjs %{buildroot}%{_bindir}/uglifyjs1
#nodejs-symlink-deps is not called because this package does not have any
#dependencies and can be used outside of node
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
nodeunit test/unit/scripts.js && test/testparser.js && test/testconsolidator.js
%endif
%clean
rm -rf %buildroot
%pretrans -p <lua>
st = posix.stat("%{nodejs_sitelib}/uglify-js1")
if st and st.type == "directory" then
os.execute("rm -rf %{nodejs_sitelib}/uglify-js1")
end
%pretrans -n js-uglify-1 -p <lua>
st = posix.stat("%{_datadir}/%{name}")
if st and st.type == "directory" then
os.execute("rm -rf %{_datadir}/%{name}")
end
%files
%defattr(-,root,root,-)
%{nodejs_sitelib}/uglify-js@1
%{nodejs_sitelib}/uglify-js1
%{_bindir}/uglifyjs1
%files -n js-uglify-1
%defattr(-,root,root,-)
%{_jsdir}/uglify-js-1
%{_datadir}/%{name}
%doc README.html README.org docstyle.css
%changelog
* Sun Jun 29 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.3.4-9
- add logic for building on EL6
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat May 10 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.3.4-7
- fix scriptlets to run in the correct subpackages
* Mon Jan 20 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.4-6
- fix Requires on js-uglify-1 subpackage
* Mon Jan 20 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.4-5
- port to new JS guidelines
* Mon Jan 20 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.4-4
- add compat symlink so old modules continue to work
* Sun Jan 19 2014 Tom Hughes <tom@compton.nu> - 1.3.4-3
- use new multi-version packaging rules
- update to latest nodejs packaging standards
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Feb 01 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.4
- initial package based on the uglify-js (2.x) pacakge