ActionsAPI biraz daha genişledi, bazı fonksiyonlar değiştirildi. Bzip2 paketi eklendi depoya
This commit is contained in:
@@ -31,11 +31,12 @@ def configure(parameters = ''):
|
|||||||
|
|
||||||
os.system(configure_string)
|
os.system(configure_string)
|
||||||
|
|
||||||
def make():
|
def make(parameters = ''):
|
||||||
''' FIXME: Düzgün hale getirilecek '''
|
''' FIXME: Düzgün hale getirilecek '''
|
||||||
os.system('make')
|
make_string = 'make %s' % parameters
|
||||||
|
os.system(make_string)
|
||||||
|
|
||||||
def install():
|
def install(parameters = ''):
|
||||||
''' FIXME: Düzgün hale getirilecek '''
|
''' FIXME: Düzgün hale getirilecek '''
|
||||||
''' dir_suffix = /var/tmp/pisi/ _paket_adı_ /image/ '''
|
''' dir_suffix = /var/tmp/pisi/ _paket_adı_ /image/ '''
|
||||||
dirs = glb.dirs
|
dirs = glb.dirs
|
||||||
@@ -43,7 +44,9 @@ def install():
|
|||||||
dir_suffix = os.path.dirname(os.path.dirname(os.getcwd())) + \
|
dir_suffix = os.path.dirname(os.path.dirname(os.getcwd())) + \
|
||||||
glb.const.install_dir_suffix
|
glb.const.install_dir_suffix
|
||||||
|
|
||||||
install_string = 'make prefix=%(prefix)s/%(defaultprefix)s \
|
|
||||||
|
if not parameters:
|
||||||
|
install_string = 'make prefix=%(prefix)s/%(defaultprefix)s \
|
||||||
datadir=%(prefix)s/%(data)s \
|
datadir=%(prefix)s/%(data)s \
|
||||||
infodir=%(prefix)s/%(info)s \
|
infodir=%(prefix)s/%(info)s \
|
||||||
localstatedir=%(prefix)s/%(localstate)s \
|
localstatedir=%(prefix)s/%(localstate)s \
|
||||||
@@ -56,5 +59,7 @@ def install():
|
|||||||
'localstate': dirs.localstate,
|
'localstate': dirs.localstate,
|
||||||
'conf': dirs.conf,
|
'conf': dirs.conf,
|
||||||
'data': dirs.data}
|
'data': dirs.data}
|
||||||
|
else:
|
||||||
|
install_string = 'make PREFIX=%s%s install' % (dir_suffix, parameters)
|
||||||
|
|
||||||
os.system(install_string)
|
os.system(install_string)
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ import shutil
|
|||||||
import fileinput
|
import fileinput
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
import glob
|
||||||
|
|
||||||
from utils import makedirs
|
from utils import makedirs, unlink
|
||||||
from pisi.util import copy_file
|
from pisi.util import copy_file
|
||||||
|
|
||||||
# actions api modules
|
# actions api modules
|
||||||
@@ -27,9 +28,10 @@ def dodoc(*documentList):
|
|||||||
dirs.doc,
|
dirs.doc,
|
||||||
srcTag))
|
srcTag))
|
||||||
|
|
||||||
for document in documentList:
|
for item in documentList:
|
||||||
if os.access(document, os.F_OK):
|
for document in glob.glob(item):
|
||||||
copy_file(document,
|
if os.access(document, os.F_OK):
|
||||||
|
copy_file(document,
|
||||||
os.path.join(env.install_dir,
|
os.path.join(env.install_dir,
|
||||||
dirs.doc,
|
dirs.doc,
|
||||||
srcTag,
|
srcTag,
|
||||||
@@ -74,12 +76,33 @@ def domove(source, destination):
|
|||||||
env = glb.env
|
env = glb.env
|
||||||
|
|
||||||
makedirs(env.install_dir + '/' + os.path.dirname(destination))
|
makedirs(env.install_dir + '/' + os.path.dirname(destination))
|
||||||
shutil.move(env.install_dir + '/' + source, env.install_dir + '/' + destination)
|
try:
|
||||||
|
shutil.move(env.install_dir + '/' + source, env.install_dir + '/' + destination)
|
||||||
|
except OSError, e:
|
||||||
|
pass
|
||||||
|
|
||||||
def dosym(source, destination):
|
def dosym(source, destination):
|
||||||
env = glb.env
|
env = glb.env
|
||||||
|
|
||||||
makedirs( env.install_dir + '/' + os.path.dirname(destination))
|
makedirs(env.install_dir + '/' + os.path.dirname(destination))
|
||||||
|
|
||||||
if not os.path.islink(env.install_dir + destination):
|
if not os.path.islink(env.install_dir + destination):
|
||||||
os.symlink(source, env.install_dir + destination)
|
os.symlink(source, env.install_dir + destination)
|
||||||
|
|
||||||
|
def dolib(filename, destination = '/lib', srcDir = ''):
|
||||||
|
env = glb.env
|
||||||
|
|
||||||
|
if not srcDir:
|
||||||
|
libFile = os.path.join(env.work_dir, env.src_name + "-" + env.src_version, filename)
|
||||||
|
else:
|
||||||
|
libFile = os.path.join(env.work_dir, srcDir, filename)
|
||||||
|
|
||||||
|
makedirs(env.install_dir + destination)
|
||||||
|
|
||||||
|
if os.access(libFile, os.F_OK):
|
||||||
|
copy_file(libFile, env.install_dir + destination + '/' + filename)
|
||||||
|
|
||||||
|
def remove(filename):
|
||||||
|
env = glb.env
|
||||||
|
|
||||||
|
unlink(env.install_dir + filename)
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ def createTmpDir():
|
|||||||
def chmod(filename, mode = 0755):
|
def chmod(filename, mode = 0755):
|
||||||
os.chmod(filename, mode)
|
os.chmod(filename, mode)
|
||||||
|
|
||||||
|
def unlink(filename):
|
||||||
|
os.unlink(filename)
|
||||||
|
|
||||||
def makedirs(directoryName):
|
def makedirs(directoryName):
|
||||||
try:
|
try:
|
||||||
os.makedirs(directoryName)
|
os.makedirs(directoryName)
|
||||||
|
|||||||
Reference in New Issue
Block a user