Mercurial > hg
diff contrib/buildrpm @ 7277:3e000e2bf5f6
Make contrib/buildrpm work on Fedora 9.
mercurial.spec had bitrotted. These changes makes it possible to build an rpm that is usable.
Only minimal changes has been made, and there is plenty of room for improvement.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 06 Oct 2008 14:41:22 +0200 |
parents | 6def53be19fb |
children | 3d827cc616b6 |
line wrap: on
line diff
--- a/contrib/buildrpm Mon Oct 27 13:38:31 2008 -0400 +++ b/contrib/buildrpm Mon Oct 06 14:41:22 2008 +0200 @@ -1,6 +1,8 @@ #!/bin/sh # # Build a Mercurial RPM in place. +# Known to work on: +# - Fedora 9 # # Bryan O'Sullivan <bos@serpentine.com> @@ -12,7 +14,7 @@ exit 1 fi -rpmdir=/tmp/"`basename $root | sed 's/ /_/'`"-rpm +rpmdir=/tmp/"`basename $root | sed 's/ /_/'`"-rpm # FIXME: Insecure /tmp handling cd "$root" rm -rf $rpmdir @@ -24,7 +26,7 @@ exit 1 fi -tmpspec=/tmp/`basename "$specfile"`.$$ +tmpspec=/tmp/`basename "$specfile"`.$$ # FIXME: Insecure /tmp handling # Use the most recent tag as the version. version=`hg tags | perl -e 'while(<STDIN>){if(/^(\d\S+)/){print$1;exit}}'` # Compute the release number as the difference in revision numbers @@ -58,5 +60,6 @@ rm -rf $tmpspec $rpmdir/BUILD mv $rpmdir/RPMS/*/* $rpmdir && rm -r $rpmdir/RPMS echo - echo "Packages are in $rpmdir" + echo "Packages are in $rpmdir:" + ls -l $rpmdir/*.rpm fi