Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/bin/bash | |
| 2 # | |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 set -u | |
| 8 set -e | |
| 9 | |
| 10 # Change to directory in which we are located. | |
| 11 SCRIPTDIR=$(readlink -f "$(dirname "$0")") | |
| 12 | |
| 13 PACKAGE_NAME="gcpdriver" | |
| 14 | |
| 15 cd $SCRIPTDIR | |
|
Scott Byer
2011/08/16 23:31:25
move this up to after SCRIPTDIR assignment, to kee
abeera
2011/08/16 23:55:03
Done.
| |
| 16 | |
| 17 ##clean up any old data completely | |
|
Scott Byer
2011/08/16 23:31:25
nit:extra hash, no space
abeera
2011/08/16 23:55:03
Done.
| |
| 18 rm -rf debian | |
| 19 | |
| 20 # Target architecture to same as build host. | |
| 21 if [ "$(uname -m)" = "x86_64" ]; then | |
| 22 TARGETARCH="amd64" | |
| 23 else | |
| 24 TARGETARCH="i386" | |
| 25 fi | |
| 26 | |
|
Scott Byer
2011/08/16 23:31:25
nit: extra line
abeera
2011/08/16 23:55:03
Done.
| |
| 27 | |
| 28 #Set up the required directory structure | |
|
Scott Byer
2011/08/16 23:31:25
nit: here and elsewhere, space after hash
abeera
2011/08/16 23:55:03
Done.
| |
| 29 mkdir -p debian/usr/lib/cups/backend | |
| 30 mkdir -p debian/usr/share/ppd/GCP | |
| 31 mkdir -p debian/usr/share/doc/$PACKAGE_NAME | |
| 32 mkdir -p debian/DEBIAN | |
| 33 chmod 755 debian/DEBIAN | |
| 34 | |
| 35 #Copy files to the correct location | |
| 36 mv postinst debian/DEBIAN | |
|
Scott Byer
2011/08/16 23:31:25
Aren't these going to want to be copies instead? W
| |
| 37 mv postrm debian/DEBIAN | |
| 38 mv prerm debian/DEBIAN | |
| 39 mv GCP-driver.ppd debian/usr/share/ppd/GCP | |
| 40 echo "Architecture:${TARGETARCH}" >> debian/DEBIAN/control | |
| 41 cat control >> debian/DEBIAN/control | |
| 42 mv changelog debian/usr/share/doc/$PACKAGE_NAME/ | |
| 43 gzip --best -f debian/usr/share/doc/$PACKAGE_NAME/changelog | |
| 44 mv copyright debian/usr/share/doc/$PACKAGE_NAME/ | |
| 45 mv GCP-driver debian/usr/lib/cups/backend | |
| 46 | |
| 47 #Set permissions as required to roll package | |
| 48 chmod 755 debian/DEBIAN/postinst | |
| 49 chmod 755 debian/DEBIAN/postrm | |
| 50 chmod 755 debian/DEBIAN/prerm | |
| 51 chmod -R 755 debian/usr | |
| 52 chmod 644 debian/usr/share/doc/$PACKAGE_NAME/* | |
| 53 chmod 644 debian/usr/share/ppd/GCP/GCP-driver.ppd | |
| 54 | |
| 55 #Actually roll the package and rename | |
| 56 fakeroot dpkg-deb --build debian | |
| 57 mv debian.deb gcp-driver.deb | |
| 58 | |
| 59 ##Clean up | |
| 60 rm -rf debian | |
| 61 rm control | |
| 62 | |
| OLD | NEW |