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

Side by Side Diff: chrome/installer/linux/common/installer.include

Issue 2107893004: Support relocatable RPM packages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 # Recursively replace @@include@@ template variables with the referenced file, 1 # Recursively replace @@include@@ template variables with the referenced file,
2 # and write the resulting text to stdout. 2 # and write the resulting text to stdout.
3 process_template_includes() { 3 process_template_includes() {
4 INCSTACK+="$1->" 4 INCSTACK+="$1->"
5 # Includes are relative to the file that does the include. 5 # Includes are relative to the file that does the include.
6 INCDIR=$(dirname $1) 6 INCDIR=$(dirname $1)
7 # Clear IFS so 'read' doesn't trim whitespace 7 # Clear IFS so 'read' doesn't trim whitespace
8 local OLDIFS="$IFS" 8 local OLDIFS="$IFS"
9 IFS='' 9 IFS=''
10 while read -r LINE 10 while read -r LINE
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 TMPLINCL="$(process_template_includes "$TMPLIN")" 51 TMPLINCL="$(process_template_includes "$TMPLIN")"
52 sed \ 52 sed \
53 -e "s#@@PACKAGE@@#${PACKAGE}#g" \ 53 -e "s#@@PACKAGE@@#${PACKAGE}#g" \
54 -e "s#@@PACKAGE_FILENAME@@#${PACKAGE_FILENAME}#g" \ 54 -e "s#@@PACKAGE_FILENAME@@#${PACKAGE_FILENAME}#g" \
55 -e "s#@@PROGNAME@@#${PROGNAME}#g" \ 55 -e "s#@@PROGNAME@@#${PROGNAME}#g" \
56 -e "s#@@CHANNEL@@#${CHANNEL}#g" \ 56 -e "s#@@CHANNEL@@#${CHANNEL}#g" \
57 -e "s#@@COMPANY_FULLNAME@@#${COMPANY_FULLNAME}#g" \ 57 -e "s#@@COMPANY_FULLNAME@@#${COMPANY_FULLNAME}#g" \
58 -e "s#@@VERSION@@#${VERSION}#g" \ 58 -e "s#@@VERSION@@#${VERSION}#g" \
59 -e "s#@@PACKAGE_RELEASE@@#${PACKAGE_RELEASE}#g" \ 59 -e "s#@@PACKAGE_RELEASE@@#${PACKAGE_RELEASE}#g" \
60 -e "s#@@VERSIONFULL@@#${VERSIONFULL}#g" \ 60 -e "s#@@VERSIONFULL@@#${VERSIONFULL}#g" \
61 -e "s#@@INSTALLDIRPREFIX@@#${INSTALLDIRPREFIX}#g" \
61 -e "s#@@INSTALLDIR@@#${INSTALLDIR}#g" \ 62 -e "s#@@INSTALLDIR@@#${INSTALLDIR}#g" \
62 -e "s#@@BUILDDIR@@#${BUILDDIR}#g" \ 63 -e "s#@@BUILDDIR@@#${BUILDDIR}#g" \
63 -e "s#@@STAGEDIR@@#${STAGEDIR}#g" \ 64 -e "s#@@STAGEDIR@@#${STAGEDIR}#g" \
64 -e "s#@@SCRIPTDIR@@#${SCRIPTDIR}#g" \ 65 -e "s#@@SCRIPTDIR@@#${SCRIPTDIR}#g" \
65 -e "s#@@MENUNAME@@#${MENUNAME}#g" \ 66 -e "s#@@MENUNAME@@#${MENUNAME}#g" \
66 -e "s#@@PRODUCTURL@@#${PRODUCTURL}#g" \ 67 -e "s#@@PRODUCTURL@@#${PRODUCTURL}#g" \
67 -e "s#@@PREDEPENDS@@#${PREDEPENDS}#g" \ 68 -e "s#@@PREDEPENDS@@#${PREDEPENDS}#g" \
68 -e "s#@@DEPENDS@@#${DEPENDS}#g" \ 69 -e "s#@@DEPENDS@@#${DEPENDS}#g" \
69 -e "s#@@PROVIDES@@#${PROVIDES}#g" \ 70 -e "s#@@PROVIDES@@#${PROVIDES}#g" \
70 -e "s#@@REPLACES@@#${REPLACES}#g" \ 71 -e "s#@@REPLACES@@#${REPLACES}#g" \
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 fi 219 fi
219 220
220 # launcher script and symlink 221 # launcher script and symlink
221 process_template "${BUILDDIR}/installer/common/wrapper" \ 222 process_template "${BUILDDIR}/installer/common/wrapper" \
222 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" 223 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}"
223 chmod 755 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" 224 chmod 755 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}"
224 if [ ! -f "${STAGEDIR}/${INSTALLDIR}/google-chrome" ]; then 225 if [ ! -f "${STAGEDIR}/${INSTALLDIR}/google-chrome" ]; then
225 ln -sn "${INSTALLDIR}/${PACKAGE}" \ 226 ln -sn "${INSTALLDIR}/${PACKAGE}" \
226 "${STAGEDIR}/${INSTALLDIR}/google-chrome" 227 "${STAGEDIR}/${INSTALLDIR}/google-chrome"
227 fi 228 fi
228 ln -snf "${INSTALLDIR}/${PACKAGE}" \
229 "${STAGEDIR}/usr/bin/${USR_BIN_SYMLINK_NAME}"
230 229
231 # app icons 230 # app icons
232 install -m 644 \ 231 install -m 644 \
233 "${BUILDDIR}/installer/theme/product_logo_"*.png \ 232 "${BUILDDIR}/installer/theme/product_logo_"*.png \
234 "${BUILDDIR}/installer/theme/product_logo_32.xpm" \ 233 "${BUILDDIR}/installer/theme/product_logo_32.xpm" \
235 "${STAGEDIR}/${INSTALLDIR}/" 234 "${STAGEDIR}/${INSTALLDIR}/"
236 235
237 # desktop integration 236 # desktop integration
238 install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/" 237 install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/"
239 install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/" 238 install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/"
240 process_template "${BUILDDIR}/installer/common/desktop.template" \ 239 process_template "${BUILDDIR}/installer/common/desktop.template" \
241 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" 240 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop"
242 chmod 644 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" 241 chmod 644 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop"
243 process_template "${BUILDDIR}/installer/common/default-app.template" \ 242 process_template "${BUILDDIR}/installer/common/default-app.template" \
244 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml" 243 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml"
245 chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}. xml" 244 chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}. xml"
246 process_template "${BUILDDIR}/installer/common/default-app-block.template" \ 245 process_template "${BUILDDIR}/installer/common/default-app-block.template" \
247 "${STAGEDIR}${INSTALLDIR}/default-app-block" 246 "${STAGEDIR}${INSTALLDIR}/default-app-block"
248 chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block" 247 chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block"
249 248
250 # documentation 249 # documentation
251 install -m 755 "${BUILDDIR}/${PROGNAME}.1" \ 250 install -m 755 "${BUILDDIR}/${PROGNAME}.1" \
252 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" 251 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1"
253 } 252 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698