Add packaging files
authorZhang Qiang <qiang.z.zhang@intel.com>
Tue, 11 Sep 2012 06:07:54 +0000 (14:07 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Thu, 13 Sep 2012 13:20:12 +0000 (21:20 +0800)
$ cd packaging
$ make all

Change-Id: I804e7376f1ce740a241565ce16eda376a63b11f4

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: 0644]
packaging/Makefile [new file with mode: 0644]
packaging/depanneur.dsc [new file with mode: 0644]
packaging/depanneur.spec [new file with mode: 0644]

diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..00eb73b
--- /dev/null
@@ -0,0 +1,9 @@
+depanneur (0.1) unstable; urgency=high
+
+  * first version of depanneur, including the following features:
+    * dependency build wit correct dependendcy order
+    * parallel build with customized threads pool
+    * full build to specify a top dir of all packages tree
+    * support generate local repo once build finished
+
+ -- Qiang Zhang <qiang.z.zhang@intel.com>  Tue, 11 Sep 2012 10:56:15 +0800
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..f194e49
--- /dev/null
@@ -0,0 +1,24 @@
+Source: depanneur
+Section: devel
+Priority: extra
+Maintainer: Qiang Zhang <qiang.z.zhang@intel.com>
+Build-Depends: debhelper (>= 7.0.15), perl (>> 5.8.1)
+Standards-Version: 3.8.0
+Homepage: http://www.tizen.org
+
+Package: depanneur
+Architecture: all
+Depends: ${perl:Depends},
+ build (>= 2012.08.10-1),
+ libyaml-perl,
+ createrepo (>= 0.9.8)
+Description: Manages and executes the builds using the obs-build script.
+  The depanneur tool goes through local Git trees and evaluates packaging
+  meta-data to determine packages needed and the build order; it then starts
+  the build process and populates a local repository with the generated
+  binaries; the generated binaries are then used to build the remaining
+  packages in the queue.
+  This tool can build one package or multiple packages at a time, making it
+  possible to build hundreds of packages on a single computer with enough
+  power in a matter of hours. Depanneur supports two build modes: traditional
+  build mode and incremental build mode.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..1c2c739
--- /dev/null
@@ -0,0 +1,7 @@
+Upstream Authors:
+
+    Intel Inc.
+
+Copyright:
+
+    Copyright (C) 2012 Intel Inc.
diff --git a/debian/rules b/debian/rules
new file mode 100644 (file)
index 0000000..d82d7f3
--- /dev/null
@@ -0,0 +1,45 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+build: build-stamp
+build-stamp:
+       dh_testdir
+
+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/depanneur $(CURDIR)/debian/depanneur/usr/bin
+       make install DESTDIR=$(CURDIR)/debian/depanneur
+
+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_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/packaging/Makefile b/packaging/Makefile
new file mode 100644 (file)
index 0000000..35795f7
--- /dev/null
@@ -0,0 +1,19 @@
+PKG_NAME := depanneur
+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:
+       @cd .. && git archive --prefix $(PKG_NAME)-$(PKG_VERSION)/ HEAD \
+                               | gzip > packaging/$(TARBALL)
+
+clean:
+       @rm -f $(PKG_NAME)*tar*
+
+all: tarball dsc
diff --git a/packaging/depanneur.dsc b/packaging/depanneur.dsc
new file mode 100644 (file)
index 0000000..ed850e1
--- /dev/null
@@ -0,0 +1,10 @@
+Format: 1.0
+Source: depanneur
+Version: 0.1
+Binary: depanneur
+Maintainer: Zhang Qiang <qiang.z.zhang@intel.com>
+Architecture: all
+Standards-Version: 3.7.1
+Build-Depends: debhelper (>= 7.0.15), perl (>> 5.8.1)
+Files:
+ 3afd61d945eee477dfa656227c7c43a7 11354 depanneur_0.1.tar.gz
diff --git a/packaging/depanneur.spec b/packaging/depanneur.spec
new file mode 100644 (file)
index 0000000..4c55608
--- /dev/null
@@ -0,0 +1,33 @@
+Name:           depanneur
+Summary:        Manages and executes the builds using the obs-build script.
+Version:        0.1
+Release:        1
+License:        GPL-2.0+
+Group:          Development/Tools
+Source0:        %{name}_%{version}.tar.gz
+
+Requires:       createrepo >= 0.9.8
+Requires:       perl(YAML)
+Requires:       build >= 2012.08.10
+Autoreq:        0
+%description
+The depanneur tool goes through local Git trees and evaluates packaging
+meta-data to determine packages needed and the build order; it then starts
+the build process and populates a local repository with the generated
+binaries; the generated binaries are then used to build the remaining
+packages in the queue.
+
+The tool can build one package or multiple packages at a time, making it
+possible to build hundreds of packages on a single computer with enough
+power in a matter of hours. Depanneur supports two build modes: traditional
+build mode and incremental build mode.
+
+%prep
+%setup -q
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%{_bindir}/depanneur