diff options
author | abeera@google.com <abeera@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-17 05:56:37 +0000 |
---|---|---|
committer | abeera@google.com <abeera@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-17 05:56:37 +0000 |
commit | cc5bd6e24bbb4da4aecbd11217e1e7e04d391fce (patch) | |
tree | 371600e1a9b72bb9871bf417e62524a980f4eda4 /cloud_print | |
parent | fb816c76f13b8eca0202f610746ef74c9c2c1f82 (diff) | |
download | chromium_src-cc5bd6e24bbb4da4aecbd11217e1e7e04d391fce.zip chromium_src-cc5bd6e24bbb4da4aecbd11217e1e7e04d391fce.tar.gz chromium_src-cc5bd6e24bbb4da4aecbd11217e1e7e04d391fce.tar.bz2 |
Packaging scripts for Mac and Linux Cloud Print Drivers.
Spun off from http://codereview.chromium.org/7599018/ to facilitate try server usage.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7670010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-rwxr-xr-x | cloud_print/virtual_driver/posix/linux_packaging/build.sh | 60 | ||||
-rwxr-xr-x | cloud_print/virtual_driver/posix/mac_packaging/build_mac.sh | 47 |
2 files changed, 107 insertions, 0 deletions
diff --git a/cloud_print/virtual_driver/posix/linux_packaging/build.sh b/cloud_print/virtual_driver/posix/linux_packaging/build.sh new file mode 100755 index 0000000..e42791f --- /dev/null +++ b/cloud_print/virtual_driver/posix/linux_packaging/build.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# +# Copyright (c) 2011 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. + +set -u +set -e + +# Change to directory in which we are located. +SCRIPTDIR=$(readlink -f "$(dirname "$0")") +cd $SCRIPTDIR + +PACKAGE_NAME="gcpdriver" + +# Clean up any old data completely +rm -rf debian + +# Target architecture to same as build host. +if [ "$(uname -m)" = "x86_64" ]; then + TARGETARCH="amd64" +else + TARGETARCH="i386" +fi + +# Set up the required directory structure +mkdir -p debian/usr/lib/cups/backend +mkdir -p debian/usr/share/ppd/GCP +mkdir -p debian/usr/share/doc/$PACKAGE_NAME +mkdir -p debian/DEBIAN +chmod 755 debian/DEBIAN + +# Copy files to the correct location +# These files are copied in by the previous GYP target. +mv postinst debian/DEBIAN +mv postrm debian/DEBIAN +mv prerm debian/DEBIAN +mv GCP-driver.ppd debian/usr/share/ppd/GCP +echo "Architecture:${TARGETARCH}" >> debian/DEBIAN/control +cat control >> debian/DEBIAN/control +mv changelog debian/usr/share/doc/$PACKAGE_NAME/ +gzip --best -f debian/usr/share/doc/$PACKAGE_NAME/changelog +mv copyright debian/usr/share/doc/$PACKAGE_NAME/ +mv GCP-driver debian/usr/lib/cups/backend + +# Set permissions as required to roll package +chmod 755 debian/DEBIAN/postinst +chmod 755 debian/DEBIAN/postrm +chmod 755 debian/DEBIAN/prerm +chmod -R 755 debian/usr +chmod 644 debian/usr/share/doc/$PACKAGE_NAME/* +chmod 644 debian/usr/share/ppd/GCP/GCP-driver.ppd + +# Actually roll the package and rename +fakeroot dpkg-deb --build debian +mv debian.deb gcp-driver.deb + +# Clean up +rm -rf debian +rm control
\ No newline at end of file diff --git a/cloud_print/virtual_driver/posix/mac_packaging/build_mac.sh b/cloud_print/virtual_driver/posix/mac_packaging/build_mac.sh new file mode 100755 index 0000000..b142aea --- /dev/null +++ b/cloud_print/virtual_driver/posix/mac_packaging/build_mac.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# +# Copyright (c) 2011 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. + +set -u +set -e + +# Change to directory in which we are located. +SCRIPTDIR="$( cd "$( dirname "$0" )" && pwd )" +cd $SCRIPTDIR + +#### INSTALLER ##### + +# Set up the directory structure for the package +mkdir -p Resources +mkdir -p package_root/usr/libexec/cups/backend + +# Move out files to the directory structure +# These files are copied in by the GYP file, so +# we move them. +mv GCP-driver package_root/usr/libexec/cups/backend +mv GCP-driver.ppd Resources +mv GCP-install Resources +mv install.sh Resources + +# Actually build our package +/Developer/usr/bin/packagemaker \ + -d GCP-Virtual-Driver.pmdoc -t GCP-virtual-driver + + + +##### UNINSTALLER ##### + +#Clean up any old uninstaller +rm -rf uninstall_resources +mkdir uninstall_resources +mv GCP-uninstall uninstall_resources +mv uninstall.sh uninstall_resources + + +##### CLEANUP ##### +rm -rf Resources +rm -rf package_root +rm -rf GCP-Virtual-Driver.pmdoc +rm build_mac.sh
\ No newline at end of file |