git tag $(VERSION)
dist-bz2:
- git archive --format=tar --prefix=pkghelper-$(TAGVER)/ $(TAG) | \
- bzip2 > pkghelper-$(TAGVER).tar.bz2
+ git archive --format=tar --prefix=tizenpkg-$(TAGVER)/ $(TAG) | \
+ bzip2 > tizenpkg-$(TAGVER).tar.bz2
dist-gz:
- git archive --format=tar --prefix=pkghelper-$(TAGVER)/ $(TAG) | \
- gzip > pkghelper-$(TAGVER).tar.gz
+ git archive --format=tar --prefix=tizenpkg-$(TAGVER)/ $(TAG) | \
+ gzip > tizenpkg-$(TAGVER).tar.gz
install: all
python setup.py install --prefix=${PREFIX}
-=========
-pkghelper
-=========
+========
+tizenpkg
+========
---------------------------------------------------
The command line tools for Tizen package developers
---------------------------------------------------
#!/bin/bash
USAGE="usage:
- pkghelper build [target OBS project]
+ tizenpkg build [target OBS project]
Build package at remote build server, the default target OBS project
is home:<user_id>:branches:Trunk
# tar the local changes
tar jcf package.tar.bz2 `git ls-files`
-# get user name/passwd from pkghelper.conf
-user=$(pkghelper cfg user)
-passwd=$(pkghelper cfg passwd)
-HUDSON_SERVER=$(pkghelper cfg src_server)
-passwdx=$(pkghelper cfg passwdx)
+# get user name/passwd from tizenpkg.conf
+user=$(tizenpkg cfg user)
+passwd=$(tizenpkg cfg passwd)
+HUDSON_SERVER=$(tizenpkg cfg src_server)
+passwdx=$(tizenpkg cfg passwdx)
echo "Submiting your changes to build server"
ret_string=$(curl -i -s -u$user:$passwd -Fname=package.tar.bz2 -Ffile0=@package.tar.bz2 -Fjson='{"parameter": [{"name": "package.tar.bz2", "file": "file0"},{"name":"pkg", "value":"'$prj_name'"},{"name":"parameters","value":"obsproject='$target_obsproject';passwdx='$passwdx'"}]}' -FSubmit=Build "$HUDSON_SERVER/job/build/build")
if [ $? != 0 ]; then
echo $ret_string
- die "Server Error, please check your pkghelper configuration"
+ die "Server Error, please check your tizenpkg configuration"
fi
sleep 2
#!/bin/bash
USAGE="usage:
- pkghelper packaging [git tag/commit id] [-s] [-t tag] [-f spec file]
+ tizenpkg packaging [git tag/commit id] [-s] [-t tag] [-f spec file]
Packaging master branch, convert the files to release branch
from the given tag or commit id, by default it's the HEAD.
echo $string|grep '302' > /dev/null
if [ $? != 0 ]; then
echo $string
- die "Server Error, please check your pkghelper configuration"
+ die "Server Error, please check your tizenpkg configuration"
fi
last_id=`curl -s -u$user:$passwd "$HUDSON_SERVER/job/srctar_md5sum/lastBuild/buildNumber"`
tag=$(git describe $git_obj --abbrev=0 --tags)
fi
-user=$(pkghelper cfg user)
-passwd=$(pkghelper cfg passwd)
-HUDSON_SERVER=$(pkghelper cfg src_server)
+user=$(tizenpkg cfg user)
+passwd=$(tizenpkg cfg passwd)
+HUDSON_SERVER=$(tizenpkg cfg src_server)
git_url=`git config remote.origin.url`
echo $git_url|grep ^ssh > /dev/null
-Source: pkghelper
+Source: tizenpkg
Section: devel
Priority: extra
Maintainer: Jian-feng Ding <jian-feng.ding@intel.com>
Standards-Version: 3.8.0
Homepage: http://www.tizen.org
-Package: pkghelper
+Package: tizenpkg
Architecture: all
Depends: ${misc:Depends}, ${python:Depends},
git-core,
Copyright (C) 2011 Intel Inc.
-Copyright for pkghelper/cmdln.py:
+Copyright for tizenpkg/cmdln.py:
Copyright (C) 2002-2005 ActiveState Corp.
Copyright (C) Trent Mick <trentm@activestate.com>
dh_clean -k
dh_installdirs
# Installing package
- mkdir -p $(CURDIR)/debian/pkghelper /usr/bin
- #make DESTDIR=$(CURDIR)/debian/pkghelper installman
- #make DESTDIR=$(CURDIR)/debian/pkghelper installconf
- #make DESTDIR=$(CURDIR)/debian/pkghelper installsymlinks
- python setup.py install --root=$(CURDIR)/debian/pkghelper --prefix=/usr --install-layout=deb
+ mkdir -p $(CURDIR)/debian/tizenpkg /usr/bin
+ #make DESTDIR=$(CURDIR)/debian/tizenpkg installman
+ #make DESTDIR=$(CURDIR)/debian/tizenpkg installconf
+ #make DESTDIR=$(CURDIR)/debian/tizenpkg installsymlinks
+ python setup.py install --root=$(CURDIR)/debian/tizenpkg --prefix=/usr --install-layout=deb
binary-indep: build install
dh_testdir
Format: 1.0
-Source: pkghelper
+Source: tizenpkg
Version: 0.1
-Binary: pkghelper
+Binary: tizenpkg
Maintainer: Jian-feng Ding <jian-feng.ding@intel.com>
Architecture: all
Standards-Version: 3.7.1
# << macros
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-Name: pkghelper
+Name: tizenpkg
Summary: The command line tools for Tizen package developers
Version: 0.1
Release: 1
BuildArch: noarch
URL: http://www.tizen.org
Source0: %{name}-%{version}.tar.gz
-Source100: pkghelper.yaml
+Source100: tizenpkg.yaml
Requires: python >= 2.5
Requires: git-core
Requires: curl
-Name: pkghelper
+Name: tizenpkg
Summary: The command line tools for Tizen package developers
Version: 0.1
Release: 1
except ImportError:
pass
-MOD_NAME = 'pkghelper'
+MOD_NAME = 'tizenpkg'
version_path = 'VERSION'
if not os.path.isfile(version_path):
except:
pass
-setup(name='pkghelper',
+setup(name='tizenpkg',
version = version,
description='The command line tools for Tizen package developers',
author='Jian-feng Ding, Huaxu Wan',
author_email='jian-feng.ding@intel.com, huaxu.wan@intel.com',
url='http://git.tizen.org/',
- scripts=['tools/pkghelper'],
- packages=['pkghelper'],
- data_files = [('/usr/share/pkghelper', glob.glob('data/*'))],
+ scripts=['tools/tizenpkg'],
+ packages=['tizenpkg'],
+ data_files = [('/usr/share/tizenpkg', glob.glob('data/*'))],
)
# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"""
-module for pkghelper tool
+module for tizenpkg tool
"""
if not fpath:
# use the default path
- fpath = os.path.expanduser('~/.pkghelper.conf')
+ fpath = os.path.expanduser('~/.tizenpkg.conf')
if not os.path.exists(fpath):
if not self._new_conf(fpath):
def get_share_dir():
# TODO need to be better
- return '/usr/share/pkghelper/'
+ return '/usr/share/tizenpkg/'
import io
import ConfigParser
-from pkghelper.__version__ import VERSION
-from pkghelper import msger, cmdln, errors, utils, runner
-from pkghelper.conf import configmgr
+from tizenpkg.__version__ import VERSION
+from tizenpkg import msger, cmdln, errors, utils, runner
+from tizenpkg.conf import configmgr
def _fall_to_shell(cmdname):
def raw_wrapper(f):
runner.embed(['bash', shpath] + list(argv)[1:])
return _run_embed_sh
- cmdmod = 'pkghelper.cmd_' + cmdname
+ cmdmod = 'tizenpkg.cmd_' + cmdname
try:
__import__(cmdmod)
return raw_wrapper
class TizenPkg(cmdln.Cmdln):
"""
- Usage: pkghelper [GLOBAL-OPTS] SUBCOMMAND [OPTS] [ARGS...]
+ Usage: tizenpkg [GLOBAL-OPTS] SUBCOMMAND [OPTS] [ARGS...]
- pkghelper - the command line tool for Tizen package developers
- Try 'pkghelper help SUBCOMAND' for help on a specific subcommand.
+ tizenpkg - the command line tool for Tizen package developers
+ Try 'tizenpkg help SUBCOMAND' for help on a specific subcommand.
${command_list}
global ${option_list}
${help_list}
"""
- name = 'pkghelper'
+ name = 'tizenpkg'
version = VERSION
def get_optparser(self):
"""${cmd_name}: test building for current pkg
Usage:
- pkghelper build [OBS_project]
+ tizenpkg build [OBS_project]
${cmd_option_list}
"""
- from pkghelper import cmd_build as cmd
+ from tizenpkg import cmd_build as cmd
cmd.do(opts, args)
@cmdln.alias("pk")
"""${cmd_name}: prepare packaging files for current pkg
Usage:
- pkghelper packaging
+ tizenpkg packaging
${cmd_option_list}
"""
- from pkghelper import cmd_packaging as cmd
+ from tizenpkg import cmd_packaging as cmd
cmd.do(opts, args)
@_fall_to_shell('import')
"""${cmd_name}: import new tarballs for current pkg
Usage:
- pkghelper import
+ tizenpkg import
${cmd_option_list}
"""
- from pkghelper import cmd_import as cmd
+ from tizenpkg import cmd_import as cmd
cmd.do(opts, args)
@cmdln.alias("cfg")
"""${cmd_name}: query values of config file
Usage:
- pkghelper getconfig <opt1> [<opt2> ...]
+ tizenpkg getconfig <opt1> [<opt2> ...]
${cmd_option_list}
"""