| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 -e "s#@@SXS_USER_DATA_DIR@@#${SXS_USER_DATA_DIR:-}#g" \ | 80 -e "s#@@SXS_USER_DATA_DIR@@#${SXS_USER_DATA_DIR:-}#g" \ |
| 81 -e "s#@@USR_BIN_SYMLINK_NAME@@#${USR_BIN_SYMLINK_NAME:-}#g" \ | 81 -e "s#@@USR_BIN_SYMLINK_NAME@@#${USR_BIN_SYMLINK_NAME:-}#g" \ |
| 82 > "$TMPLOUT" <<< "$TMPLINCL" | 82 > "$TMPLOUT" <<< "$TMPLINCL" |
| 83 ) | 83 ) |
| 84 | 84 |
| 85 # Setup the installation directory hierachy in the package staging area. | 85 # Setup the installation directory hierachy in the package staging area. |
| 86 prep_staging_common() { | 86 prep_staging_common() { |
| 87 install -m 755 -d "${STAGEDIR}/${INSTALLDIR}" \ | 87 install -m 755 -d "${STAGEDIR}/${INSTALLDIR}" \ |
| 88 "${STAGEDIR}/usr/bin" \ | 88 "${STAGEDIR}/usr/bin" \ |
| 89 "${STAGEDIR}/usr/share/applications" \ | 89 "${STAGEDIR}/usr/share/applications" \ |
| 90 "${STAGEDIR}/usr/share/appdata" \ |
| 90 "${STAGEDIR}/usr/share/gnome-control-center/default-apps" \ | 91 "${STAGEDIR}/usr/share/gnome-control-center/default-apps" \ |
| 91 "${STAGEDIR}/usr/share/man/man1" | 92 "${STAGEDIR}/usr/share/man/man1" |
| 92 } | 93 } |
| 93 | 94 |
| 94 get_version_info() { | 95 get_version_info() { |
| 95 source "${BUILDDIR}/installer/version.txt" | 96 source "${BUILDDIR}/installer/version.txt" |
| 96 VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}" | 97 VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}" |
| 97 # TODO(phajdan.jr): Provide a mechanism to pass a different package | 98 # TODO(phajdan.jr): Provide a mechanism to pass a different package |
| 98 # release number if needed. The meaning of it is to bump it for | 99 # release number if needed. The meaning of it is to bump it for |
| 99 # packaging-only changes while the underlying software has the same version. | 100 # packaging-only changes while the underlying software has the same version. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 222 |
| 222 # app icons | 223 # app icons |
| 223 install -m 644 \ | 224 install -m 644 \ |
| 224 "${BUILDDIR}/installer/theme/product_logo_"*.png \ | 225 "${BUILDDIR}/installer/theme/product_logo_"*.png \ |
| 225 "${BUILDDIR}/installer/theme/product_logo_32.xpm" \ | 226 "${BUILDDIR}/installer/theme/product_logo_32.xpm" \ |
| 226 "${STAGEDIR}/${INSTALLDIR}/" | 227 "${STAGEDIR}/${INSTALLDIR}/" |
| 227 | 228 |
| 228 # desktop integration | 229 # desktop integration |
| 229 install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/" | 230 install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/" |
| 230 install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/" | 231 install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/" |
| 232 |
| 233 if [ ${PACKAGE:0:6} = google ]; then |
| 234 process_template "${BUILDDIR}/installer/common/google-chrome.appdata.xml.tem
plate" \ |
| 235 "${STAGEDIR}/usr/share/appdata/${PACKAGE}.appdata.xml" |
| 236 else |
| 237 process_template "${BUILDDIR}/installer/common/chromium-browser.appdata.xml.
template" \ |
| 238 "${STAGEDIR}/usr/share/appdata/${PACKAGE}.appdata.xml" |
| 239 fi |
| 240 chmod 644 "${STAGEDIR}/usr/share/appdata/${PACKAGE}.appdata.xml" |
| 241 |
| 231 process_template "${BUILDDIR}/installer/common/desktop.template" \ | 242 process_template "${BUILDDIR}/installer/common/desktop.template" \ |
| 232 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" | 243 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" |
| 233 chmod 644 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" | 244 chmod 644 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" |
| 234 process_template "${BUILDDIR}/installer/common/default-app.template" \ | 245 process_template "${BUILDDIR}/installer/common/default-app.template" \ |
| 235 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml" | 246 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml" |
| 236 chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.
xml" | 247 chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.
xml" |
| 237 process_template "${BUILDDIR}/installer/common/default-app-block.template" \ | 248 process_template "${BUILDDIR}/installer/common/default-app-block.template" \ |
| 238 "${STAGEDIR}${INSTALLDIR}/default-app-block" | 249 "${STAGEDIR}${INSTALLDIR}/default-app-block" |
| 239 chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block" | 250 chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block" |
| 240 | 251 |
| 241 # documentation | 252 # documentation |
| 242 install -m 755 "${BUILDDIR}/${PROGNAME}.1" \ | 253 install -m 755 "${BUILDDIR}/${PROGNAME}.1" \ |
| 243 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" | 254 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" |
| 244 } | 255 } |
| OLD | NEW |