diff --git a/nodejs.pc.in b/nodejs.pc.in new file mode 100644 index 0000000..a699363 --- /dev/null +++ b/nodejs.pc.in @@ -0,0 +1,9 @@ +prefix=@PREFIX@ +includedir=@INCLUDEDIR@ +libdir=@LIBDIR@ + +Name: @PKGCONFNAME@ +Description: JavaScript Runtime +Version: @NODEJS_VERSION@ +Libs: -L${libdir} -lnodejs +Cflags: -I${includedir}/node diff --git a/nodejs20.spec b/nodejs20.spec index 9f963d8..8081866 100644 --- a/nodejs20.spec +++ b/nodejs20.spec @@ -35,16 +35,18 @@ %global nodejs_release %{baserelease} %global nodejs_envr %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} -%global nodejs_datadir %{_datarootdir}/node-%{nodejs_major} +%global nodejs_pkg_major 20 + +%global nodejs_datadir %{_datarootdir}/node-%{nodejs_pkg_major} # Determine if this should be the default version for this Fedora release # The default version will own /usr/bin/node and friends %if 0%{?fedora} == 39 || 0%{?fedora} == 40 || 0%{?rhel} == 10 -%global nodejs_default %{nodejs_major} +%global nodejs_default %{nodejs_pkg_major} %endif %global nodejs_default_sitelib %{_prefix}/lib/node_modules -%global nodejs_private_sitelib %{nodejs_default_sitelib}_%{nodejs_major} +%global nodejs_private_sitelib %{nodejs_default_sitelib}_%{nodejs_pkg_major} # == Bundled Dependency Versions == @@ -112,7 +114,7 @@ %global histogram_version 0.9.7 -Name: nodejs20 +Name: nodejs%{nodejs_pkg_major} Epoch: %{nodejs_epoch} Version: %{nodejs_version} Release: %{nodejs_release} @@ -132,7 +134,9 @@ Source2: btest402.js # The binary data that icu-small can use to get icu-full capability Source3: https://github.com/unicode-org/icu/releases/download/release-%{icu_major}-%{icu_minor}/icu4c-%{icu_major}_%{icu_minor}-data-bin-b.zip Source4: https://github.com/unicode-org/icu/releases/download/release-%{icu_major}-%{icu_minor}/icu4c-%{icu_major}_%{icu_minor}-data-bin-l.zip -Source100: nodejs-sources.sh +Source200: nodejs-sources.sh +Source202: nodejs.pc.in +Source203: v8.pc.in # These are full sources for dependencies included as WASM blobs in the source of Node itself. # Note: These sources would also include pre-compiled WASM blobs… so they are adjusted not to. @@ -174,6 +178,7 @@ BuildRequires: gcc >= 8.3.0 BuildRequires: gcc-c++ >= 8.3.0 %endif +BuildRequires: pkgconf BuildRequires: jq # needed to generate bundled provides for npm dependencies @@ -554,29 +559,29 @@ chmod 0755 %{buildroot}/%{_bindir}/node chrpath --delete %{buildroot}%{_bindir}/node # Rename the node binary -mv %{buildroot}%{_bindir}/node %{buildroot}%{_bindir}/node-%{nodejs_major} +mv %{buildroot}%{_bindir}/node %{buildroot}%{_bindir}/node-%{nodejs_pkg_major} # Move the npm binary to npm-NODEJS_MAJOR rm -f %{buildroot}%{_bindir}/npm ln -srf %{buildroot}%{nodejs_private_sitelib}/npm/bin/npm-cli.js \ - %{buildroot}%{_bindir}/npm-%{nodejs_major} + %{buildroot}%{_bindir}/npm-%{nodejs_pkg_major} # Move the npx binary to npm-NODEJS_MAJOR rm -f %{buildroot}%{_bindir}/npx ln -srf %{buildroot}%{nodejs_private_sitelib}/npm/bin/npx-cli.js \ - %{buildroot}%{_bindir}/npx-%{nodejs_major} + %{buildroot}%{_bindir}/npx-%{nodejs_pkg_major} # Add the symlinks back for the default version %if 0%{?nodejs_default} -ln -srf %{buildroot}%{_bindir}/node-%{nodejs_major} \ +ln -srf %{buildroot}%{_bindir}/node-%{nodejs_pkg_major} \ %{buildroot}%{_bindir}/node -ln -srf %{buildroot}%{_bindir}/npm-%{nodejs_major} \ +ln -srf %{buildroot}%{_bindir}/npm-%{nodejs_pkg_major} \ %{buildroot}%{_bindir}/npm -ln -srf %{buildroot}%{_bindir}/npx-%{nodejs_major} \ +ln -srf %{buildroot}%{_bindir}/npx-%{nodejs_pkg_major} \ %{buildroot}%{_bindir}/npx %endif @@ -616,18 +621,18 @@ mv %{buildroot}%{_includedir}/node/config.gypi \ # Install the GDB init tool into the documentation directory mv %{buildroot}/%{_datadir}/doc/node/gdbinit %{buildroot}/%{_pkgdocdir}/gdbinit -mkdir -p %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/man1 \ - %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/man5 \ - %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/man7 \ +mkdir -p %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/man1 \ + %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/man5 \ + %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/man7 \ %{buildroot}%{nodejs_default_sitelib}/npm/man \ %{buildroot}%{nodejs_private_sitelib}/npm/man \ %{buildroot}%{_pkgdocdir}/npm # install manpage docs to mandir cp -pr deps/npm/man/* \ - %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/ + %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/ rm -rf %{buildroot}%{nodejs_private_sitelib}/npm/man -ln -srf %{buildroot}%{_mandir}/nodejs-%{nodejs_major} \ +ln -srf %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major} \ %{buildroot}%{nodejs_private_sitelib}/npm/man %if 0%{?nodejs_default} @@ -643,10 +648,10 @@ done # Install the node interpreter manpage mv %{buildroot}%{_mandir}/man1/node.1 \ - %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/man1/ + %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/man1/ %if 0%{?nodejs_default} -ln -srf %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/man1/node.1 \ +ln -srf %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/man1/node.1 \ %{buildroot}%{_mandir}/man1/ %endif @@ -693,21 +698,37 @@ unzip -d %{buildroot}%{icudatadir} %{SOURCE4} icudt%{icu_major}l.dat unzip -d %{buildroot}%{icudatadir} %{SOURCE3} icudt%{icu_major}b.dat %endif +# Add pkg-config files +mkdir -p %{buildroot}%{_libdir}/pkgconfig +sed -e 's#@PREFIX@#%{_prefix}#g' \ + -e 's#@INCLUDEDIR@#%{_includedir}#g' \ + -e 's#@LIBDIR@#%{_libdir}#g' \ + -e 's#@PKGCONFNAME@#nodejs-%{nodejs_pkg_major}#g' \ + -e 's#@NODEJS_VERSION@#%{nodejs_version}#g' \ + %{SOURCE202} > %{buildroot}%{_libdir}/pkgconfig/nodejs-%{nodejs_pkg_major}.pc + +sed -e 's#@PREFIX@#%{_prefix}#g' \ + -e 's#@INCLUDEDIR@#%{_includedir}#g' \ + -e 's#@LIBDIR@#%{_libdir}#g' \ + -e 's#@PKGCONFVERSION@#v8-%{v8_major}.%{v8_minor}#g' \ + -e 's#@V8_VERSION@#%{v8_version}#g' \ + %{SOURCE203} > %{buildroot}%{_libdir}/pkgconfig/v8-%{v8_major}.%{v8_minor}.pc + %check # Fail the build if the versions don't match -LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_major} -e "require('assert').equal(process.versions.node, '%{nodejs_version}')" -LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_major} -e "require('assert').equal(process.versions.v8.replace(/-node\.\d+$/, ''), '%{v8_version}')" -LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_major} -e "require('assert').equal(process.versions.ares.replace(/-DEV$/, ''), '%{c_ares_version}')" +LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} -e "require('assert').equal(process.versions.node, '%{nodejs_version}')" +LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} -e "require('assert').equal(process.versions.v8.replace(/-node\.\d+$/, ''), '%{v8_version}')" +LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} -e "require('assert').equal(process.versions.ares.replace(/-DEV$/, ''), '%{c_ares_version}')" # Ensure we have punycode and that the version matches -LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_major} -e "require(\"assert\").equal(require(\"punycode\").version, '%{punycode_version}')" +LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} -e "require(\"assert\").equal(require(\"punycode\").version, '%{punycode_version}')" # Ensure we have npm and that the version matches -LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/node-%{nodejs_major} %{buildroot}%{_bindir}/npm-%{nodejs_major} version --json |jq -e '.npm == "%{npm_version}"' +LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/node-%{nodejs_pkg_major} %{buildroot}%{_bindir}/npm-%{nodejs_pkg_major} version --json |jq -e '.npm == "%{npm_version}"' # Make sure i18n support is working -NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{nodejs_private_sitelib}/npm/node_modules LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_major} --icu-data-dir=%{buildroot}%{icudatadir} %{SOURCE2} +NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{nodejs_private_sitelib}/npm/node_modules LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} --icu-data-dir=%{buildroot}%{icudatadir} %{SOURCE2} %if 0%{?rhel} && 0%{?rhel} < 8 @@ -754,10 +775,10 @@ end %endif -%{_bindir}/node-%{nodejs_major} +%{_bindir}/node-%{nodejs_pkg_major} %{nodejs_private_sitelib} -%doc %{_mandir}/nodejs-%{nodejs_major}/man1/node.1* +%doc %{_mandir}/nodejs-%{nodejs_pkg_major}/man1/node.1* %files -n %{pkgname}-devel @@ -765,6 +786,7 @@ end %{_libdir}/libnode.so %{nodejs_datadir}/common.gypi %{_pkgdocdir}/gdbinit +%{_libdir}/pkgconfig/nodejs-%{nodejs_pkg_major}.pc %files -n %{pkgname}-full-i18n @@ -792,6 +814,7 @@ end %{_libdir}/libv8.so %{_libdir}/libv8_libbase.so %{_libdir}/libv8_libplatform.so +%{_libdir}/pkgconfig/v8-%{v8_major}.%{v8_minor}.pc %files -n %{pkgname}-npm @@ -806,12 +829,12 @@ end %exclude %doc %{_mandir}/man1/node.1* %endif -%{_bindir}/npm-%{nodejs_major} -%{_bindir}/npx-%{nodejs_major} +%{_bindir}/npm-%{nodejs_pkg_major} +%{_bindir}/npx-%{nodejs_pkg_major} %{nodejs_private_sitelib}/npm -%doc %{_mandir}/nodejs-%{nodejs_major}/ -%exclude %doc %{_mandir}/nodejs-%{nodejs_major}/man1/node.1* +%doc %{_mandir}/nodejs-%{nodejs_pkg_major}/ +%exclude %doc %{_mandir}/nodejs-%{nodejs_pkg_major}/man1/node.1* %files -n %{pkgname}-docs diff --git a/packaging/nodejs.spec.j2 b/packaging/nodejs.spec.j2 index fc44075..825c91d 100644 --- a/packaging/nodejs.spec.j2 +++ b/packaging/nodejs.spec.j2 @@ -35,16 +35,18 @@ %global nodejs_release %{baserelease} %global nodejs_envr %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} -%global nodejs_datadir %{_datarootdir}/node-%{nodejs_major} +%global nodejs_pkg_major {{ NODE_PKG_MAJOR }} + +%global nodejs_datadir %{_datarootdir}/node-%{nodejs_pkg_major} # Determine if this should be the default version for this Fedora release # The default version will own /usr/bin/node and friends %if 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_LOW }} || 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_HIGH }}{{ RHEL_DEFAULT_RELEASE }} -%global nodejs_default %{nodejs_major} +%global nodejs_default %{nodejs_pkg_major} %endif %global nodejs_default_sitelib %{_prefix}/lib/node_modules -%global nodejs_private_sitelib %{nodejs_default_sitelib}_%{nodejs_major} +%global nodejs_private_sitelib %{nodejs_default_sitelib}_%{nodejs_pkg_major} # == Bundled Dependency Versions == @@ -112,7 +114,7 @@ %global histogram_version 0.9.7 -Name: nodejs{{ NODE_PKG_MAJOR }} +Name: nodejs%{nodejs_pkg_major} Epoch: %{nodejs_epoch} Version: %{nodejs_version} Release: %{nodejs_release} @@ -132,7 +134,9 @@ Source2: btest402.js # The binary data that icu-small can use to get icu-full capability Source3: https://github.com/unicode-org/icu/releases/download/release-%{icu_major}-%{icu_minor}/icu4c-%{icu_major}_%{icu_minor}-data-bin-b.zip Source4: https://github.com/unicode-org/icu/releases/download/release-%{icu_major}-%{icu_minor}/icu4c-%{icu_major}_%{icu_minor}-data-bin-l.zip -Source100: nodejs-sources.sh +Source200: nodejs-sources.sh +Source202: nodejs.pc.in +Source203: v8.pc.in # These are full sources for dependencies included as WASM blobs in the source of Node itself. # Note: These sources would also include pre-compiled WASM blobs… so they are adjusted not to. @@ -176,6 +180,7 @@ BuildRequires: gcc >= 8.3.0 BuildRequires: gcc-c++ >= 8.3.0 %endif +BuildRequires: pkgconf BuildRequires: jq # needed to generate bundled provides for npm dependencies @@ -566,29 +571,29 @@ chmod 0755 %{buildroot}/%{_bindir}/node chrpath --delete %{buildroot}%{_bindir}/node # Rename the node binary -mv %{buildroot}%{_bindir}/node %{buildroot}%{_bindir}/node-%{nodejs_major} +mv %{buildroot}%{_bindir}/node %{buildroot}%{_bindir}/node-%{nodejs_pkg_major} # Move the npm binary to npm-NODEJS_MAJOR rm -f %{buildroot}%{_bindir}/npm ln -srf %{buildroot}%{nodejs_private_sitelib}/npm/bin/npm-cli.js \ - %{buildroot}%{_bindir}/npm-%{nodejs_major} + %{buildroot}%{_bindir}/npm-%{nodejs_pkg_major} # Move the npx binary to npm-NODEJS_MAJOR rm -f %{buildroot}%{_bindir}/npx ln -srf %{buildroot}%{nodejs_private_sitelib}/npm/bin/npx-cli.js \ - %{buildroot}%{_bindir}/npx-%{nodejs_major} + %{buildroot}%{_bindir}/npx-%{nodejs_pkg_major} # Add the symlinks back for the default version %if 0%{?nodejs_default} -ln -srf %{buildroot}%{_bindir}/node-%{nodejs_major} \ +ln -srf %{buildroot}%{_bindir}/node-%{nodejs_pkg_major} \ %{buildroot}%{_bindir}/node -ln -srf %{buildroot}%{_bindir}/npm-%{nodejs_major} \ +ln -srf %{buildroot}%{_bindir}/npm-%{nodejs_pkg_major} \ %{buildroot}%{_bindir}/npm -ln -srf %{buildroot}%{_bindir}/npx-%{nodejs_major} \ +ln -srf %{buildroot}%{_bindir}/npx-%{nodejs_pkg_major} \ %{buildroot}%{_bindir}/npx %endif @@ -628,18 +633,18 @@ mv %{buildroot}%{_includedir}/node/config.gypi \ # Install the GDB init tool into the documentation directory mv %{buildroot}/%{_datadir}/doc/node/gdbinit %{buildroot}/%{_pkgdocdir}/gdbinit -mkdir -p %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/man1 \ - %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/man5 \ - %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/man7 \ +mkdir -p %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/man1 \ + %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/man5 \ + %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/man7 \ %{buildroot}%{nodejs_default_sitelib}/npm/man \ %{buildroot}%{nodejs_private_sitelib}/npm/man \ %{buildroot}%{_pkgdocdir}/npm # install manpage docs to mandir cp -pr deps/npm/man/* \ - %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/ + %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/ rm -rf %{buildroot}%{nodejs_private_sitelib}/npm/man -ln -srf %{buildroot}%{_mandir}/nodejs-%{nodejs_major} \ +ln -srf %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major} \ %{buildroot}%{nodejs_private_sitelib}/npm/man %if 0%{?nodejs_default} @@ -655,10 +660,10 @@ done # Install the node interpreter manpage mv %{buildroot}%{_mandir}/man1/node.1 \ - %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/man1/ + %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/man1/ %if 0%{?nodejs_default} -ln -srf %{buildroot}%{_mandir}/nodejs-%{nodejs_major}/man1/node.1 \ +ln -srf %{buildroot}%{_mandir}/nodejs-%{nodejs_pkg_major}/man1/node.1 \ %{buildroot}%{_mandir}/man1/ %endif @@ -705,21 +710,37 @@ unzip -d %{buildroot}%{icudatadir} %{SOURCE4} icudt%{icu_major}l.dat unzip -d %{buildroot}%{icudatadir} %{SOURCE3} icudt%{icu_major}b.dat %endif +# Add pkg-config files +mkdir -p %{buildroot}%{_libdir}/pkgconfig +sed -e 's#@PREFIX@#%{_prefix}#g' \ + -e 's#@INCLUDEDIR@#%{_includedir}#g' \ + -e 's#@LIBDIR@#%{_libdir}#g' \ + -e 's#@PKGCONFNAME@#nodejs-%{nodejs_pkg_major}#g' \ + -e 's#@NODEJS_VERSION@#%{nodejs_version}#g' \ + %{SOURCE202} > %{buildroot}%{_libdir}/pkgconfig/nodejs-%{nodejs_pkg_major}.pc + +sed -e 's#@PREFIX@#%{_prefix}#g' \ + -e 's#@INCLUDEDIR@#%{_includedir}#g' \ + -e 's#@LIBDIR@#%{_libdir}#g' \ + -e 's#@PKGCONFVERSION@#v8-%{v8_major}.%{v8_minor}#g' \ + -e 's#@V8_VERSION@#%{v8_version}#g' \ + %{SOURCE203} > %{buildroot}%{_libdir}/pkgconfig/v8-%{v8_major}.%{v8_minor}.pc + %check # Fail the build if the versions don't match -LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_major} -e "require('assert').equal(process.versions.node, '%{nodejs_version}')" -LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_major} -e "require('assert').equal(process.versions.v8.replace(/-node\.\d+$/, ''), '%{v8_version}')" -LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_major} -e "require('assert').equal(process.versions.ares.replace(/-DEV$/, ''), '%{c_ares_version}')" +LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} -e "require('assert').equal(process.versions.node, '%{nodejs_version}')" +LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} -e "require('assert').equal(process.versions.v8.replace(/-node\.\d+$/, ''), '%{v8_version}')" +LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} -e "require('assert').equal(process.versions.ares.replace(/-DEV$/, ''), '%{c_ares_version}')" # Ensure we have punycode and that the version matches -LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_major} -e "require(\"assert\").equal(require(\"punycode\").version, '%{punycode_version}')" +LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} -e "require(\"assert\").equal(require(\"punycode\").version, '%{punycode_version}')" # Ensure we have npm and that the version matches -LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/node-%{nodejs_major} %{buildroot}%{_bindir}/npm-%{nodejs_major} version --json |jq -e '.npm == "%{npm_version}"' +LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/node-%{nodejs_pkg_major} %{buildroot}%{_bindir}/npm-%{nodejs_pkg_major} version --json |jq -e '.npm == "%{npm_version}"' # Make sure i18n support is working -NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{nodejs_private_sitelib}/npm/node_modules LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_major} --icu-data-dir=%{buildroot}%{icudatadir} %{SOURCE2} +NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{nodejs_private_sitelib}/npm/node_modules LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} --icu-data-dir=%{buildroot}%{icudatadir} %{SOURCE2} %if 0%{?rhel} && 0%{?rhel} < 8 @@ -772,10 +793,10 @@ end {% endif %} %endif -%{_bindir}/node-%{nodejs_major} +%{_bindir}/node-%{nodejs_pkg_major} %{nodejs_private_sitelib} -%doc %{_mandir}/nodejs-%{nodejs_major}/man1/node.1* +%doc %{_mandir}/nodejs-%{nodejs_pkg_major}/man1/node.1* %files -n %{pkgname}-devel @@ -783,6 +804,7 @@ end %{_libdir}/libnode.so %{nodejs_datadir}/common.gypi %{_pkgdocdir}/gdbinit +%{_libdir}/pkgconfig/nodejs-%{nodejs_pkg_major}.pc %files -n %{pkgname}-full-i18n @@ -810,6 +832,7 @@ end %{_libdir}/libv8.so %{_libdir}/libv8_libbase.so %{_libdir}/libv8_libplatform.so +%{_libdir}/pkgconfig/v8-%{v8_major}.%{v8_minor}.pc %files -n %{pkgname}-npm @@ -824,12 +847,12 @@ end %exclude %doc %{_mandir}/man1/node.1* %endif -%{_bindir}/npm-%{nodejs_major} -%{_bindir}/npx-%{nodejs_major} +%{_bindir}/npm-%{nodejs_pkg_major} +%{_bindir}/npx-%{nodejs_pkg_major} %{nodejs_private_sitelib}/npm -%doc %{_mandir}/nodejs-%{nodejs_major}/ -%exclude %doc %{_mandir}/nodejs-%{nodejs_major}/man1/node.1* +%doc %{_mandir}/nodejs-%{nodejs_pkg_major}/ +%exclude %doc %{_mandir}/nodejs-%{nodejs_pkg_major}/man1/node.1* %files -n %{pkgname}-docs diff --git a/v8.pc.in b/v8.pc.in new file mode 100644 index 0000000..6b63094 --- /dev/null +++ b/v8.pc.in @@ -0,0 +1,9 @@ +prefix=@PREFIX@ +includedir=@INCLUDEDIR@ +libdir=@LIBDIR@ + +Name: v8-@PKGCONFVERSION@ +Description: JavaScript Runtime +Version: @V8_VERSION@ +Libs: -L${libdir} -lv8 +Cflags: -I${includedir}