summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Sallings <dustin@spy.net>2009-08-23 01:01:50 -0700
committerdormando <dormando@rydia.net>2009-08-29 15:34:00 -0700
commit4f5679356a2f98ffeb905840f28b2bc5a1498293 (patch)
tree3d5c5c31c55c04ac5d0b56b37550595ad5715fe9
parent483e82adc89c984cbe040857d9cf43fc725883cd (diff)
downloadmemcached-4f5679356a2f98ffeb905840f28b2bc5a1498293.tar.gz
Generate the memcached.spec along with the version number.
-rw-r--r--.gitignore1
-rw-r--r--memcached.spec.in (renamed from memcached.spec)5
-rwxr-xr-xversion.sh3
3 files changed, 7 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 38b61e9..1dbb041 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
index 481555e..4683527 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 <dustin@spy.net> - 1.4.1-1
+- Autogenerate the version number from tags.
+
* Wed Jul 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-5
- Use /var/run/memcached/ directory to hold PID file
diff --git a/version.sh b/version.sh
index 5fc7418..a286017 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