From 71e9fcb9300820083adc94ee55df5ef3235557f7 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Jun 13 2014 23:15:47 +0000 Subject: Update to latest git checkout and convert to maven build It seems simpler to use the maven build added in git than to fix current build under maven 3 with missing dependencies. --- diff --git a/.gitignore b/.gitignore index 3f68048..952b9d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ /v20140110.zip +/0001-Avoid-unchecked-cast-warnings-in-Java8.patch +/0001-Replace-Guava17-s-Verify-with-Preconditions.patch +/e5cfc63bb559c849cf3e55e99c1b2bb431fd8d75.zip diff --git a/closure-compiler.spec b/closure-compiler.spec index 3874fe5..f3c07ad 100644 --- a/closure-compiler.spec +++ b/closure-compiler.spec @@ -2,22 +2,21 @@ Summary: JavaScript minifier and checker Name: closure-compiler -Version: 20140110 -%global githash ef22f25de0c0 -Release: 3%{?dist} -License: ASL 2.0 and MPL 1.1 +%define commit e5cfc63bb559c849cf3e55e99c1b2bb431fd8d75 +%define shorthash %(printf %%.7s %commit) +Version: 20140613.git%{shorthash} +Release: 1%{?dist} +License: ASL 2.0 URL: https://developers.google.com/closure/compiler/ -# .tar.gz is truncated for some reason -Source0: http://closure-compiler.googlecode.com/archive/v%{version}.zip +Source0: https://github.com/google/closure-compiler/archive/%{commit}.zip Source1: closure-compiler.xml -Patch0: closure-compiler-build.patch +Patch0: 0001-Avoid-unchecked-cast-warnings-in-Java8.patch +Patch1: 0001-Replace-Guava17-s-Verify-with-Preconditions.patch BuildArch: noarch BuildRequires: jpackage-utils BuildRequires: java-devel -BuildRequires: ant -BuildRequires: maven -BuildRequires: maven-ant-tasks +BuildRequires: maven-local BuildRequires: jarjar BuildRequires: args4j BuildRequires: guava >= 15 @@ -51,10 +50,9 @@ The Closure Compiler is a tool for making JavaScript download and run faster. It is a true compiler for JavaScript. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript. It parses your JavaScript, analyzes it, removes -dead code and rewrites and minimizes what's left. It also checks +dead code and rewrites and minimizes what’s left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls. -#' %package javadoc Summary: API documentation for %{name} @@ -63,9 +61,10 @@ Summary: API documentation for %{name} This package contains the %{summary}. %prep -%setup -q -n %{name}-%{githash} +%setup -q -n %{name}-%{commit} %patch0 -p1 -rm -rf lib/* tools/* +%patch1 -p1 +rm -rf lib/* build-jar-repository -s -p lib/ \ jarjar \ args4j \ @@ -80,35 +79,12 @@ build-jar-repository -s -p lib/ \ %endif guava ln -s android-json-org-java.jar lib/json.jar -build-jar-repository -p -s tools/ \ - maven-ant-tasks \ - maven/maven-core \ - maven/maven-compat \ - maven/maven-artifact \ - maven/maven-model \ - maven/maven-project \ - maven/maven-settings \ - maven/maven-error-diagnostics \ - maven-wagon/file \ - maven-wagon/http \ - maven-wagon/provider-api \ - plexus-classworlds \ - plexus-component-api/plexus-component-api \ - plexus-utils \ - nekohtml -sed -i "s|\${tools.dir}/maven-ant-tasks-2.1.3.jar|$(build-classpath-directory tools)|" build.xml - -# I can't for the life of me figure out why this line breaks -# build. But it doesn't seem very important anyway. -sed -i 's|||' build.xml - -# This test requires google-caja which is not available. -rm test/com/google/javascript/jscomp/jsonml/JsonMLConversionTest.java %build -ant jar-nodeps javadoc -echo "Main-Class: com.google.javascript.jscomp.CommandLineRunner" > manifest -jar -uvmf manifest build/%{name}-*.jar +%mvn_build -- \ +%if 0%{?_check} == 0 + -DskipTests +%endif xsltproc \ --nonet \ @@ -118,42 +94,26 @@ xsltproc \ --stringparam man.copyright.section.enabled 0 \ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl %{SOURCE1} -%if 0%{?_check} -%check -ant test -%endif - %install -mkdir -p ${RPM_BUILD_ROOT}%{_javadir} -cp -p build/%{name}-*.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar - -mkdir -p $RPM_BUILD_ROOT%{_javadocdir} -cp -pr build/javadoc $RPM_BUILD_ROOT%{_javadocdir}/%{name} - -mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir} -cp -pr %{name}.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom - +%mvn_install %jpackage_script com.google.javascript.jscomp.CommandLineRunner "" "" jarjar:args4j:android-json-org-java:jsr-305:junit:protobuf:js:guava:%{name} %{name} true mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 cp %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1 -%add_maven_depmap JPP-%{name}.pom %{name}.jar - -%files -%{_javadir}/%{name}*.jar +%files -f .mfiles %{_bindir}/%{name} %{_mandir}/man1/%{name}.* -%{_mavenpomdir}/JPP-%{name}.pom -%{_mavendepmapfragdir}/%{name} %doc COPYING -%files javadoc -%doc CONTRIBUTORS COPYING README -%{_javadocdir}/%{name} +%files javadoc -f .mfiles-javadoc +%doc CONTRIBUTORS COPYING README.md %changelog +* Sat Jun 13 2014 Zbigniew Jędrzejewski-Szmek - 20140613.gite5cfc63-1 +- Convert to maven build and update to latest version from git (#1106062). + * Sat Jun 07 2014 Fedora Release Engineering - 20140110-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index 8e64dc0..a077d87 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ -ce07ae896c7b4530120d01301aa75594 v20140110.zip +f34c792e47ceb3113a21a9f7bd647be9 0001-Avoid-unchecked-cast-warnings-in-Java8.patch +ff96ec6638c52e109b50b751dc78410a 0001-Replace-Guava17-s-Verify-with-Preconditions.patch +98dc4491effcb59fcf8889f3a44da77e e5cfc63bb559c849cf3e55e99c1b2bb431fd8d75.zip