Mercurial > gub
changeset 5395:2329bfeb44c9
build.py: add pre_install stage.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Thu, 23 Jul 2009 15:37:55 +0200 |
parents | d6ed36e3702c |
children | 556b3b24d0a5 |
files | gub/build.py |
diffstat | 1 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/build.py Thu Jul 23 12:56:51 2009 +0200 +++ b/gub/build.py Thu Jul 23 15:37:55 2009 +0200 @@ -428,20 +428,27 @@ def update_libtool (self): self.map_locate (lambda logger, file: libtool_update (logger, self.expand ('%(system_prefix)s/bin/libtool'), file), '%(builddir)s', 'libtool') + def pre_install (self): + pass def install (self): '''Install package into %(install_root). Any overrides should follow this command, since it will erase the old install_root first. - FIXME: this is partly totally broken, some overrides need to - be done BEFORE the rest of the install stage. We need to - figure out some clean way to plug something in between the - automatic cleaning, and the rest of the install.''' - + ''' self.system (''' rm -rf %(install_root)s +''') + self.pre_install () + self.system (''' cd %(builddir)s && %(install_command)s +''') + self.post_install () + def post_install (self): + self.install_license () + self.libtool_installed_la_fixups () + self.system (''' rm -f \ %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/info/dir \ %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/info/dir.old \ @@ -452,8 +459,6 @@ %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s%(cross_dir)s/share/info/dir \ %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s%(cross_dir)s/share/info/dir.old \ ''') - self.install_license () - self.libtool_installed_la_fixups () def install_license (self): def install (logger, lst):