* 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
|
pass
|
||||||
|
|
||||||
def configureSource(self, locals):
|
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)
|
ui.info("Configuring %s...\n" % self.spec.source.name)
|
||||||
locals['src_setup']()
|
locals[func]()
|
||||||
|
|
||||||
def buildSource(self, locals):
|
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)
|
ui.info("Building %s...\n" % self.spec.source.name)
|
||||||
locals['src_build']()
|
locals[func]()
|
||||||
|
|
||||||
def installSource(self, locals):
|
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)
|
ui.info("Installing %s...\n" % self.spec.source.name)
|
||||||
locals['src_install']()
|
locals[func]()
|
||||||
|
|
||||||
def buildPackages(self):
|
def buildPackages(self):
|
||||||
for package in self.spec.packages:
|
for package in self.spec.packages:
|
||||||
|
|||||||
@@ -38,6 +38,11 @@ class Constants:
|
|||||||
self.c.actions_file = "actions.py"
|
self.c.actions_file = "actions.py"
|
||||||
self.c.files_dir = "files"
|
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):
|
def __getattr__(self, attr):
|
||||||
return getattr(self.c, attr)
|
return getattr(self.c, attr)
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ from pisi.actionsapi.gnuconfig import *
|
|||||||
from pisi.actionsapi.libtoolize import *
|
from pisi.actionsapi.libtoolize import *
|
||||||
from pisi.actionsapi.autotools import *
|
from pisi.actionsapi.autotools import *
|
||||||
|
|
||||||
def src_setup():
|
def setup():
|
||||||
gnuconfig_update()
|
gnuconfig_update()
|
||||||
# libtoolize()
|
# libtoolize()
|
||||||
configure( '--with-nls' )
|
configure( '--with-nls' )
|
||||||
|
|
||||||
def src_build():
|
def build():
|
||||||
make()
|
make()
|
||||||
|
|
||||||
def src_install():
|
def install():
|
||||||
install()
|
install()
|
||||||
|
|||||||
Reference in New Issue
Block a user