chore: add debian packaging (#747)

This adds a "debian" command to the linux build script. It uses
electron-installer-debian to create a debian package.
This commit is contained in:
David Lechner 2016-10-05 11:30:06 -05:00 committed by Juan Cruz Viotti
parent 5924109371
commit f28b5a859b
4 changed files with 83 additions and 1 deletions

View File

@ -22,6 +22,8 @@ addons:
- gcc-4.8
- g++-4.8
- clang
- dpkg
- fakeroot
before_install:
- rm -rf ~/.nvm
@ -41,6 +43,7 @@ install:
fi
- gem install scss_lint
- npm install -g bower
- npm install -g electron-installer-debian
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
./scripts/build/linux.sh install x64;
fi

View File

@ -0,0 +1,51 @@
{
"name": "etcher-electron",
"productName": "Etcher",
"genericName": "Etcher",
"homepage": "https://www.etcher.io/",
"icon": "assets/icon.png",
"bin": "etcher-electron.sh",
"categories": [
"Utility"
],
"depends": [
"gconf-service",
"libasound2",
"libatk1.0-0",
"libc6",
"libcairo2",
"libcups2",
"libdbus-1-3",
"libexpat1",
"libfontconfig1",
"libfreetype6",
"libgcc1",
"libgconf-2-4",
"libgdk-pixbuf2.0-0",
"libglib2.0-0",
"libgtk2.0-0",
"liblzma5",
"libnspr4",
"libnss3",
"libpango1.0-0",
"libstdc++6",
"libx11-6",
"libxcomposite1",
"libxcursor1",
"libxdamage1",
"libxext6",
"libxfixes3",
"libxi6",
"libxrandr2",
"libxrender1",
"libxss1",
"libxtst6"
],
"recommends": [
"libnotify4"
],
"suggests": [],
"lintianOverrides": [
"changelog-file-missing-in-native-package"
]
}

View File

@ -0,0 +1,4 @@
#!/bin/sh
export ETCHER_DISABLE_UPDATES=1
/usr/share/etcher-electron/etcher "$@"

View File

@ -43,11 +43,18 @@ if [ "$#" -ne 2 ]; then
fi
COMMAND=$1
if [ "$COMMAND" != "install" ] && [ "$COMMAND" != "package" ] && [ "$COMMAND" != "appimage" ] && [ "$COMMAND" != "all" ]; then
if [ "$COMMAND" != "install" ] && [ "$COMMAND" != "package" ] && [ "$COMMAND" != "debian" ] && [ "$COMMAND" != "appimage" ] && [ "$COMMAND" != "all" ]; then
echo "Unknown command: $COMMAND" 1>&2
exit 1
fi
if [ "$COMMAND" == "debian" ] || [ "$COMMAND" == "all" ]; then
if ! command -v electron-installer-debian 2>/dev/null; then
echo "Dependency missing: electron-installer-debian" 1>&2
exit 1
fi
fi
if [ "$COMMAND" == "appimage" ] || [ "$COMMAND" == "all" ]; then
if ! command -v upx 2>/dev/null; then
echo "Dependency missing: upx" 1>&2
@ -172,6 +179,23 @@ if [ "$COMMAND" == "package" ] || [ "$COMMAND" == "all" ]; then
fi
fi
if [ "$COMMAND" == "debian" ] || [ "$COMMAND" == "all" ]; then
if [ "$ARCH" == "x86" ]; then
DEBARCH=i386
fi
if [ "$ARCH" == "x64" ]; then
DEBARCH=amd64
fi
cp scripts/build/debian/etcher-electron.sh etcher-release/Etcher-linux-$ARCH/
electron-installer-debian --src etcher-release/Etcher-linux-$ARCH \
--dest etcher-release/installers \
--config scripts/build/debian/config.json \
--arch $DEBARCH
rm etcher-release/Etcher-linux-$ARCH/etcher-electron.sh
fi
if [ "$COMMAND" == "appimage" ] || [ "$COMMAND" == "all" ]; then
if [ "$ARCH" == "x86" ]; then
# UPX fails for some reason with some other so libraries