Index: remoting/host/installer/linux/build-deb.sh |
diff --git a/remoting/host/installer/linux/build-deb.sh b/remoting/host/installer/linux/build-deb.sh |
new file mode 100755 |
index 0000000000000000000000000000000000000000..434ad7d09f8b0b720a03711abdf3654a36c8aee8 |
--- /dev/null |
+++ b/remoting/host/installer/linux/build-deb.sh |
@@ -0,0 +1,51 @@ |
+#!/bin/bash -e |
+ |
+# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+if [ "$(id -u)" != 0 ]; then |
+ echo "This tool must be run as root (or use fakeroot)." |
+ exit 1 |
+fi |
+ |
+PACKAGE=chrome-remote-desktop |
+BUILD_DIR=./$PACKAGE |
+SRC_DIR=../../../.. |
+BIN_DIR=$BUILD_DIR/usr/bin |
+DOC_DIR=$BUILD_DIR/usr/share/doc/$PACKAGE |
+CONTROL_DIR=$BUILD_DIR/DEBIAN |
+ |
+version_full=${version_full:-1.2.3.4} |
+ |
+rm -rf $BUILD_DIR |
+mkdir -p $BIN_DIR $DOC_DIR $CONTROL_DIR |
+chmod -R 755 $BIN_DIR $DOC_DIR $CONTROL_DIR |
+ |
+SCRIPTS="remoting/tools/gaia_auth.py \ |
+ remoting/tools/keygen.py \ |
+ remoting/tools/me2me_virtual_host.py" |
+BINARIES="out/Release/remoting_host_keygen \ |
+ out/Release/remoting_me2me_host" |
+ |
+for file in $SCRIPTS $BINARIES; do |
+ cp "$SRC_DIR/$file" $BIN_DIR |
+ filename=$(basename "$file") |
+ if [ -x "$BIN_DIR/$filename" ]; then |
+ chmod 755 "$BIN_DIR/$filename" |
+ else |
+ chmod 644 "$BIN_DIR/$filename" |
+ fi |
+ strip "$BIN_DIR/$filename" 2>/dev/null || true |
+done |
+ |
+cp copyright $DOC_DIR |
+chmod 644 $DOC_DIR/copyright |
+ |
+sed "s/@version_full@/$version_full/; s/#.*//" \ |
+ < "$SRC_DIR/remoting/host/installer/linux/control" \ |
+ > "$CONTROL_DIR/control" |
+ |
+#dpkg-shlibdeps -Tsubstvars $BINARIES |
+ |
+dpkg-deb --build $BUILD_DIR |