summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-02-17 08:44:41 +0000
committerCoprDistGit <infra@openeuler.org>2025-02-17 08:44:41 +0000
commit0ffce07d8f494c07f2b2281399473c0745f137b8 (patch)
tree194dc53a9f7097d37757295d5d88da079970ecc5
parent0a2bcea8f185a4a51e9a6fdae70cadc2d7ace859 (diff)
automatic import of js-jquery-uiopeneuler24.03_LTS_SP1
-rw-r--r--.gitignore2
-rwxr-xr-xcreate-source.sh73
-rw-r--r--js-jquery-ui.spec52
-rw-r--r--sources2
4 files changed, 129 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..6f15392 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/jquery-ui-1.13.2-node-modules.tar.gz
+/jquery-ui-1.13.2.tar.gz
diff --git a/create-source.sh b/create-source.sh
new file mode 100755
index 0000000..e20487c
--- /dev/null
+++ b/create-source.sh
@@ -0,0 +1,73 @@
+#! /bin/sh
+
+jsname=jquery-ui
+version=1.13.2
+
+[ -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
+
+wget -N https://github.com/jquery/${jsname}/archive/${version}/${jsname}-${version}.tar.gz
+
+curdir=$(pwd)
+tmpdir=$(mktemp -d)
+
+cd ${tmpdir}
+
+# We need to bundle build dependencies since they are no longer
+# available in Fedora. This uses the same technique as the js-jquery
+# package.
+
+tar -z -x -f ${curdir}/${jsname}-${version}.tar.gz
+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 <<EOF
+--- a/package.json
++++ b/package.json
+@@ -48,27 +48,15 @@
+ "test": "grunt"
+ },
+ "dependencies": {
+- "jquery": ">=1.8.0 <4.0.0"
+ },
+ "devDependencies": {
+- "commitplease": "3.2.0",
+- "eslint-config-jquery": "3.0.0",
+ "glob": "7.2.0",
+ "grunt": "1.5.3",
+- "grunt-bowercopy": "1.2.5",
+ "grunt-cli": "1.4.3",
+- "grunt-compare-size": "0.4.2",
+ "grunt-contrib-concat": "1.0.1",
+- "grunt-contrib-csslint": "2.0.0",
+- "grunt-contrib-qunit": "5.1.1",
+ "grunt-contrib-requirejs": "1.0.0",
+ "grunt-contrib-uglify": "5.0.1",
+- "grunt-eslint": "23.0.0",
+- "grunt-git-authors": "3.2.0",
+- "grunt-html": "14.5.0",
+- "load-grunt-tasks": "5.1.0",
+- "rimraf": "3.0.2",
+- "testswarm": "1.1.2"
++ "load-grunt-tasks": "5.1.0"
+ },
+ "keywords": []
+ }
+EOF
+
+npm install --save-dev
+
+# This file is not needed for the build
+# It just needs to exist to avoid an error
+mkdir -p node_modules/grunt-contrib-qunit/chrome
+touch node_modules/grunt-contrib-qunit/chrome/bridge.js
+
+tar -z -c --group root --owner root -f ${curdir}/${jsname}-${version}-node-modules.tar.gz node_modules
+
+cd ${curdir}
+rm -rf ${tmpdir}
diff --git a/js-jquery-ui.spec b/js-jquery-ui.spec
new file mode 100644
index 0000000..50864d2
--- /dev/null
+++ b/js-jquery-ui.spec
@@ -0,0 +1,52 @@
+%global jsname jquery-ui
+
+Name: js-%{jsname}
+Version: 1.13.2
+Release: 1
+Summary: jQuery user interface
+
+License: MIT
+URL: https://jqueryui.com/
+Source0: https://github.com/jquery/%{jsname}/archive/%{version}/%{jsname}-%{version}.tar.gz
+# We need to bundle build dependencies since they are no
+# longer available in Fedora. This uses the same
+# technique as the js-jquery package.
+Source1: %{jsname}-%{version}-node-modules.tar.gz
+# Script to create the above sources
+Source2: create-source.sh
+
+BuildArch: noarch
+BuildRequires: nodejs >= 1:10
+BuildRequires: web-assets-devel
+BuildRequires: python3-rcssmin
+Requires: js-jquery >= 1.8.0
+Requires: web-assets-filesystem
+
+%description
+A curated set of user interface interactions, effects, widgets, and
+themes built on top of the jQuery JavaScript Library.
+
+%prep
+%setup -q -n %{jsname}-%{version} -a 1
+rm -rf dist
+
+%build
+./node_modules/grunt-cli/bin/grunt -v requirejs:js concat:css uglify:main
+
+# Provide a compressed version of the cascading style sheet
+python3 -m rcssmin -b < dist/jquery-ui.css > dist/jquery-ui.min.css
+
+%install
+mkdir -p %{buildroot}%{_jsdir}/%{jsname}
+install -m 644 -p dist/* %{buildroot}%{_jsdir}/%{jsname}
+mkdir -p %{buildroot}%{_jsdir}/%{jsname}/images
+install -m 644 -p themes/base/images/* %{buildroot}%{_jsdir}/%{jsname}/images
+
+%files
+%{_jsdir}/%{jsname}
+%license LICENSE.txt
+%doc AUTHORS.txt CONTRIBUTING.md README.md
+
+%changelog
+* Wed May 17 2023 lichaoran <pkwarcraft@hotmail.com> - 1.13.2-1
+- Init package
diff --git a/sources b/sources
new file mode 100644
index 0000000..63d64cc
--- /dev/null
+++ b/sources
@@ -0,0 +1,2 @@
+6944b7d9fb09c30e281076043e2b6843 jquery-ui-1.13.2-node-modules.tar.gz
+6656b4967bad158e36929b8c40c6c548 jquery-ui-1.13.2.tar.gz