@@ -2,9 +2,9 @@
to_ver() {
VN=$1
- #drop leading 'ndctl-' out of the version so its a pure number
- if [ ${VN:0:6} = "ndctl-" ]; then
- VN=${VN:6}
+ #drop leading 'v' out of the version so its a pure number
+ if [ ${VN:0:1} = "v" ]; then
+ VN=${VN:1}
fi
echo $VN
}
@@ -29,10 +29,10 @@ LF='
if test -f version; then
VN=$(cat version) || VN="$DEF_VER"
elif test -d ${GIT_DIR:-.git} -o -f .git &&
- VN=$(git describe --match "ndctl-[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
+ VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;
- ndctl-[0-9]*)
+ v[0-9]*)
VN="$(dirty $VN)"
esac; then
VN=$(echo "$VN" | sed -e 's/-/./g');
@@ -5,7 +5,7 @@ Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
License: GPLv2
Group: System Environment/Base
Url: https://github.com/pmem/ndctl
-Source0: https://github.com/pmem/ndctl/archive/ndctl-%{version}.tar.gz
+Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: asciidoc
The way to have github generate tarballs in ndctl-$VERSION format while maintaining a v$VERSION tag scheme is to use a source url in the following format: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- git-version | 10 +++++----- ndctl.spec.in | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)