diff --git a/.gitignore b/.gitignore index 38b61e99d7..1dbb04138c 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ doc/protocol-binary.txt /testapp /timedrun /doc/doxy +/memcached.spec diff --git a/memcached.spec b/memcached.spec.in similarity index 95% rename from memcached.spec rename to memcached.spec.in index 481555e3fe..4683527aeb 100644 --- a/memcached.spec +++ b/memcached.spec.in @@ -1,5 +1,5 @@ Name: memcached -Version: 1.3.2 +Version: @VERSION@ Release: 1%{?dist} Summary: High Performance, Distributed Memory Object Cache @@ -93,6 +93,9 @@ exit 0 %changelog +* Sat Aug 29 2009 Dustin Sallings - 1.4.1-1 +- Autogenerate the version number from tags. + * Wed Jul 4 2007 Paul Lindner - 1.2.2-5 - Use /var/run/memcached/ directory to hold PID file diff --git a/version.sh b/version.sh index 5fc7418f90..a286017592 100755 --- a/version.sh +++ b/version.sh @@ -1,10 +1,11 @@ #!/bin/sh -if git describe > version.num.tmp +if git describe | sed s/-/_/g > version.num.tmp then mv version.num.tmp version.num echo "m4_define([VERSION_NUMBER], [`tr -d '\n' < version.num`])" \ > version.m4 + sed s/@VERSION@/`cat version.num`/ < memcached.spec.in > memcached.spec else rm version.num.tmp fi