added distfiles for rpm/deb packaging
authorJF Ding <jian-feng.ding@intel.com>
Thu, 1 Dec 2011 10:27:31 +0000 (18:27 +0800)
committerJF Ding <jian-feng.ding@intel.com>
Thu, 1 Dec 2011 10:27:31 +0000 (18:27 +0800)
12 files changed:
Makefile
data/build.sh [changed mode: 0755->0644]
data/import.sh [changed mode: 0755->0644]
data/packaging.sh [changed mode: 0755->0644]
distfiles/debian/compat [new file with mode: 0644]
distfiles/debian/control [new file with mode: 0644]
distfiles/debian/copyright [new file with mode: 0644]
distfiles/debian/docs [new file with mode: 0644]
distfiles/debian/rules [new file with mode: 0755]
distfiles/tizenpkg.spec [new file with mode: 0644]
distfiles/tizenpkg.yaml [new file with mode: 0644]
setup.py

index 0af09d4..1c21410 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -25,16 +25,12 @@ dist-gz:
        git archive --format=tar --prefix=tizenpkg-$(TAGVER)/ $(TAG) | \
                gzip  > tizenpkg-$(TAGVER).tar.gz
 
-install: all install-data
+install: all
        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/
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/distfiles/debian/compat b/distfiles/debian/compat
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/distfiles/debian/control b/distfiles/debian/control
new file mode 100644 (file)
index 0000000..2d82102
--- /dev/null
@@ -0,0 +1,16 @@
+Source: tizenpkg
+Section: devel
+Priority: extra
+Maintainer: Jian-feng Ding <jian-feng.ding@intel.com>
+Build-Depends: debhelper (>= 7.0.15), cdbs, python-dev, python-support
+Standards-Version: 3.8.0
+Homepage: http://www.tizen.org
+
+Package: tizenpkg
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends},
+ git-core,
+ curl
+Description: The command line tools for Tizen package developers
+  The command line tools for Tizen package developers will
+  be used to do packaging related tasks. 
diff --git a/distfiles/debian/copyright b/distfiles/debian/copyright
new file mode 100644 (file)
index 0000000..e116bcd
--- /dev/null
@@ -0,0 +1,40 @@
+This work was packaged for Debian by:
+
+    Ding Jianfeng <jian-feng.ding@intel.com> on Fri, 02 Dec 2011 13:00:35 +0800
+
+It was downloaded from:
+
+    http://www.tizen.org
+
+Upstream Authors:
+
+    Intel Inc.
+
+Copyright:
+
+    Copyright (C) 2011 Intel Inc.
+
+Copyright for tizenpkg/cmdln.py:
+
+    Copyright (C) 2002-2005 ActiveState Corp.
+    Copyright (C) Trent Mick <trentm@activestate.com>
+
+    MIT License
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in
+    all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+    THE SOFTWARE.
diff --git a/distfiles/debian/docs b/distfiles/debian/docs
new file mode 100644 (file)
index 0000000..a1320b1
--- /dev/null
@@ -0,0 +1 @@
+README.rst
diff --git a/distfiles/debian/rules b/distfiles/debian/rules
new file mode 100755 (executable)
index 0000000..4eea2fa
--- /dev/null
@@ -0,0 +1,53 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+build: build-stamp
+build-stamp:
+       dh_testdir
+
+       python setup.py build
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp
+
+       dh_clean
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+
+       # Installing package
+       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
+
+binary-indep: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs
+       dh_installdocs
+       dh_install
+       dh_installman
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+       dh_pysupport
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary-arch: build install
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/distfiles/tizenpkg.spec b/distfiles/tizenpkg.spec
new file mode 100644 (file)
index 0000000..810069b
--- /dev/null
@@ -0,0 +1,74 @@
+# 
+# Do NOT Edit the Auto-generated Part!
+# Generated by: spectacle version 0.23
+# 
+# >> macros
+# << macros
+
+%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+Name:       tizenpkg
+Summary:    The command line tools for Tizen package developers
+Version:    0.1
+Release:    1
+Group:      Development/Tools
+License:    GPLv2
+BuildArch:  noarch
+URL:        http://www.tizen.org
+Source0:    %{name}-%{version}.tar.gz
+Source100:  tizenpkg.yaml
+Requires:   python >= 2.5
+Requires:   git-core
+Requires:   curl
+BuildRequires:  python-devel
+BuildRoot:  %{_tmppath}/%{name}-%{version}-build
+
+
+%description
+The command line tools for Tizen package developers will
+be used to do packaging related tasks. 
+
+
+
+
+%prep
+%setup -q -n %{name}-%{version}
+
+# >> setup
+# << setup
+
+%build
+# >> build pre
+# << build pre
+
+CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+
+# >> build post
+# << build post
+%install
+rm -rf $RPM_BUILD_ROOT
+# >> install pre
+# << install pre
+%if 0%{?suse_version}
+%{__python} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix}
+%else
+%{__python} setup.py install --root=$RPM_BUILD_ROOT -O1
+%endif
+
+# >> install post
+# << install post
+
+
+
+
+
+
+%files
+%defattr(-,root,root,-)
+# >> files
+%doc README.rst
+%{python_sitelib}/*
+%{_datadir}/%{name}/*
+%{_bindir}/*
+# << files
+
+
diff --git a/distfiles/tizenpkg.yaml b/distfiles/tizenpkg.yaml
new file mode 100644 (file)
index 0000000..ee04947
--- /dev/null
@@ -0,0 +1,24 @@
+Name: tizenpkg
+Summary: The command line tools for Tizen package developers
+Version: 0.1
+Release: 1
+Group: Development/Tools
+License: GPLv2
+URL: http://www.tizen.org
+Description: |
+    The command line tools for Tizen package developers will
+    be used to do packaging related tasks. 
+
+Sources:
+    - "%{name}-%{version}.tar.gz"
+Builder: python
+BuildArch: noarch
+SupportOtherDistros: yes
+
+Requires:
+    - python >= 2.5
+    - git-core
+    - curl
+
+PkgBR:
+    - python-devel
index 5b9b1f2..f8e4e79 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
 import os, sys
+import glob
 from distutils.core import setup
 try:
     import setuptools
@@ -50,6 +51,6 @@ setup(name='tizenpkg',
       url='http://git.tizen.org/',
       scripts=['tools/tizenpkg'],
       packages=['tizenpkg'],
-      package_data={'tizenpkg': ['data/*']},
+      data_files = [('/usr/share/tizenpkg', glob.glob('data/*'))],
      )