# THIS PACKAGE IS NOT READY FOR FEDORA. # It uses npm to install its build dependencies. # It will not build in koji since this requires access to registry.npmjs.org. %global insdirname jquery %global ver_x 1 %global ver_y 11 %global ver_z 0 Name: js-jquery1 Version: %{ver_x}.%{ver_y}.%{ver_z} Release: 0.1%{?dist} Summary: JavaScript DOM manipulation, event handling, and AJAX library - for legacy browsers BuildArch: noarch License: MIT URL: http://sizzlejs.com/ Source0: https://github.com/jquery/jquery/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: web-assets-devel BuildRequires: nodejs-packaging BuildRequires: js-sizzle-source-static Provides: %{name}-static #we're going to do this for now BuildRequires: npm #instead of this... #BuildRequires: npm(archiver) #BuildRequires: npm(grunt) #BuildRequires: npm(requirejs) #BuildRequires: npm(shelljs) #BuildRequires: npm(grunt-cli) #BuildRequires: npm(grunt-contrib-uglify) #BuildRequires: npm(grunt-contrib-watch) #BuildRequires: npm(grunt-compare-size) #BuildRequires: npm(grunt-git-authors) #BuildRequires: npm(grunt-jsonlint) #BuildRequires: npm(grunt-bowercopy) #BuildRequires: npm(grunt-jscs-checker) #BuildRequires: npm(gzip-js) #BuildRequires: npm(load-grunt-tasks) #BuildRequires: npm(testswarm) Requires: web-assets-filesystem %description jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript. This version of jQuery should be used for web applications which need to support legacy browsers such as IE6. %prep %setup -qn %{insdirname}-%{version} #remove precompiled stuff rm -rf dist/* src/sizzle #do not use the nonfree jshint library %nodejs_fixdep --dev -r grunt-contrib-jshint #look ma, I cheated! npm install %build ./node_modules/.bin/grunt build #--force is neccessary to bypass jshint ./node_modules/.bin/grunt --force #%%check #tests run as part of build process %install %global inslibdir %{buildroot}%{_jsdir}/%{insdirname} mkdir -p %{inslibdir}/%{version} cp -p dist/* %{inslibdir}/%{version} ln -s %{version} %{inslibdir}/%{ver_x} ln -s %{version} %{inslibdir}/%{ver_x}.%{ver_y} ln -s %{version}/jquery.js %{inslibdir}/jquery-%{ver_x}.js ln -s %{version}/jquery.min.js %{inslibdir}/jquery-%{ver_x}.min.js ln -s %{version}/jquery.js %{inslibdir}/jquery-%{ver_x}.%{ver_y}.js ln -s %{version}/jquery.min.js %{inslibdir}/jquery-%{ver_x}.%{ver_y}.min.js ln -s %{version}/jquery.js %{inslibdir}/jquery-%{version}.js ln -s %{version}/jquery.min.js %{inslibdir}/jquery-%{version}.min.js %files %{_jsdir}/%{insdirname} %doc AUTHORS.txt CONTRIBUTING.md MIT-LICENSE.txt README.md %changelog * Wed Mar 19 2014 T.C. Hollingsworth - 2.1.0-0.1 - initial package