Patchwork [10,of,22] buildrpm: introduce --suffix for adding a suffic to the package name

login
register
mail settings
Submitter Mads Kiilerich
Date May 20, 2014, 2:10 a.m.
Message ID <528a57d3359489b13730.1400551805@mk-desktop>
Download mbox | patch
Permalink /patch/4832/
State Changes Requested
Headers show

Comments

Mads Kiilerich - May 20, 2014, 2:10 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1400551681 -7200
#      Tue May 20 04:08:01 2014 +0200
# Node ID 528a57d3359489b137301ffca0e125cc1c0a84c3
# Parent  c49b91c305bd59a5bb37d0ad9be4a2468625474d
buildrpm: introduce --suffix for adding a suffic to the package name
Olle Lundberg - May 20, 2014, 4:57 p.m.
On Tue, May 20, 2014 at 4:10 AM, Mads Kiilerich <mads@kiilerich.com> wrote:

> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1400551681 -7200
> #      Tue May 20 04:08:01 2014 +0200
> # Node ID 528a57d3359489b137301ffca0e125cc1c0a84c3
> # Parent  c49b91c305bd59a5bb37d0ad9be4a2468625474d
> buildrpm: introduce --suffix for adding a suffic to the package name
>
nit: suffic -> suffix

>
> diff --git a/contrib/buildrpm b/contrib/buildrpm
> --- a/contrib/buildrpm
> +++ b/contrib/buildrpm
> @@ -12,6 +12,7 @@ if [ -z "$REV" ]; then
>  else
>      echo "Using \$REV=$REV for --rev" 1>&2
>  fi
> +SUFFIX=
>  RPMBUILDDIR="$PWD/rpmbuild"
>  BUILD=1
>  while [ "$1" ]; do
> @@ -21,6 +22,11 @@ while [ "$1" ]; do
>          REV="$1"
>          shift
>          ;;
> +    --suffix )
> +        shift
> +        SUFFIX="$1"
> +        shift
> +        ;;
>      --rpmbuilddir )
>          shift
>          RPMBUILDDIR="$1"
> @@ -85,7 +91,7 @@ rpmspec=$RPMBUILDDIR/SPECS/mercurial.spe
>
>  (
>  sed \
> -    -e "s,^Name:.*,Name: mercurial," \
> +    -e "s,^Name:.*,Name: mercurial$SUFFIX," \
>      -e "s,^Version:.*,Version: $version," \
>      -e "s,^Release:.*,Release: $release," \
>      $specfile
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/contrib/buildrpm b/contrib/buildrpm
--- a/contrib/buildrpm
+++ b/contrib/buildrpm
@@ -12,6 +12,7 @@  if [ -z "$REV" ]; then
 else
     echo "Using \$REV=$REV for --rev" 1>&2
 fi
+SUFFIX=
 RPMBUILDDIR="$PWD/rpmbuild"
 BUILD=1
 while [ "$1" ]; do
@@ -21,6 +22,11 @@  while [ "$1" ]; do
         REV="$1"
         shift
         ;;
+    --suffix )
+        shift
+        SUFFIX="$1"
+        shift
+        ;;
     --rpmbuilddir )
         shift
         RPMBUILDDIR="$1"
@@ -85,7 +91,7 @@  rpmspec=$RPMBUILDDIR/SPECS/mercurial.spe
 
 (
 sed \
-    -e "s,^Name:.*,Name: mercurial," \
+    -e "s,^Name:.*,Name: mercurial$SUFFIX," \
     -e "s,^Version:.*,Version: $version," \
     -e "s,^Release:.*,Release: $release," \
     $specfile