summaryrefslogtreecommitdiff
path: root/distfiles
diff options
context:
space:
mode:
authorHyungKyu Song <hk76.song@samsung.com>2013-02-16 01:03:43 +0900
committerHyungKyu Song <hk76.song@samsung.com>2013-02-16 01:03:43 +0900
commit087049210b1cc3819a36aa0cd047560aeb168677 (patch)
tree464b0c2dc01ee035b9028d48189680339f8a2587 /distfiles
parent1b2b3a52084111327325cd8e55d07e908ddb52ee (diff)
downloadmic-tizen_2.0.tar.gz
mic-tizen_2.0.tar.bz2
mic-tizen_2.0.zip
Diffstat (limited to 'distfiles')
-rw-r--r--distfiles/debian/compat1
-rw-r--r--distfiles/debian/control41
-rw-r--r--distfiles/debian/copyright42
-rw-r--r--distfiles/debian/docs1
-rwxr-xr-xdistfiles/debian/rules54
-rw-r--r--distfiles/mic.conf.in36
-rw-r--r--distfiles/mic.spec110
7 files changed, 285 insertions, 0 deletions
diff --git a/distfiles/debian/compat b/distfiles/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/distfiles/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/distfiles/debian/control b/distfiles/debian/control
new file mode 100644
index 0000000..b34aa3e
--- /dev/null
+++ b/distfiles/debian/control
@@ -0,0 +1,41 @@
+Source: mic
+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: mic
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends},
+ python-rpm,
+ bzip2,
+ dmsetup,
+ dosfstools,
+ e2fsprogs (>= 1.41),
+ isomd5sum,
+ genisoimage,
+ kpartx,
+ parted,
+ psmisc,
+ squashfs-tools (>= 4.0),
+ qemu-user-static | qemu-arm-static,
+ syslinux (>= 4.05),
+ extlinux (>= 4.05),
+ yum (>= 3.2),
+ libzypp,
+ python-zypp,
+ python-urlgrabber
+Recommends:
+ binfmt-support,
+ btrfs-tools,
+ udisks | hal
+Replaces:
+ mic2
+Description: image creator for Linux distributions
+ The tool mic is used to create and manipulate images for Linux distributions.
+ It is composed of three subcommand\: create, convert, chroot. Subcommand create
+ is used to create images with different types; subcommand convert is used to
+ convert an image to a specified type; subcommand chroot is used to chroot into
+ an image.
diff --git a/distfiles/debian/copyright b/distfiles/debian/copyright
new file mode 100644
index 0000000..0c99694
--- /dev/null
+++ b/distfiles/debian/copyright
@@ -0,0 +1,42 @@
+This work was packaged for Debian by:
+
+ Ding Jianfeng <jian-feng.ding@intel.com> on Fri, 26 Dec 2008 23:00:35 +0800
+
+It was downloaded from:
+
+ https://github.com/jfding/mic
+
+Upstream Authors:
+
+ Red Hat Inc.
+ Intel Inc.
+
+Copyright:
+
+ Copyright (C) 2007-2008 Red Hat Inc.
+ Copyright (C) 2008-2012 Intel Inc.
+
+Copyright for mic/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
index 0000000..a1320b1
--- /dev/null
+++ b/distfiles/debian/docs
@@ -0,0 +1 @@
+README.rst
diff --git a/distfiles/debian/rules b/distfiles/debian/rules
new file mode 100755
index 0000000..af51936
--- /dev/null
+++ b/distfiles/debian/rules
@@ -0,0 +1,54 @@
+#!/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/mic $(CURDIR)/debian/mic/usr/bin $(CURDIR)/debian/mic/usr/share/man/man1
+ install -m644 doc/mic.1 $(CURDIR)/debian/mic/usr/share/man/man1
+ #make DESTDIR=$(CURDIR)/debian/mic installman
+ #make DESTDIR=$(CURDIR)/debian/micng installconf
+ #make DESTDIR=$(CURDIR)/debian/micng installsymlinks
+ python setup.py install --root=$(CURDIR)/debian/mic
+
+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/mic.conf.in b/distfiles/mic.conf.in
new file mode 100644
index 0000000..a1d0d70
--- /dev/null
+++ b/distfiles/mic.conf.in
@@ -0,0 +1,36 @@
+[common]
+; general settings
+distro_name = Tizen
+
+plugin_dir = @PREFIX@/lib/mic/plugins
+
+[create]
+; settings for create subcommand
+tmpdir= /var/tmp/mic
+cachedir= /var/tmp/mic/cache
+outdir= ./mic-output
+bootstrapdir= /var/tmp/mic/bootstrap
+
+pkgmgr = zypp
+
+# to set global proxy for repos
+#proxy = http://proxy.yourcompany.com:8080/
+#no_proxy = localhost,127.0.0.0/8,.yourcompany.com
+
+# prefix will be added in front of generated files
+#name_prefix = output
+
+# to skip all ssl verification for repos
+#ssl_verify = no
+
+[convert]
+; settings for convert subcommand
+
+[chroot]
+; settings for chroot subcommand
+
+[bootstrap1]
+name=micbootstrap
+bootstrap=http://download.tizen.org/tools/micbootstrap/
+; bootstrap_proxy=http://proxy.yourcompany.com:port
+
diff --git a/distfiles/mic.spec b/distfiles/mic.spec
new file mode 100644
index 0000000..5ad6769
--- /dev/null
+++ b/distfiles/mic.spec
@@ -0,0 +1,110 @@
+%define is_tizen %(test -e /etc/tizen-release -o -e /etc/meego-release && echo 1 || echo 0)
+%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+Name: mic
+Summary: Image Creator for Linux Distributions
+Version: 0.14
+Release: 1
+Group: System/Base
+License: GPLv2
+BuildArch: noarch
+URL: http://www.tizen.org
+Source0: %{name}-%{version}.tar.gz
+Requires: rpm-python
+Requires: util-linux
+Requires: coreutils
+Requires: python >= 2.5
+Requires: e2fsprogs
+Requires: dosfstools >= 2.11-8
+%if 0%{is_tizen} == 0
+Requires: yum >= 3.2.24
+%endif
+%if 0%{?suse_version} == 1210
+Requires: syslinux == 4.04.1
+%else
+Requires: syslinux >= 3.82
+%endif
+Requires: kpartx
+Requires: parted
+Requires: device-mapper
+Requires: /usr/bin/genisoimage
+Requires: cpio
+Requires: isomd5sum
+Requires: gzip
+Requires: bzip2
+Requires: squashfs-tools >= 4.0
+Requires: python-urlgrabber
+%if 0%{?suse_version}
+Requires: btrfsprogs
+%else
+Requires: btrfs-progs
+%endif
+
+%if 0%{?fedora_version} || 0%{is_tizen} == 1
+Requires: m2crypto
+%else
+%if 0%{?suse_version} == 1210
+Requires: python-M2Crypto
+%else
+Requires: python-m2crypto
+%endif
+%endif
+
+%if 0%{?fedora_version} == 16
+Requires: syslinux-extlinux
+%endif
+
+%if 0%{?suse_version} == 1210
+Requires: python-zypp == 0.5.50
+%else
+Requires: python-zypp >= 0.5.9.1
+%endif
+BuildRequires: python-devel
+
+Obsoletes: mic2
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+
+%description
+The tool mic is used to create and manipulate images for Linux distributions.
+It is composed of three subcommand\: create, convert, chroot. Subcommand create
+is used to create images with different types; subcommand convert is used to
+convert an image to a specified type; subcommand chroot is used to chroot into
+an image.
+
+
+%prep
+%setup -q -n %{name}-%{version}
+
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%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 man page
+# remove yum backend for tizen
+%if 0%{is_tizen} == 1
+rm -rf %{buildroot}/%{_prefix}/lib/%{name}/plugins/backend/yumpkgmgr.py
+%endif
+mkdir -p %{buildroot}/%{_prefix}/share/man/man1
+install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
+
+
+%files
+%defattr(-,root,root,-)
+%doc README.rst
+%{_mandir}/man1/*
+%dir %{_sysconfdir}/%{name}
+%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
+%{python_sitelib}/*
+%dir %{_prefix}/lib/%{name}
+%{_prefix}/lib/%{name}/*
+%{_bindir}/*