From 2195f9261e810cc115a2d5aca32e3101dc371a61 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Wed, 6 Mar 2013 05:36:32 +0000 Subject: [PATCH] buildkit for buildrepo on debian/ubuntu git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15393 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/kits/debian_template/changelog | 5 ++ .../share/xcat/kits/debian_template/compat | 1 + .../share/xcat/kits/debian_template/control | 11 +++++ .../share/xcat/kits/debian_template/copyright | 0 .../share/xcat/kits/debian_template/postinst | 44 ++++++++++++++++++ .../share/xcat/kits/debian_template/postrm | 41 +++++++++++++++++ .../share/xcat/kits/debian_template/preinst | 42 +++++++++++++++++ .../share/xcat/kits/debian_template/prerm | 46 +++++++++++++++++++ .../share/xcat/kits/debian_template/rules | 28 +++++++++++ .../xcat/kits/debian_template/source/format | 1 + 10 files changed, 219 insertions(+) create mode 100644 xCAT-buildkit/share/xcat/kits/debian_template/changelog create mode 100644 xCAT-buildkit/share/xcat/kits/debian_template/compat create mode 100644 xCAT-buildkit/share/xcat/kits/debian_template/control create mode 100644 xCAT-buildkit/share/xcat/kits/debian_template/copyright create mode 100644 xCAT-buildkit/share/xcat/kits/debian_template/postinst create mode 100644 xCAT-buildkit/share/xcat/kits/debian_template/postrm create mode 100644 xCAT-buildkit/share/xcat/kits/debian_template/preinst create mode 100644 xCAT-buildkit/share/xcat/kits/debian_template/prerm create mode 100644 xCAT-buildkit/share/xcat/kits/debian_template/rules create mode 100644 xCAT-buildkit/share/xcat/kits/debian_template/source/format diff --git a/xCAT-buildkit/share/xcat/kits/debian_template/changelog b/xCAT-buildkit/share/xcat/kits/debian_template/changelog new file mode 100644 index 000000000..cec4ac85d --- /dev/null +++ b/xCAT-buildkit/share/xcat/kits/debian_template/changelog @@ -0,0 +1,5 @@ +<<>> (1.0) precise; urgency=low + + * Kit component package build. + + -- root Fri, 01 Mar 2013 14:05:43 +0800 diff --git a/xCAT-buildkit/share/xcat/kits/debian_template/compat b/xCAT-buildkit/share/xcat/kits/debian_template/compat new file mode 100644 index 000000000..7ed6ff82d --- /dev/null +++ b/xCAT-buildkit/share/xcat/kits/debian_template/compat @@ -0,0 +1 @@ +5 diff --git a/xCAT-buildkit/share/xcat/kits/debian_template/control b/xCAT-buildkit/share/xcat/kits/debian_template/control new file mode 100644 index 000000000..5cff98e20 --- /dev/null +++ b/xCAT-buildkit/share/xcat/kits/debian_template/control @@ -0,0 +1,11 @@ +Source: <<>> +Section: admin +Priority: extra +Maintainer: xcatkit +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: <<>> +Architecture: all +Depends: <<>>,<<>>,<<>> +Description: <<>> diff --git a/xCAT-buildkit/share/xcat/kits/debian_template/copyright b/xCAT-buildkit/share/xcat/kits/debian_template/copyright new file mode 100644 index 000000000..e69de29bb diff --git a/xCAT-buildkit/share/xcat/kits/debian_template/postinst b/xCAT-buildkit/share/xcat/kits/debian_template/postinst new file mode 100644 index 000000000..54d566f4e --- /dev/null +++ b/xCAT-buildkit/share/xcat/kits/debian_template/postinst @@ -0,0 +1,44 @@ +#!/bin/sh +# postinst script for aaa +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + <<>> + if [ -f /tmp/<<>> ] + <<>> + rm /tmp/<<>> + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/xCAT-buildkit/share/xcat/kits/debian_template/postrm b/xCAT-buildkit/share/xcat/kits/debian_template/postrm new file mode 100644 index 000000000..de703c7a3 --- /dev/null +++ b/xCAT-buildkit/share/xcat/kits/debian_template/postrm @@ -0,0 +1,41 @@ +#!/bin/sh +# postrm script for aaa +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + remove|purge) + <<>> + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/xCAT-buildkit/share/xcat/kits/debian_template/preinst b/xCAT-buildkit/share/xcat/kits/debian_template/preinst new file mode 100644 index 000000000..a0b2977c5 --- /dev/null +++ b/xCAT-buildkit/share/xcat/kits/debian_template/preinst @@ -0,0 +1,42 @@ +#!/bin/sh +# preinst script for aaa +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install) + <<>> + ;; + + upgrade) + if [ -f /tmp/<<>> ] + <<>> + fi + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/xCAT-buildkit/share/xcat/kits/debian_template/prerm b/xCAT-buildkit/share/xcat/kits/debian_template/prerm new file mode 100644 index 000000000..145940f06 --- /dev/null +++ b/xCAT-buildkit/share/xcat/kits/debian_template/prerm @@ -0,0 +1,46 @@ +#!/bin/sh +# prerm script for aaa +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove) + <<>> + ;; + + upgrade) + touch /tmp/<<>> + ;; + + deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/xCAT-buildkit/share/xcat/kits/debian_template/rules b/xCAT-buildkit/share/xcat/kits/debian_template/rules new file mode 100644 index 000000000..da8415103 --- /dev/null +++ b/xCAT-buildkit/share/xcat/kits/debian_template/rules @@ -0,0 +1,28 @@ +#!/usr/bin/make -f + +export DH_COMPAT=5 + +build: + pwd + +clean: + dh_testdir + dh_testroot + dh_clean -d + +install: + pwd + +binary-indep: build install + dh_installchangelogs + dh_compress + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: + pwd + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/xCAT-buildkit/share/xcat/kits/debian_template/source/format b/xCAT-buildkit/share/xcat/kits/debian_template/source/format new file mode 100644 index 000000000..d3827e75a --- /dev/null +++ b/xCAT-buildkit/share/xcat/kits/debian_template/source/format @@ -0,0 +1 @@ +1.0