From patchwork Fri Jan 23 15:42:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 43675 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D8E8B218DB for ; Fri, 23 Jan 2015 15:43:10 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id f15sf4667656lbj.2 for ; Fri, 23 Jan 2015 07:43:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=LsQi46HHxeHuRvEcxv1BrLhvy4prKCU8bssPk0yWk8Y=; b=KMyjUyAZeUXdLqZVLDpqU0npVwReVv+n9hejnAVylU58oI0Fd3xDvajWuCWpNgF8Z1 Bx8RwfYOT+ZhBgwWWjmQI/Y4gd75pCUXmFXWOZb3k+ukHX74zOIcMG+AgrB0RVLWOjGe N5AIhfKO8dvfqmgMTEKKVXCM/p/ubAc418gON4pke9nW40P6Cwbrocm5zYpXQX2CCgks ZvprxukPfCQDh8tF9no4Mf6P/bl/VKBL7uO/r8zw+3DffWh3O9eK7Rq4XMfKErYQ+n77 Cfm4r4LeJtqpyhLV3JUz2P66XxiWOOXbtReHT390lG/9q1S9gIalkMNJ7q7Oq/27cVFr WK1Q== X-Gm-Message-State: ALoCoQkm1IJmloZBG9V9/sLGzxZpcITLdZnb7fPFh1XVJ8DY26qopaG8UKWqZaM4dfwEXCbw6Hgi X-Received: by 10.194.201.10 with SMTP id jw10mr429825wjc.3.1422027789824; Fri, 23 Jan 2015 07:43:09 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.202.198 with SMTP id kk6ls272677lac.103.gmail; Fri, 23 Jan 2015 07:43:09 -0800 (PST) X-Received: by 10.112.148.73 with SMTP id tq9mr7977702lbb.37.1422027789601; Fri, 23 Jan 2015 07:43:09 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id q4si1645090lag.103.2015.01.23.07.43.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 07:43:09 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id pv20so7943130lab.7 for ; Fri, 23 Jan 2015 07:43:09 -0800 (PST) X-Received: by 10.112.14.6 with SMTP id l6mr8045461lbc.91.1422027789522; Fri, 23 Jan 2015 07:43:09 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp296166lbb; Fri, 23 Jan 2015 07:43:08 -0800 (PST) X-Received: by 10.140.27.199 with SMTP id 65mr14549768qgx.24.1422027786570; Fri, 23 Jan 2015 07:43:06 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id g1si2345294qaa.77.2015.01.23.07.43.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 23 Jan 2015 07:43:06 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEgNz-0006rv-Lu; Fri, 23 Jan 2015 15:43:03 +0000 Received: from mail-la0-f44.google.com ([209.85.215.44]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEgNj-0006qN-Lp for lng-odp@lists.linaro.org; Fri, 23 Jan 2015 15:42:47 +0000 Received: by mail-la0-f44.google.com with SMTP id s18so2067132lam.3 for ; Fri, 23 Jan 2015 07:42:42 -0800 (PST) X-Received: by 10.112.156.132 with SMTP id we4mr7919791lbb.59.1422027762072; Fri, 23 Jan 2015 07:42:42 -0800 (PST) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id vu9sm527359lbb.36.2015.01.23.07.42.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 07:42:41 -0800 (PST) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Fri, 23 Jan 2015 16:42:30 +0100 Message-Id: <1422027750-25541-5-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1422027750-25541-1-git-send-email-anders.roxell@linaro.org> References: <1422027750-25541-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv6 4/4] scripts: add builddeb to create deb packages X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: anders.roxell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Anders Roxell Reviewed-by: Steve McIntyre --- scripts/builddeb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 scripts/builddeb diff --git a/scripts/builddeb b/scripts/builddeb new file mode 100755 index 0000000..ddca129 --- /dev/null +++ b/scripts/builddeb @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e + +ROOT_DIR=$(readlink -e $(dirname $0) | sed 's|/scripts||') +version=$(${ROOT_DIR}/scripts/odp_version.sh) + +pushd ${ROOT_DIR} +./bootstrap +./configure +make dist + +cp opendataplane-${version}.tar.gz opendataplane_${version}.orig.tar.gz +tar xzf opendataplane_${version}.orig.tar.gz + +pushd ${ROOT_DIR}/opendataplane-${version} +cp -r ${ROOT_DIR}/debian . + +current=$(echo ${version} | awk -F . '{printf("%d\n", (($1 * 100) + $2))}') +rename 's,([^-\.]*)(.*),${1}'"${current}"'${2},' debian/*odp* + +sed -i "s:\(.*odp\)\([^\.]\|$\):\1${current}\2:g" debian/control +sed -i "s:\(.*odp\)\(.*\):\1${current}\2:g" debian/rules + +debuild -us -uc +popd +popd