Index: eclass/webapp.eclass =================================================================== --- eclass/webapp.eclass (revision 11436) +++ eclass/webapp.eclass (working copy) @@ -107,7 +107,7 @@ function webapp_strip_d () { - echo "${1}" | sed -e "s|${ED}||g;" + echo "${1}" | sed -e "s|${D}||g;" } function webapp_strip_cwd () @@ -128,13 +128,13 @@ { local m="" for m in "$@" ; do - webapp_checkfileexists "${m}" "${ED}" + webapp_checkfileexists "${m}" "${D}" local MY_FILE="$(webapp_strip_appdir "${m}")" MY_FILE="$(webapp_strip_cwd "${MY_FILE}")" elog "(config) ${MY_FILE}" - echo "${MY_FILE}" >> ${ED}/${WA_CONFIGLIST} + echo "${MY_FILE}" >> ${D}/${WA_CONFIGLIST} done } @@ -152,8 +152,8 @@ webapp_checkfileexists "${1}" elog "(hook) ${1}" - cp "${1}" "${ED}/${MY_HOOKSCRIPTSDIR}/$(basename "${1}")" || die "Unable to install ${1} into ${ED}/${MY_HOOKSCRIPTSDIR}/" - chmod 555 "${ED}/${MY_HOOKSCRIPTSDIR}/$(basename "${1}")" + cp "${1}" "${D}/${MY_HOOKSCRIPTSDIR}/$(basename "${1}")" || die "Unable to install ${1} into ${D}/${MY_HOOKSCRIPTSDIR}/" + chmod 555 "${D}/${MY_HOOKSCRIPTSDIR}/$(basename "${1}")" } # ------------------------------------------------------------------------ @@ -170,7 +170,7 @@ webapp_checkfileexists "${2}" elog "(info) ${2} (lang: ${1})" - cp "${2}" "${ED}/${MY_APPDIR}/postinst-${1}.txt" + cp "${2}" "${D}/${MY_APPDIR}/postinst-${1}.txt" } # ------------------------------------------------------------------------ @@ -187,7 +187,7 @@ webapp_checkfileexists "${2}" elog "(info) ${2} (lang: ${1})" - cp "${2}" "${ED}/${MY_APPDIR}/postupgrade-${1}.txt" + cp "${2}" "${D}/${MY_APPDIR}/postupgrade-${1}.txt" } # ------------------------------------------------------------------------ @@ -211,7 +211,7 @@ shift for m in "$@" ; do for a in $(find ${ED}/${m}); do - a=${a/${ED}\/\///} + a=${a/${D}\/\///} webapp_checkfileexists "${a}" "$D" local MY_FILE="$(webapp_strip_appdir "${a}")" MY_FILE="$(webapp_strip_cwd "${MY_FILE}")" @@ -266,7 +266,7 @@ # the other scripts that also rely upon these names elog "(${1}) config file '${my_file}'" - cp "${2}" "${ED}/${MY_SERVERCONFIGDIR}/${my_file}" + cp "${2}" "${D}/${MY_SERVERCONFIGDIR}/${my_file}" } # ------------------------------------------------------------------------ @@ -290,8 +290,8 @@ # scripts for specific database engines go into their own subdirectory # just to keep things readable on the filesystem - if [ ! -d "${ED}/${MY_SQLSCRIPTSDIR}/${1}" ]; then - mkdir -p "${ED}/${MY_SQLSCRIPTSDIR}/${1}" || die "unable to create directory ${ED}/${MY_SQLSCRIPTSDIR}/${1}" + if [ ! -d "${D}/${MY_SQLSCRIPTSDIR}/${1}" ]; then + mkdir -p "${D}/${MY_SQLSCRIPTSDIR}/${1}" || die "unable to create directory ${D}/${MY_SQLSCRIPTSDIR}/${1}" fi # warning: @@ -303,13 +303,13 @@ if [ -n "${3}" ]; then # yes we are elog "(${1}) upgrade script from ${PN}-${PVR} to ${3}" - cp "${2}" "${ED}${MY_SQLSCRIPTSDIR}/${1}/${3}_to_${PVR}.sql" - chmod 600 "${ED}${MY_SQLSCRIPTSDIR}/${1}/${3}_to_${PVR}.sql" + cp "${2}" "${D}${MY_SQLSCRIPTSDIR}/${1}/${3}_to_${PVR}.sql" + chmod 600 "${D}${MY_SQLSCRIPTSDIR}/${1}/${3}_to_${PVR}.sql" else # no, we are not elog "(${1}) create script for ${PN}-${PVR}" - cp "${2}" "${ED}/${MY_SQLSCRIPTSDIR}/${1}/${PVR}_create.sql" - chmod 600 "${ED}/${MY_SQLSCRIPTSDIR}/${1}/${PVR}_create.sql" + cp "${2}" "${D}/${MY_SQLSCRIPTSDIR}/${1}/${PVR}_create.sql" + chmod 600 "${D}/${MY_SQLSCRIPTSDIR}/${1}/${PVR}_create.sql" fi } @@ -327,9 +327,9 @@ chmod -R u-s "${ED}/" chmod -R g-s "${ED}/" - keepdir "${MY_PERSISTDIR}" - fowners "root:0" "${MY_PERSISTDIR}" - fperms 755 "${MY_PERSISTDIR}" + keepdir "${MY_PERSISTDIR/${EPREFIX}/}" + fowners "root:0" "${MY_PERSISTDIR/${EPREFIX}/}" + fperms 755 "${MY_PERSISTDIR/${EPREFIX}/}" # to test whether or not the ebuild has correctly called this function # we add an empty file to the filesystem @@ -338,7 +338,7 @@ # no longer rely on Portage calling both webapp_src_install() and # webapp_pkg_postinst() within the same shell process - touch "${ED}/${MY_APPDIR}/${INSTALL_CHECK_FILE}" + touch "${D}/${MY_APPDIR}/${INSTALL_CHECK_FILE}" } # ------------------------------------------------------------------------ @@ -433,14 +433,14 @@ { # create the directories that we need - dodir "${MY_HTDOCSDIR}" - dodir "${MY_HOSTROOTDIR}" - dodir "${MY_CGIBINDIR}" - dodir "${MY_ICONSDIR}" - dodir "${MY_ERRORSDIR}" - dodir "${MY_SQLSCRIPTSDIR}" - dodir "${MY_HOOKSCRIPTSDIR}" - dodir "${MY_SERVERCONFIGDIR}" + dodir "${MY_HTDOCSDIR/${EPREFIX}/}" + dodir "${MY_HOSTROOTDIR/${EPREFIX}/}" + dodir "${MY_CGIBINDIR/${EPREFIX}/}" + dodir "${MY_ICONSDIR/${EPREFIX}/}" + dodir "${MY_ERRORSDIR/${EPREFIX}/}" + dodir "${MY_SQLSCRIPTSDIR/${EPREFIX}/}" + dodir "${MY_HOOKSCRIPTSDIR/${EPREFIX}/}" + dodir "${MY_SERVERCONFIGDIR/${EPREFIX}/}" } function webapp_pkg_postinst () @@ -449,7 +449,7 @@ # sanity checks, to catch bugs in the ebuild - if [ ! -f "${EROOT}${MY_APPDIR}/${INSTALL_CHECK_FILE}" ]; then + if [ ! -f "${ROOT}${MY_APPDIR}/${INSTALL_CHECK_FILE}" ]; then eerror eerror "This ebuild did not call webapp_src_install() at the end" eerror "of the src_install() function"