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)
|
||||
|
||||
def make():
|
||||
def make(parameters = ''):
|
||||
''' 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 '''
|
||||
''' dir_suffix = /var/tmp/pisi/ _paket_adı_ /image/ '''
|
||||
dirs = glb.dirs
|
||||
@@ -43,7 +44,9 @@ def install():
|
||||
dir_suffix = os.path.dirname(os.path.dirname(os.getcwd())) + \
|
||||
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 \
|
||||
infodir=%(prefix)s/%(info)s \
|
||||
localstatedir=%(prefix)s/%(localstate)s \
|
||||
@@ -56,5 +59,7 @@ def install():
|
||||
'localstate': dirs.localstate,
|
||||
'conf': dirs.conf,
|
||||
'data': dirs.data}
|
||||
else:
|
||||
install_string = 'make PREFIX=%s%s install' % (dir_suffix, parameters)
|
||||
|
||||
os.system(install_string)
|
||||
|
||||
@@ -8,8 +8,9 @@ import shutil
|
||||
import fileinput
|
||||
import re
|
||||
import sys
|
||||
import glob
|
||||
|
||||
from utils import makedirs
|
||||
from utils import makedirs, unlink
|
||||
from pisi.util import copy_file
|
||||
|
||||
# actions api modules
|
||||
@@ -27,9 +28,10 @@ def dodoc(*documentList):
|
||||
dirs.doc,
|
||||
srcTag))
|
||||
|
||||
for document in documentList:
|
||||
if os.access(document, os.F_OK):
|
||||
copy_file(document,
|
||||
for item in documentList:
|
||||
for document in glob.glob(item):
|
||||
if os.access(document, os.F_OK):
|
||||
copy_file(document,
|
||||
os.path.join(env.install_dir,
|
||||
dirs.doc,
|
||||
srcTag,
|
||||
@@ -72,14 +74,35 @@ def doman(*filenameList):
|
||||
|
||||
def domove(source, destination):
|
||||
env = glb.env
|
||||
|
||||
|
||||
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):
|
||||
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):
|
||||
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):
|
||||
os.chmod(filename, mode)
|
||||
|
||||
def unlink(filename):
|
||||
os.unlink(filename)
|
||||
|
||||
def makedirs(directoryName):
|
||||
try:
|
||||
os.makedirs(directoryName)
|
||||
|
||||
Reference in New Issue
Block a user