diff options
author | Mike Gilbert <floppym@gentoo.org> | 2023-07-04 20:39:03 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2023-07-04 20:41:41 -0400 |
commit | da8169c96af55704989cc0ccb4176917d97b35d3 (patch) | |
tree | 9afed5e0d13264125705322cbdbf6aeff790f786 /sys-apps/baselayout | |
parent | sys-cluster/rdma-core: Stabilize 45.0 ppc64, #909657 (diff) | |
download | gentoo-da8169c96af55704989cc0ccb4176917d97b35d3.tar.gz gentoo-da8169c96af55704989cc0ccb4176917d97b35d3.tar.bz2 gentoo-da8169c96af55704989cc0ccb4176917d97b35d3.zip |
sys-apps/baselayout: move pkg_setup and pkg_preinst
This moves them to the traditional place according to phase execution
order.
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-apps/baselayout')
-rw-r--r-- | sys-apps/baselayout/baselayout-2.13-r1.ebuild | 52 | ||||
-rw-r--r-- | sys-apps/baselayout/baselayout-9999.ebuild | 52 |
2 files changed, 52 insertions, 52 deletions
diff --git a/sys-apps/baselayout/baselayout-2.13-r1.ebuild b/sys-apps/baselayout/baselayout-2.13-r1.ebuild index 49f04008670b..8cc92f9d92cc 100644 --- a/sys-apps/baselayout/baselayout-2.13-r1.ebuild +++ b/sys-apps/baselayout/baselayout-2.13-r1.ebuild @@ -21,10 +21,6 @@ IUSE="build +split-usr" RDEPEND="!sys-apps/baselayout-prefix" -pkg_setup() { - multilib_layout -} - riscv_compat_symlink() { # Here we apply some special sauce for riscv. # Two multilib layouts exist for now: @@ -191,29 +187,8 @@ multilib_layout() { fi } -pkg_preinst() { - # We need to install directories and maybe some dev nodes when building - # stages, but they cannot be in CONTENTS. - # Also, we cannot reference $S as binpkg will break so we do this. +pkg_setup() { multilib_layout - if use build ; then - if use split-usr ; then - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout - else - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge - fi - fi - rm -f "${ED}"/usr/share/${PN}/Makefile || die - - # Create symlinks in pkg_preinst to avoid Portage collision check. - # Create the symlinks in ${ED} via dosym so that we own it. - # Only create the symlinks if it wont cause a conflict in ${EROOT}. - if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then - dosym ../run/lock /var/lock - fi - if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then - dosym ../run /var/run - fi } src_prepare() { @@ -291,6 +266,31 @@ src_install() { fi } +pkg_preinst() { + # We need to install directories and maybe some dev nodes when building + # stages, but they cannot be in CONTENTS. + # Also, we cannot reference $S as binpkg will break so we do this. + multilib_layout + if use build ; then + if use split-usr ; then + emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout + else + emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge + fi + fi + rm -f "${ED}"/usr/share/${PN}/Makefile || die + + # Create symlinks in pkg_preinst to avoid Portage collision check. + # Create the symlinks in ${ED} via dosym so that we own it. + # Only create the symlinks if it wont cause a conflict in ${EROOT}. + if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then + dosym ../run/lock /var/lock + fi + if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then + dosym ../run /var/run + fi +} + pkg_postinst() { local x diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild index 2294e5e84cc3..a588c68f51e9 100644 --- a/sys-apps/baselayout/baselayout-9999.ebuild +++ b/sys-apps/baselayout/baselayout-9999.ebuild @@ -21,10 +21,6 @@ IUSE="build +split-usr" RDEPEND="!sys-apps/baselayout-prefix" -pkg_setup() { - multilib_layout -} - riscv_compat_symlink() { # Here we apply some special sauce for riscv. # Two multilib layouts exist for now: @@ -191,29 +187,8 @@ multilib_layout() { fi } -pkg_preinst() { - # We need to install directories and maybe some dev nodes when building - # stages, but they cannot be in CONTENTS. - # Also, we cannot reference $S as binpkg will break so we do this. +pkg_setup() { multilib_layout - if use build ; then - if use split-usr ; then - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout - else - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge - fi - fi - rm -f "${ED}"/usr/share/${PN}/Makefile || die - - # Create symlinks in pkg_preinst to avoid Portage collision check. - # Create the symlinks in ${ED} via dosym so that we own it. - # Only create the symlinks if it wont cause a conflict in ${EROOT}. - if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then - dosym ../run/lock /var/lock - fi - if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then - dosym ../run /var/run - fi } src_prepare() { @@ -291,6 +266,31 @@ src_install() { fi } +pkg_preinst() { + # We need to install directories and maybe some dev nodes when building + # stages, but they cannot be in CONTENTS. + # Also, we cannot reference $S as binpkg will break so we do this. + multilib_layout + if use build ; then + if use split-usr ; then + emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout + else + emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge + fi + fi + rm -f "${ED}"/usr/share/${PN}/Makefile || die + + # Create symlinks in pkg_preinst to avoid Portage collision check. + # Create the symlinks in ${ED} via dosym so that we own it. + # Only create the symlinks if it wont cause a conflict in ${EROOT}. + if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then + dosym ../run/lock /var/lock + fi + if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then + dosym ../run /var/run + fi +} + pkg_postinst() { local x |