From patchwork Tue Jan 22 17:22:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gene Czarcinski X-Patchwork-Id: 2020041 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id DD7F0E00AF for ; Tue, 22 Jan 2013 17:22:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754771Ab3AVRWY (ORCPT ); Tue, 22 Jan 2013 12:22:24 -0500 Received: from eastrmfepo203.cox.net ([68.230.241.218]:42609 "EHLO eastrmfepo203.cox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754468Ab3AVRWS (ORCPT ); Tue, 22 Jan 2013 12:22:18 -0500 Received: from eastrmimpo210 ([68.230.241.225]) by eastrmfepo203.cox.net (InterMail vM.8.01.04.00 201-2260-137-20101110) with ESMTP id <20130122172217.MAID21186.eastrmfepo203.cox.net@eastrmimpo210> for ; Tue, 22 Jan 2013 12:22:17 -0500 Received: from falcon.lcl ([68.100.144.189]) by eastrmimpo210 with cox id r5NA1k00e45PsQc015NHbK; Tue, 22 Jan 2013 12:22:17 -0500 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020207.50FECAC9.0128,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.0 cv=R/2B6KtX c=1 sm=1 a=xiXiwr23JuvKlkj6ngz4TA==:17 a=XvSR1C9UmYIA:10 a=103jMkqsgCkA:10 a=JXFsXdTBFrwA:10 a=BIJj-m-0AAAA:8 a=Y9rf5MA68-8A:10 a=C3r7Rfqwx9wXR2_6aI0A:9 a=xiXiwr23JuvKlkj6ngz4TA==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; auth=pass (CRAM-MD5) smtp.auth=gczarcinski@cox.net From: Gene Czarcinski To: linux-btrfs@vger.kernel.org Cc: Gene Czarcinski Subject: [PATCH 3/3] Btrfs-progs Change rpm spec file to be handle version This "optional" patch changes version.sh and the rpm spec file to handle changes in the version and still work properly. The "default" version in version.sh is changed to VERSION and v="$VERSION". The rpm spec file now update \$VERSION which will not change. Signed-off-by: Gene Czarcinski Date: Tue, 22 Jan 2013 12:22:06 -0500 Message-Id: <1358875326-28636-4-git-send-email-gene@czarc.net> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1358875326-28636-1-git-send-email-gene@czarc.net> References: <1358875326-28636-1-git-send-email-gene@czarc.net> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org --- btrfs-progs.spec.in | 2 +- version.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/btrfs-progs.spec.in b/btrfs-progs.spec.in index b64e404..882efc7 100644 --- a/btrfs-progs.spec.in +++ b/btrfs-progs.spec.in @@ -22,7 +22,7 @@ check, modify and correct any inconsistencies in the btrfs filesystem. %prep %setup -q -c -sed -i s/v0.20-rc1/%{real_version}/g $RPM_BUILD_DIR/%{name}-%{version}/version.sh +sed -i s/\$VERSION/%{real_version}/g $RPM_BUILD_DIR/%{name}-%{version}/version.sh %build make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} diff --git a/version.sh b/version.sh index b81040e..84513a3 100644 --- a/version.sh +++ b/version.sh @@ -6,7 +6,8 @@ # Copyright 2008, Oracle # Released under the GNU GPLv2 -v="v0.20-rc1" +VERSION="v0.20-rc1" +v="$VERSION" which git &> /dev/null if [ $? == 0 -a -d .git ]; then