git archive --format=tar --prefix=tizenpkg-$(TAGVER)/ $(TAG) | \
gzip > tizenpkg-$(TAGVER).tar.gz
-install: all
+install: all install-data
python setup.py install --prefix=${PREFIX}
dev: all
python setup.py develop --prefix=${PREFIX}
+install-data:
+ install -d ${DESTDIR}/usr/share/tizenpkg/
+ install -m 644 data/* ${DESTDIR}/usr/share/tizenpkg/
+
clean:
rm -rf build/
rm -rf dist/
--- /dev/null
+#!/bin/sh
+
+echo 'Do the work with the args:'
+echo $*
+++ /dev/null
-#!/bin/sh
-
-echo 'Do the work'
import os
from subprocess import *
-from mic import msger
+import msger
def runtool(cmdln_or_args, catch=1):
""" wrapper for most of the subprocess calls
def quiet(cmdln_or_args):
return runtool(cmdln_or_args, catch=0)[0]
+def embed(cmdln_or_args):
+ # show all the message using msger.verbose
+
+ rc, out = runtool(cmdln_or_args, catch=3)
+
+ if isinstance(cmdln_or_args, list):
+ cmd = ' '.join(cmdln_or_args)
+ else:
+ cmd = cmdln_or_args
+
+ msger.debug('running command: "%s"' % cmd)
+ msger.raw(out)
+ return rc
import os
-import .msger
+import msger
def which(cmd):
def is_exe(fpath):
if not text.endswith(suffix):
return text
return text[:-len(suffix)]
+
+def get_share_dir():
+ # TODO need to be better
+ return '/usr/share/tizenpkg/'
import ConfigParser
from tizenpkg.__version__ import VERSION
-from tizenpkg import msger, cmdln, errors
+from tizenpkg import msger, cmdln, errors, utils, runner
class TizenPkg(cmdln.Cmdln):
"""
from tizenpkg import build
build.do()
+ @cmdln.alias("pk")
+ def do_packaging(self, argv):
+ """${cmd_name}: prepare packaging files for current pkg
+
+ Usage:
+ tizenpkg packaging
+
+ ${cmd_option_list}
+ """
+
+ # this command is a shell script wrapper
+ shpath = os.path.join(utils.get_share_dir(), 'packaging.sh')
+ runner.embed(['sh', shpath] + argv)
+
if __name__ == '__main__':
try:
mic = TizenPkg()