[uglify-js1/f19: 4/4] port to new JS guidelines

T.C. Hollingsworth patches at fedoraproject.org
Mon Jan 20 01:00:46 UTC 2014


commit 4171fd45324708026ffa03831bb18396d69baa54
Author: T.C. Hollingsworth <tchollingsworth at gmail.com>
Date:   Sun Jan 19 17:59:16 2014 -0700

    port to new JS guidelines

 uglify-js1.spec |   39 ++++++++++++++++++++++++++++++---------
 1 files changed, 30 insertions(+), 9 deletions(-)
---
diff --git a/uglify-js1.spec b/uglify-js1.spec
index 3f1a4b3..7f7f94a 100644
--- a/uglify-js1.spec
+++ b/uglify-js1.spec
@@ -5,7 +5,7 @@
 
 Name:           uglify-js1
 Version:        1.3.4
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        JavaScript parser, mangler/compressor and beautifier toolkit
 BuildArch:      noarch
 
@@ -19,12 +19,13 @@ BuildArch:      noarch
 ExclusiveArch:  %{nodejs_arches} noarch
 
 BuildRequires:  nodejs-packaging
+BuildRequires:  web-assets-devel
 
 %if 0%{?enable_tests}
 BuildRequires:  npm(nodeunit)
 %endif
 
-Requires: %{name}-common == %{version}-%{release}
+Requires: js-%{name}-1 == %{version}-%{release}
 
 %description
 JavaScript parser, mangler/compressor and beautifier toolkit.  This is the
@@ -34,11 +35,16 @@ in the uglify-js package.
 This package ships the uglifyjs command-line tool and a library suitable for
 use within Node.js.
 
-%package common
+%package -n js-uglify-1
 Summary: JavaScript parser, mangler/compressor and beautifier toolkit - core library
 Group: System Environment/Libraries
 
-%description common
+
+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.
@@ -55,14 +61,19 @@ runtime.
 %install
 rm -rf %buildroot
 
-mkdir -p %{buildroot}%{_datadir}/%{name}
-cp -pr lib/* %{buildroot}%{_datadir}/%{name}/
+
+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 at 1
 cp -pr bin package.json uglify-js.js %{buildroot}%{nodejs_sitelib}/uglify-js at 1
-ln -sf %{_datadir}/uglify-js at 1 %{buildroot}%{nodejs_sitelib}/uglify-js at 1/lib
+ln -sf %{_jsdir}/uglify-js-1 %{buildroot}%{nodejs_sitelib}/uglify-js at 1/lib
 
-#compat symlink so old modules continue to work
+##compat symlink so old modules continue to work
 ln -sf uglify-js at 1 %{buildroot}%{nodejs_sitelib}/%{name}
 
 mkdir -p %{buildroot}%{_bindir}
@@ -86,17 +97,27 @@ if st and st.type == "directory" then
   os.execute("rm -rf %{nodejs_sitelib}/uglify-js1")
 end
 
+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 at 1
+%{nodejs_sitelib}/uglify-js1
 %{_bindir}/uglifyjs1
 
-%files common
+%files -n js-uglify-1
 %defattr(-,root,root,-)
+%{_jsdir}/uglify-js-1
 %{_datadir}/%{name}
 %doc README.html README.org docstyle.css
 
 %changelog
+* Mon Jan 20 2014 T.C. Hollingsworth <tchollingsworth at gmail.com> - 1.3.4-5
+- port to new JS guidelines
+
 * Mon Jan 20 2014 T.C. Hollingsworth <tchollingsworth at gmail.com> - 1.3.4-4
 - add compat symlink so old modules continue to work
 


More information about the scm-commits mailing list