## ## node-inspector.spec -- OpenPKG RPM Package Specification ## Copyright (c) 2000-2022 OpenPKG Project ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## # package version %define V_inspector 0.12.8 %define V_inspector_snap 20170101 # package information Name: node-inspector Summary: Node Inspector URL: https://npmjs.org/package/node-inspector Vendor: Danny Coates et al. Packager: OpenPKG Project Distribution: OpenPKG Community Class: EVAL Group: Language License: MIT Version: %{V_inspector} Release: 20170115 # list of sources Source0: http://download.openpkg.org/components/versioned/node-inspector/node-inspector-%{V_inspector}-%{V_inspector_snap}.tar.gz Source1: node-inspector.sh Source2: node-debugger.sh # build information BuildPreReq: OpenPKG, openpkg >= 20160101, node-openpkg PreReq: OpenPKG, openpkg >= 20160101, node %description This is a variant of Google Chrome's Web Inspector for debugging Node.js based backend applications. %track prog node-inspector = { version = %{V_inspector}-%{V_inspector_snap} url = http://download.openpkg.org/components/versioned/node-inspector/ regex = node-inspector-(__VER__)\.tar\.gz } %prep %setup -q -c %build export NODE_GYP="%{l_prefix}/share/npm/node-gyp" node_gyp="%{l_prefix}/lib/node/pkg/npm/bin/node-gyp-bin/node-gyp" for dir in `find . -name package.json -print | xargs grep '"install":' | sed -e 's;/package\.json:.*;;'`; do ( cd $dir npm run-script install ) || exit $? done %{l_prefix}/bin/node-openpkg squeeze %install %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/bin \ $RPM_BUILD_ROOT%{l_prefix}/lib/node-inspector %{l_shtool} install -c -m 755 %{l_value -s -a} \ %{SOURCE node-inspector.sh} \ $RPM_BUILD_ROOT%{l_prefix}/bin/node-inspector %{l_shtool} install -c -m 755 %{l_value -s -a} \ %{SOURCE node-debugger.sh} \ $RPM_BUILD_ROOT%{l_prefix}/bin/node-debugger %{l_prefix}/bin/node-openpkg install \ %{l_prefix}/lib/node-inspector/ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} %files -f files %clean