| OLD | NEW |
| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 -e "s#@@PROVIDES@@#${PROVIDES}#g" \ | 69 -e "s#@@PROVIDES@@#${PROVIDES}#g" \ |
| 70 -e "s#@@REPLACES@@#${REPLACES}#g" \ | 70 -e "s#@@REPLACES@@#${REPLACES}#g" \ |
| 71 -e "s#@@CONFLICTS@@#${CONFLICTS}#g" \ | 71 -e "s#@@CONFLICTS@@#${CONFLICTS}#g" \ |
| 72 -e "s#@@ARCHITECTURE@@#${ARCHITECTURE}#g" \ | 72 -e "s#@@ARCHITECTURE@@#${ARCHITECTURE}#g" \ |
| 73 -e "s#@@MAINTNAME@@#${MAINTNAME}#g" \ | 73 -e "s#@@MAINTNAME@@#${MAINTNAME}#g" \ |
| 74 -e "s#@@MAINTMAIL@@#${MAINTMAIL}#g" \ | 74 -e "s#@@MAINTMAIL@@#${MAINTMAIL}#g" \ |
| 75 -e "s#@@REPOCONFIG@@#${REPOCONFIG}#g" \ | 75 -e "s#@@REPOCONFIG@@#${REPOCONFIG}#g" \ |
| 76 -e "s#@@SHORTDESC@@#${SHORTDESC}#g" \ | 76 -e "s#@@SHORTDESC@@#${SHORTDESC}#g" \ |
| 77 -e "s#@@FULLDESC@@#${FULLDESC}#g" \ | 77 -e "s#@@FULLDESC@@#${FULLDESC}#g" \ |
| 78 -e "s#@@DEFAULT_FLAGS@@#${DEFAULT_FLAGS:-}#g" \ | 78 -e "s#@@DEFAULT_FLAGS@@#${DEFAULT_FLAGS:-}#g" \ |
| 79 -e "s#@@SXS_USER_DATA_DIR@@#${SXS_USER_DATA_DIR:-}#g" \ |
| 80 -e "s#@@USR_BIN_SYMLINK_NAME@@#${USR_BIN_SYMLINK_NAME:-}#g" \ |
| 79 > "$TMPLOUT" <<< "$TMPLINCL" | 81 > "$TMPLOUT" <<< "$TMPLINCL" |
| 80 ) | 82 ) |
| 81 | 83 |
| 82 # Setup the installation directory hierachy in the package staging area. | 84 # Setup the installation directory hierachy in the package staging area. |
| 83 prep_staging_common() { | 85 prep_staging_common() { |
| 84 install -m 755 -d "${STAGEDIR}/${INSTALLDIR}" \ | 86 install -m 755 -d "${STAGEDIR}/${INSTALLDIR}" \ |
| 85 "${STAGEDIR}/usr/bin" \ | 87 "${STAGEDIR}/usr/bin" \ |
| 86 "${STAGEDIR}/usr/share/applications" \ | 88 "${STAGEDIR}/usr/share/applications" \ |
| 87 "${STAGEDIR}/usr/share/gnome-control-center/default-apps" \ | 89 "${STAGEDIR}/usr/share/gnome-control-center/default-apps" \ |
| 88 "${STAGEDIR}/usr/share/man/man1" | 90 "${STAGEDIR}/usr/share/man/man1" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 111 # | 113 # |
| 112 # app | 114 # app |
| 113 # We need to add the debug link so gdb knows to look for the symbols. | 115 # We need to add the debug link so gdb knows to look for the symbols. |
| 114 DEBUGFILE="${BUILDDIR}/${PROGNAME}.debug" | 116 DEBUGFILE="${BUILDDIR}/${PROGNAME}.debug" |
| 115 STRIPPEDFILE="${BUILDDIR}/${PROGNAME}.stripped" | 117 STRIPPEDFILE="${BUILDDIR}/${PROGNAME}.stripped" |
| 116 eu-strip -o "${STRIPPEDFILE}" -f "${DEBUGFILE}" "${BUILDDIR}/${PROGNAME}" | 118 eu-strip -o "${STRIPPEDFILE}" -f "${DEBUGFILE}" "${BUILDDIR}/${PROGNAME}" |
| 117 install -m 755 "${STRIPPEDFILE}" "${STAGEDIR}/${INSTALLDIR}/${PROGNAME}" | 119 install -m 755 "${STRIPPEDFILE}" "${STAGEDIR}/${INSTALLDIR}/${PROGNAME}" |
| 118 rm "${DEBUGFILE}" "${STRIPPEDFILE}" | 120 rm "${DEBUGFILE}" "${STRIPPEDFILE}" |
| 119 | 121 |
| 120 # resources | 122 # resources |
| 121 install -m 644 "${BUILDDIR}/${PROGNAME}.pak" "${STAGEDIR}/${INSTALLDIR}/" | |
| 122 install -m 644 "${BUILDDIR}/resources.pak" "${STAGEDIR}/${INSTALLDIR}/" | 123 install -m 644 "${BUILDDIR}/resources.pak" "${STAGEDIR}/${INSTALLDIR}/" |
| 123 # TODO(mmoss): This has broken a couple times on adding new .pak files. Maybe | 124 # TODO(mmoss): This has broken a couple times on adding new .pak files. Maybe |
| 124 # we should flag all installer files in FILES.cfg and get them from there, so | 125 # we should flag all installer files in FILES.cfg and get them from there, so |
| 125 # there's only one place people need to keep track of such things (and in | 126 # there's only one place people need to keep track of such things (and in |
| 126 # only the public repository). | 127 # only the public repository). |
| 127 if [ -r "${BUILDDIR}/chrome_100_percent.pak" ]; then | 128 if [ -r "${BUILDDIR}/chrome_100_percent.pak" ]; then |
| 128 install -m 644 "${BUILDDIR}/chrome_100_percent.pak" "${STAGEDIR}/${INSTALLDI
R}/" | 129 install -m 644 "${BUILDDIR}/chrome_100_percent.pak" "${STAGEDIR}/${INSTALLDI
R}/" |
| 129 else | 130 else |
| 130 install -m 644 "${BUILDDIR}/theme_resources_100_percent.pak" "${STAGEDIR}/${
INSTALLDIR}/" | 131 install -m 644 "${BUILDDIR}/theme_resources_100_percent.pak" "${STAGEDIR}/${
INSTALLDIR}/" |
| 131 install -m 644 "${BUILDDIR}/ui_resources_100_percent.pak" "${STAGEDIR}/${INS
TALLDIR}/" | 132 install -m 644 "${BUILDDIR}/ui_resources_100_percent.pak" "${STAGEDIR}/${INS
TALLDIR}/" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 if [ -d "${BUILDDIR}/default_apps" ]; then | 206 if [ -d "${BUILDDIR}/default_apps" ]; then |
| 206 cp -a "${BUILDDIR}/default_apps" "${STAGEDIR}/${INSTALLDIR}/" | 207 cp -a "${BUILDDIR}/default_apps" "${STAGEDIR}/${INSTALLDIR}/" |
| 207 find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type d -exec chmod 755 '{}' \
; | 208 find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type d -exec chmod 755 '{}' \
; |
| 208 find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type f -exec chmod 644 '{}' \
; | 209 find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type f -exec chmod 644 '{}' \
; |
| 209 fi | 210 fi |
| 210 | 211 |
| 211 # launcher script and symlink | 212 # launcher script and symlink |
| 212 process_template "${BUILDDIR}/installer/common/wrapper" \ | 213 process_template "${BUILDDIR}/installer/common/wrapper" \ |
| 213 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" | 214 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" |
| 214 chmod 755 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" | 215 chmod 755 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" |
| 215 pushd "${STAGEDIR}/usr/bin/" | 216 ln -snf "${INSTALLDIR}/${PACKAGE}" \ |
| 216 ln -snf "${INSTALLDIR}/${PACKAGE}" "${PACKAGE}" | 217 "${STAGEDIR}/usr/bin/${USR_BIN_SYMLINK_NAME}" |
| 217 popd | |
| 218 | 218 |
| 219 # app icons | 219 # app icons |
| 220 install -m 644 \ | 220 install -m 644 \ |
| 221 "${BUILDDIR}/installer/theme/product_logo_"*.png \ | 221 "${BUILDDIR}/installer/theme/product_logo_"*.png \ |
| 222 "${BUILDDIR}/installer/theme/product_logo_32.xpm" \ | 222 "${BUILDDIR}/installer/theme/product_logo_32.xpm" \ |
| 223 "${STAGEDIR}/${INSTALLDIR}/" | 223 "${STAGEDIR}/${INSTALLDIR}/" |
| 224 | 224 |
| 225 # desktop integration | 225 # desktop integration |
| 226 install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/" | 226 install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/" |
| 227 install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/" | 227 install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/" |
| 228 process_template "${BUILDDIR}/installer/common/desktop.template" \ | 228 process_template "${BUILDDIR}/installer/common/desktop.template" \ |
| 229 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}.desktop" | 229 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}.desktop" |
| 230 chmod 644 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}.desktop" | 230 chmod 644 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}.desktop" |
| 231 process_template "${BUILDDIR}/installer/common/default-app.template" \ | 231 process_template "${BUILDDIR}/installer/common/default-app.template" \ |
| 232 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml" | 232 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml" |
| 233 chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.
xml" | 233 chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.
xml" |
| 234 process_template "${BUILDDIR}/installer/common/default-app-block.template" \ | 234 process_template "${BUILDDIR}/installer/common/default-app-block.template" \ |
| 235 "${STAGEDIR}${INSTALLDIR}/default-app-block" | 235 "${STAGEDIR}${INSTALLDIR}/default-app-block" |
| 236 chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block" | 236 chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block" |
| 237 | 237 |
| 238 # documentation | 238 # documentation |
| 239 install -m 755 "${BUILDDIR}/${PROGNAME}.1" \ | 239 install -m 755 "${BUILDDIR}/${PROGNAME}.1" \ |
| 240 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" | 240 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" |
| 241 } | 241 } |
| OLD | NEW |