Differences between revisions 1 and 2
Revision 1 as of 2013-06-10 15:15:57
Size: 1282
Editor: felixs
Comment:
Revision 2 as of 2013-06-10 15:17:40
Size: 1300
Editor: felixs
Comment: tiny functional fix
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:
    $(MAKE) -Csrc install DESTDIR=$(DESTDIR) FILELIST=$(FILELIST)     $(MAKE) -Csrc install DESTDIR=$(DESTDIR) INSTALL=$(SAGE_INSTALL) -F $(FILELIST)

Currently each foreign package is adorned with a small program "spkg-install" that automates the compilation/installation of the package by calling the parts of the packages build system accordingly.

most implementations of this program (for the various packages) are purely monolithic, sequential and stateless. these programs need to be extended to allow

  • direct call of subroutines
  • basic dependency support (dont configure before patch etc.)
  • states, for example for patching, dont build twice etc.
  • support for FILELIST (record installed files) and DESTDIR (GNU standard)
  • uninstall, clean etc.
  • simple default subprograms for source or binary package creation (for other distributions)

a simple straigtforward replacement ("common practice") would be an executable makefile which has "install:" as its default target. such a makefile could look like very much like this

include /some/common/rules
PACKAGE_NAME=bla

configure:
    cd src; configure --prefix=... --something

install:
    $(MAKE) -Csrc install DESTDIR=$(DESTDIR) INSTALL=$(SAGE_INSTALL) -F $(FILELIST)

theoretically it can be implemented in any other language, we have interpreters for,

  • shell
  • python
  • ?

but this looks much more involved (example?)