diff --git a/contrib/setup/build_js.sh b/contrib/setup/build_js.sh index ddb48d1..41f2148 100755 --- a/contrib/setup/build_js.sh +++ b/contrib/setup/build_js.sh @@ -5,13 +5,13 @@ if [ -n "$MESON_SOURCE_ROOT" ]; then cd "$MESON_SOURCE_ROOT/contrib/setup/" fi -YARNPKG="yarn" +NPM="npm" if [ ! -z "$1" ] then - YARNPKG=$1 + NPM=$1 fi -$YARNPKG install $ASGEN_YARN_EXTRA_ARGS --prod --non-interactive +$NPM install --no-save JS_TARGET=../../data/templates/default/static/js [ ! -d "$JS_TARGET" ] && mkdir $JS_TARGET diff --git a/contrib/setup/yarn.lock b/contrib/setup/yarn.lock deleted file mode 100644 index cb50104..0000000 --- a/contrib/setup/yarn.lock +++ /dev/null @@ -1,18 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -highlightjs@^9.10.0: - version "9.16.2" - resolved "https://registry.yarnpkg.com/highlightjs/-/highlightjs-9.16.2.tgz#07ea6cc7c93340fc440734fb7abf28558f1f0fe1" - integrity sha512-FK1vmMj8BbEipEy8DLIvp71t5UsC7n2D6En/UfM/91PCwmOpj6f2iu0Y0coRC62KSRHHC+dquM2xMULV/X7NFg== - -jquery-flot@^0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/jquery-flot/-/jquery-flot-0.8.3.tgz#a273acf43f13190f6e78701869ee24bfef12c22a" - integrity sha512-IkQCsA5t55Aubu8iove/X/KL34rdZTsDyx/bylC7F320N2bwsJhJe3Np8orsx1L8FEOoMDfNe3/pSb3xXKLxeQ== - -jquery@^3.3.1: - version "3.6.4" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.4.tgz#ba065c188142100be4833699852bf7c24dc0252f" - integrity sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ== diff --git a/meson.build b/meson.build index 8207b9e..2ba953e 100644 --- a/meson.build +++ b/meson.build @@ -17,13 +17,13 @@ fs = import('fs') # src_dir = include_directories('src/') -glib_dep = dependency('glib-2.0', version: '>= 2.62') -glibd_dep = dependency('glibd-2.0') -appstream_dep = dependency('appstream', version : '>= 1.0.0') -ascompose_dep = dependency('appstream-compose', version : '>= 1.0.0') -lmdb_dep = dependency('lmdb', version : '>= 0.9.22') -archive_dep = dependency('libarchive', version : '>= 3.2') -curl_dep = dependency('libcurl') +glib_dep = dependency('glib-2.0', version: '>= 2.62') +glibd_dep = dependency('glibd-2.0') +appstream_dep = dependency('appstream', version : '>= 1.0.0') +ascompose_dep = dependency('appstream-compose', version : '>= 1.0.0') +lmdb_dep = dependency('lmdb', version : '>= 0.9.22') +archive_dep = dependency('libarchive', version : '>= 3.2') +curl_dep = dependency('libcurl') dxml_dep = dependency('', required: false) if get_option('rpmmd') @@ -67,12 +67,12 @@ girbind_lib = static_library('girbindings', # Download JS stuff and additional sources if we couldn't find them # if get_option('download-js') - yarn_exe = find_program('/usr/share/yarn/bin/yarn', 'yarnpkg') # check for the yarn executable + npm_exe = find_program('npm') if not fs.is_dir(source_root / 'data' / 'templates' / 'default' / 'static' / 'js') message('Downloading JavaScript libraries...') - getjs_cmd = run_command([source_root + '/contrib/setup/build_js.sh', yarn_exe], check: false) + getjs_cmd = run_command([source_root + '/contrib/setup/build_js.sh', npm_exe], check: false) if getjs_cmd.returncode() != 0 - error('Unable to download JavaScript files with Yarn:\n' + getjs_cmd.stdout() + getjs_cmd.stderr()) + error('Unable to download JavaScript files with NPM:\n' + getjs_cmd.stdout() + getjs_cmd.stderr()) endif endif endif diff --git a/meson_options.txt b/meson_options.txt index 109dcca..1387309 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,7 +10,7 @@ option('rpmmd', option('download-js', type: 'boolean', value: true, - description: 'Download JavaScript with Yarn automatically.' + description: 'Download JavaScript with NPM automatically.' ) option('gir-dir', type: 'string', diff --git a/snapcraft.yaml b/snapcraft.yaml index c898cd3..cade857 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -105,10 +105,6 @@ parts: build-environment: - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/ override-build: | - # install yarn - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list - apt-get update && apt-get install --no-install-recommends -y yarn nodejs # actually build asgen - we need to run everything manually here, # because snapcraft will kill the build if run with maximum amount of ninja jobs, # and I found no way to limit the amount of permitted ninja jobs other than overriding everything @@ -136,6 +132,7 @@ parts: - docbook-xsl - docbook-xml - ffmpeg + - npm - libarchive-dev - libcairo2-dev - libcurl4-gnutls-dev diff --git a/tests/ci/install-deps-deb.sh b/tests/ci/install-deps-deb.sh index 6fe4389..f69a753 100755 --- a/tests/ci/install-deps-deb.sh +++ b/tests/ci/install-deps-deb.sh @@ -55,12 +55,6 @@ else gdk_pixbuf_dep="libgdk-pixbuf-2.0-dev" fi; -yarnpkg_dep="yarnpkg" -if dpkg -s yarn >/dev/null 2>&1; then - # if the conflicting "yarn" package was already installed, - # don't try to install yarnpkg - yarnpkg_dep="" -fi eatmydata apt-get install -yq --no-install-recommends \ $gdk_pixbuf_dep \ librsvg2-dev \ @@ -73,4 +67,4 @@ eatmydata apt-get install -yq --no-install-recommends \ curl \ gnupg \ ffmpeg \ - $yarnpkg_dep + npm diff --git a/tests/ci/install-deps-rpm.sh b/tests/ci/install-deps-rpm.sh index c25b568..74ac76f 100755 --- a/tests/ci/install-deps-rpm.sh +++ b/tests/ci/install-deps-rpm.sh @@ -52,4 +52,4 @@ dnf --assumeyes --quiet --setopt=install_weak_deps=False install \ /usr/bin/ffmpeg \ /usr/bin/node \ /usr/bin/xsltproc \ - /usr/bin/yarnpkg + /usr/bin/npm