Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/installer/linux/rpm/build.sh

Issue 410413004: Fix handling of icon resources in official RPM packages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/installer/linux/rpm/chrome.spec.template » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # TODO(mmoss) This currently only works with official builds, since non-official 7 # TODO(mmoss) This currently only works with official builds, since non-official
8 # builds don't add the "${BUILDDIR}/installer/" files needed for packaging. 8 # builds don't add the "${BUILDDIR}/installer/" files needed for packaging.
9 9
10 set -e 10 set -e
11 if [ "$VERBOSE" ]; then 11 if [ "$VERBOSE" ]; then
12 set -x 12 set -x
13 fi 13 fi
14 set -u 14 set -u
15 15
16 gen_spec() { 16 gen_spec() {
17 rm -f "${SPEC}" 17 rm -f "${SPEC}"
18 # Trunk packages need to install to a custom path so they don't conflict with 18 # Trunk packages need to install to a custom path so they don't conflict with
Lei Zhang 2014/07/30 03:30:25 This comment needs to be updated.
19 # release channel packages. 19 # release channel packages.
20 local PACKAGE_FILENAME="${PACKAGE}"
21 if [ "$CHANNEL" != "stable" ]; then 20 if [ "$CHANNEL" != "stable" ]; then
22 local INSTALLDIR="${INSTALLDIR}-${CHANNEL}" 21 local INSTALLDIR="${INSTALLDIR}-${CHANNEL}"
23 PACKAGE_FILENAME="${PACKAGE}-${CHANNEL}" 22 PACKAGE="${PACKAGE}-${CHANNEL}"
24 local MENUNAME="${MENUNAME} (${CHANNEL})" 23 local MENUNAME="${MENUNAME} (${CHANNEL})"
25 fi 24 fi
25 local PACKAGE_FILENAME="${PACKAGE}"
26 process_template "${SCRIPTDIR}/chrome.spec.template" "${SPEC}" 26 process_template "${SCRIPTDIR}/chrome.spec.template" "${SPEC}"
27 } 27 }
28 28
29 # Setup the installation directory hierachy in the package staging area. 29 # Setup the installation directory hierachy in the package staging area.
30 prep_staging_rpm() { 30 prep_staging_rpm() {
31 prep_staging_common 31 prep_staging_common
32 install -m 755 -d "${STAGEDIR}/etc/cron.daily" 32 install -m 755 -d "${STAGEDIR}/etc/cron.daily"
33 } 33 }
34 34
35 # Put the package contents in the staging area. 35 # Put the package contents in the staging area.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 # '__os_install_post ${nil}' disables a bunch of automatic post-processing 145 # '__os_install_post ${nil}' disables a bunch of automatic post-processing
146 # (brp-compress, etc.), which by default appears to only be enabled on 32-bit, 146 # (brp-compress, etc.), which by default appears to only be enabled on 32-bit,
147 # and which doesn't gain us anything since we already explicitly do all the 147 # and which doesn't gain us anything since we already explicitly do all the
148 # compression, symbol stripping, etc. that we want. 148 # compression, symbol stripping, etc. that we want.
149 fakeroot rpmbuild -bb --target="$ARCHITECTURE" --rmspec \ 149 fakeroot rpmbuild -bb --target="$ARCHITECTURE" --rmspec \
150 --define "_topdir $RPMBUILD_DIR" \ 150 --define "_topdir $RPMBUILD_DIR" \
151 --define "_binary_payload w9.bzdio" \ 151 --define "_binary_payload w9.bzdio" \
152 --define "__os_install_post %{nil}" \ 152 --define "__os_install_post %{nil}" \
153 "${SPEC}" 153 "${SPEC}"
154 PKGNAME="${PACKAGE}-${CHANNEL}-${VERSION}-${PACKAGE_RELEASE}" 154 PKGNAME="google-chrome-${CHANNEL}-${VERSION}-${PACKAGE_RELEASE}"
155 mv "$RPMBUILD_DIR/RPMS/$ARCHITECTURE/${PKGNAME}.${ARCHITECTURE}.rpm" \ 155 mv "$RPMBUILD_DIR/RPMS/$ARCHITECTURE/${PKGNAME}.${ARCHITECTURE}.rpm" \
156 "${OUTPUTDIR}" 156 "${OUTPUTDIR}"
157 # Make sure the package is world-readable, otherwise it causes problems when 157 # Make sure the package is world-readable, otherwise it causes problems when
158 # copied to share drive. 158 # copied to share drive.
159 chmod a+r "${OUTPUTDIR}/${PKGNAME}.$ARCHITECTURE.rpm" 159 chmod a+r "${OUTPUTDIR}/${PKGNAME}.$ARCHITECTURE.rpm"
160 rm -rf "$RPMBUILD_DIR" 160 rm -rf "$RPMBUILD_DIR"
161 } 161 }
162 162
163 # Remove temporary files and unwanted packaging output. 163 # Remove temporary files and unwanted packaging output.
164 cleanup() { 164 cleanup() {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 ;; 302 ;;
303 * ) 303 * )
304 echo 304 echo
305 echo "ERROR: Don't know how to build RPMs for '$TARGETARCH'." 305 echo "ERROR: Don't know how to build RPMs for '$TARGETARCH'."
306 echo 306 echo
307 exit 1 307 exit 1
308 ;; 308 ;;
309 esac 309 esac
310 310
311 do_package 311 do_package
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/linux/rpm/chrome.spec.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698