Packaged for deb and rpm distros
authorEd Bartosh <eduard.bartosh@intel.com>
Sat, 27 Oct 2012 19:35:04 +0000 (22:35 +0300)
committerEd Bartosh <eduard.bartosh@intel.com>
Sat, 27 Oct 2012 19:58:43 +0000 (22:58 +0300)
Debian packaging is in debian/ directory, rpm packaging and Makefile to
use by otctools automatic testing system is in packaging/ directory.

Change-Id: I94b09e04ff6bce8cf231f8b1839a9b34f7faffe5
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
debian/bmap-tools.install [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/rules [new file with mode: 0755]
packaging/Makefile [new file with mode: 0644]
packaging/bmap-tools.changes [new file with mode: 0644]
packaging/bmap-tools.dsc [new file with mode: 0644]
packaging/bmap-tools.spec [new file with mode: 0644]

diff --git a/debian/bmap-tools.install b/debian/bmap-tools.install
new file mode 100644 (file)
index 0000000..76f1ca4
--- /dev/null
@@ -0,0 +1 @@
+bmap-flasher usr/bin
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..64663e3
--- /dev/null
@@ -0,0 +1,5 @@
+bmap-tools (0.1.0) unstable; urgency=low
+
+  * Initial release.
+
+ -- Ed Bartosh <eduard.bartosh@intel.com>  Sun, 27 Oct 2012 22:31:28 +0300
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..cfbf482
--- /dev/null
@@ -0,0 +1,2 @@
+7
+8
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..166cb01
--- /dev/null
@@ -0,0 +1,14 @@
+Source: bmap-tools
+Maintainer: Ed Bartosh <eduard.bartosh@intel.com>
+Section: python
+Priority: optional
+Build-Depends: debhelper (>= 7)
+Standards-Version: 3.8.4
+XS-Python-Version: current
+
+Package: bmap-tools
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends}
+XB-Python-Version: ${python:Versions}
+Description: Bmap tools
+ Bmap-flasher - Flash an image file to a block device using the block map (bmap) 
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..0e905ac
--- /dev/null
@@ -0,0 +1,10 @@
+This is Debian GNU/Linux's prepackaged version of the bmap-tools
+
+This package was put together by Ed Bartosh <eduard.bartosh@intel.com>
+on Sun Oct 27 22:32:19 EEST 2012
+
+Copyright (c) 2012 Intel, Inc.
+
+License: GPLv2
+
+Author: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..8426848
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/make -f
+
+# This file was automatically generated by stdeb 0.6.0 at
+# Wed, 26 Sep 2012 12:22:04 +0300
+
+# Unset the environment variables set by dpkg-buildpackage. (This is
+# necessary because distutils is brittle with compiler/linker flags
+# set. Specifically, packages using f2py will break without this.)
+unexport CPPFLAGS
+unexport CFLAGS
+unexport CXXFLAGS
+unexport FFLAGS
+unexport LDFLAGS
+
+#exports specified using stdeb Setup-Env-Vars:
+#export DH_OPTIONS=--buildsystem=python_distutils
+
+
+%:
+       dh $@
+
+
diff --git a/packaging/Makefile b/packaging/Makefile
new file mode 100644 (file)
index 0000000..594e7e3
--- /dev/null
@@ -0,0 +1,21 @@
+PKG_NAME := bmap-tools
+SPECFILE = $(addsuffix .spec, $(PKG_NAME))
+PKG_VERSION := $(shell grep '^Version: ' $(SPECFILE)|awk '{print $$2}')
+
+TARBALL := $(PKG_NAME)_$(PKG_VERSION).tar.gz
+
+dsc: $(TARBALL)
+               $(eval MD5=$(shell md5sum $(TARBALL) | sed "s/  / $(shell stat -c '%s' $(TARBALL)) /"))
+                       @sed  -i 's/^Version:.*/Version: $(PKG_VERSION)/' $(PKG_NAME).dsc
+                       @sed  -i 's/ [a-f0-9]\+ [0-9]\+ $(PKG_NAME).*tar.*/ $(MD5)/' $(PKG_NAME).dsc
+
+tarball: $(TARBALL)
+$(TARBALL):
+               cd "$$(git rev-parse --show-toplevel)" \
+                       && git archive --prefix $(PKG_NAME)-$(PKG_VERSION)/ HEAD \
+                       | gzip > "$(CURDIR)/$(TARBALL)"
+
+clean:
+               rm -f $(PKG_NAME)*.tar.gz
+
+all: clean tarball dsc
diff --git a/packaging/bmap-tools.changes b/packaging/bmap-tools.changes
new file mode 100644 (file)
index 0000000..bd0b231
--- /dev/null
@@ -0,0 +1,5 @@
+-------------------------------------------------------------------
+Sat Oct 27 19:13:31 UTC 2012 - eduard.bartosh@intel.com
+
+- Initial packaging 
+
diff --git a/packaging/bmap-tools.dsc b/packaging/bmap-tools.dsc
new file mode 100644 (file)
index 0000000..a2f63b8
--- /dev/null
@@ -0,0 +1,10 @@
+Format: 1.0
+Source: bmap-tools
+Binary: bmap-tools
+Architecture: all
+Version: 0.1.0
+Maintainer: Ed Bartosh <eduard.bartosh@intel.com>
+Standards-Version: 3.8.4
+Build-Depends: debhelper (>= 7.0)
+Files: 
+ 1c730ad6a7474a9aef288e1beea38ab9 5865 bmap-tools_0.1.0.tar.gz
diff --git a/packaging/bmap-tools.spec b/packaging/bmap-tools.spec
new file mode 100644 (file)
index 0000000..2027a5a
--- /dev/null
@@ -0,0 +1,32 @@
+Name:       bmap-tools
+Summary:    Bmap Tools
+Version:    0.1.0
+Release:    1
+Group:      Development/Tools/Other
+License:    GPL-2.0
+BuildArch:  noarch
+URL:        http://otctools.jf.intel.com
+Source0:    %{name}_%{version}.tar.gz
+
+Requires:   python-distribute
+
+%description
+Bmap-flasher - Flash an image file to a block device using the block map (bmap).
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT/%{_bindir}
+install -m 755 bmap-flasher $RPM_BUILD_ROOT/%{_bindir}
+
+%files
+%defattr(-,root,root,-)
+%{_bindir}/*
+
+%changelog
+