From patchwork Fri Jan 23 12:34:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 43632 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1BA7F240D9 for ; Fri, 23 Jan 2015 12:35:02 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf4065259lbd.3 for ; Fri, 23 Jan 2015 04:35:01 -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=VtZZ9WyNciUbR8+DhWKFXSFJzQlT7Ntk1GbKjGwQ7b0=; b=UwQNsoPZIDaoZ1sHU2VApj2atqJFNYjJiENWC0hoNfeLFtPbbfNjxt0k2P9s5itocx ZQFMFmv0RcMqKkjhL8pi7CGDnYkorzQmVV3X2TIPol2lAoRHiFfsCNUqpfKBpW+GHGze fQKC5TV6bBRFjdcrfzcCBGsZSX+NVBm9PeC3JIb1a9U2qHVEqmS4NzJ7oDX6wZT1GUOn hsMqHGbmJwc/9cLi6UPqfwS2fpu8dO10gUYUVItYTFTymBxZUWeYvyo8pogpAVN2Az4J hIwC3NbJwYMXWsozKrBaj3n4Lz/CFccdDmw9Hz5T4EmzJVqJRRjQdhDtA5tToIfCNzbm jzZA== X-Gm-Message-State: ALoCoQmn7sJRlRiXfi/AJRdBEiaQKh6tUtcRGVipUvGPf9hlUwRU/vyZGuAwsCJBfpWqu/MIODG8 X-Received: by 10.194.204.201 with SMTP id la9mr18620wjc.6.1422016501097; Fri, 23 Jan 2015 04:35:01 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.161.198 with SMTP id xu6ls257381lab.86.gmail; Fri, 23 Jan 2015 04:35:00 -0800 (PST) X-Received: by 10.152.87.16 with SMTP id t16mr7056026laz.63.1422016500932; Fri, 23 Jan 2015 04:35:00 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id ji10si1254991lbc.54.2015.01.23.04.35.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 04:35:00 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id u10so6760793lbd.9 for ; Fri, 23 Jan 2015 04:35:00 -0800 (PST) X-Received: by 10.152.5.226 with SMTP id v2mr7115255lav.34.1422016500811; Fri, 23 Jan 2015 04:35:00 -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 c8csp236530lbb; Fri, 23 Jan 2015 04:35:00 -0800 (PST) X-Received: by 10.224.66.200 with SMTP id o8mr7585019qai.13.1422016499388; Fri, 23 Jan 2015 04:34:59 -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 f8si1720945qar.87.2015.01.23.04.34.58 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 23 Jan 2015 04:34:59 -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 1YEdRw-00065X-In; Fri, 23 Jan 2015 12:34:56 +0000 Received: from mail-la0-f48.google.com ([209.85.215.48]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YEdRf-00061u-Ga for lng-odp@lists.linaro.org; Fri, 23 Jan 2015 12:34:39 +0000 Received: by mail-la0-f48.google.com with SMTP id pv20so6996388lab.7 for ; Fri, 23 Jan 2015 04:34:34 -0800 (PST) X-Received: by 10.152.5.132 with SMTP id s4mr7053830las.39.1422016473951; Fri, 23 Jan 2015 04:34:33 -0800 (PST) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id dx2sm407276lbc.49.2015.01.23.04.34.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 04:34:33 -0800 (PST) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Fri, 23 Jan 2015 13:34:21 +0100 Message-Id: <1422016461-28976-5-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1422016461-28976-1-git-send-email-anders.roxell@linaro.org> References: <1422016461-28976-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv5 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.217.178 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 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 scripts/builddeb diff --git a/scripts/builddeb b/scripts/builddeb new file mode 100755 index 0000000..9e93639 --- /dev/null +++ b/scripts/builddeb @@ -0,0 +1,30 @@ +#!/bin/bash + +set -e + +ROOT_DIR=$(readlink -e $(dirname $0) | sed 's|/scripts||') +version=$(echo $(${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))}') + +for file in debian/*odp* ; do + mv $file $(dirname $file)/$(echo $(basename $file) | sed "s:\([^-\.]*\)\(.*\):\1$current\2:g") +done + +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