#! /bin/sh jsname=jquery-ui version=1.12.1 [ -r ${jsname}-${version}.tar.gz ] && \ echo ${jsname}-${version}.tar.gz already exists && exit 1 [ -r ${jsname}-${version}-node-modules.tar.gz ] && \ echo ${jsname}-${version}-node-modules.tar.gz already exists && exit 1 curdir=$(pwd) tmpdir=$(mktemp -d) cd ${tmpdir} # The upstream source bundles a copy of jshint which has a non-free # license and can not be distributed by Fedora. The source included in # the srpm has the external/jshint directory removed wget -N https://github.com/jquery/${jsname}/archive/${version}/${jsname}-${version}-nonfree.tar.gz tar -z -x -f ${jsname}-${version}-nonfree.tar.gz rm -rf ${jsname}-${version}/external/jshint tar -z -c --group root --owner root -f ${curdir}/${jsname}-${version}.tar.gz ${jsname}-${version} # We need to bundle build dependencies since they are no longer # available in Fedora. This uses the same technique as the js-jquery # package. cd ${jsname}-${version} # Reduce the dev dependencies in the package.json file by removing # stuff not needed for the build. This reduces the size of the bundled # build dependencies considerably. patch -p1 <