* sabit tanımlamasına devam.
* actions içerisindeki fonksiyonlarda src_* prefixlerini kullanmak istediğimizi hatırlamıyorum. Düzelttim. * bir takım daha indent düzeltmesi.
This commit is contained in:
+9
-6
@@ -107,19 +107,22 @@ class PisiBuild:
|
||||
pass
|
||||
|
||||
def configureSource(self, locals):
|
||||
if 'src_setup' in locals:
|
||||
func = self.ctx.const.setup_func
|
||||
if func in locals:
|
||||
ui.info("Configuring %s...\n" % self.spec.source.name)
|
||||
locals['src_setup']()
|
||||
locals[func]()
|
||||
|
||||
def buildSource(self, locals):
|
||||
if 'src_build' in locals:
|
||||
func = self.ctx.const.build_func
|
||||
if func in locals:
|
||||
ui.info("Building %s...\n" % self.spec.source.name)
|
||||
locals['src_build']()
|
||||
locals[func]()
|
||||
|
||||
def installSource(self, locals):
|
||||
if 'src_install' in locals:
|
||||
func = self.ctx.const.install_func
|
||||
if func in locals:
|
||||
ui.info("Installing %s...\n" % self.spec.source.name)
|
||||
locals['src_install']()
|
||||
locals[func]()
|
||||
|
||||
def buildPackages(self):
|
||||
for package in self.spec.packages:
|
||||
|
||||
@@ -38,6 +38,11 @@ class Constants:
|
||||
self.c.actions_file = "actions.py"
|
||||
self.c.files_dir = "files"
|
||||
|
||||
# functions in actions_file
|
||||
self.c.setup_func = "setup"
|
||||
self.c.build_func = "build"
|
||||
self.c.install_func = "install"
|
||||
|
||||
def __getattr__(self, attr):
|
||||
return getattr(self.c, attr)
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ from pisi.actionsapi.gnuconfig import *
|
||||
from pisi.actionsapi.libtoolize import *
|
||||
from pisi.actionsapi.autotools import *
|
||||
|
||||
def src_setup():
|
||||
gnuconfig_update()
|
||||
# libtoolize()
|
||||
configure( '--with-nls' )
|
||||
def setup():
|
||||
gnuconfig_update()
|
||||
# libtoolize()
|
||||
configure( '--with-nls' )
|
||||
|
||||
def src_build():
|
||||
make()
|
||||
def build():
|
||||
make()
|
||||
|
||||
def src_install():
|
||||
install()
|
||||
def install():
|
||||
install()
|
||||
|
||||
Reference in New Issue
Block a user