commit a4c1fc504e231c6729f6109b277e0ebde84afe0c Author: Skylar Ittner Date: Sat Jun 1 14:57:57 2019 -0600 Create packaging script and files for nw.js diff --git a/debian/DEBIAN/control b/debian/DEBIAN/control new file mode 100644 index 0000000..e3f4eba --- /dev/null +++ b/debian/DEBIAN/control @@ -0,0 +1,9 @@ +Package: nw.js-normal +Version: VERSION +Maintainer: Netsyms Technologies +Section: web +Homepage: https://nwjs.io/ +Priority: optional +Description: Debian package for the NW.js runtime. + Built using official "normal" binaries from https://nwjs.io +Architecture: ARCH diff --git a/debian/DEBIAN/copyright b/debian/DEBIAN/copyright new file mode 100644 index 0000000..1878b9c --- /dev/null +++ b/debian/DEBIAN/copyright @@ -0,0 +1,20 @@ +Copyright (c) 2011-2019 NW.js Authors +Copyright (c) 2011-2019 The Chromium Authors +Copyright (c) 2011-2018 Intel Corp + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in th +e Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, subj +ect to the following conditions: + +The above copyright notice and this permission notice shall be included in all c +opies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI +ED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR +A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYR +IGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WIT +H THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/debian/usr/bin/nwjs b/debian/usr/bin/nwjs new file mode 100755 index 0000000..feb1ca0 --- /dev/null +++ b/debian/usr/bin/nwjs @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ $# -eq 0 ]; then + APP_DIR="." +else + APP_DIR=$1 +fi +echo $APP_DIR +/usr/lib/nw.js/nw $APP_DIR diff --git a/debian/usr/share/doc/nw.js-normal/copyright b/debian/usr/share/doc/nw.js-normal/copyright new file mode 100644 index 0000000..1878b9c --- /dev/null +++ b/debian/usr/share/doc/nw.js-normal/copyright @@ -0,0 +1,20 @@ +Copyright (c) 2011-2019 NW.js Authors +Copyright (c) 2011-2019 The Chromium Authors +Copyright (c) 2011-2018 Intel Corp + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in th +e Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, subj +ect to the following conditions: + +The above copyright notice and this permission notice shall be included in all c +opies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI +ED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR +A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYR +IGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WIT +H THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/scripts/debian_build.sh b/scripts/debian_build.sh new file mode 100644 index 0000000..24b63c1 --- /dev/null +++ b/scripts/debian_build.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# $1 is the arch, $2 is the version, $3 is the binary tarball URL +mkdir out + +# Fill in real architecture and version info +sed -i '/ARCH/$1' debian/DEBIAN/control +sed -i '/VERSION/$2' debian/DEBIAN/control + +# Clean and remake binary folder +rm -rf debian/usr/lib/nw.js +mkdir -p debian/usr/lib/nw.js + +# Download binary +echo "Downloading and unpacking $3" +wget -q -O- $3 | tar -xvz --strip 1 -C debian/usr/lib/nw.js + +echo "Packaging deb file nwjs-normal_$2-1_$1.deb" +dpkg-deb -b debian "out/nwjs-normal_$2-1_$1.deb"