Skip to content

Commit

Permalink
Generate the memcached.spec along with the version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin authored and dormando committed Aug 29, 2009
1 parent 483e82a commit 4f56793
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ doc/protocol-binary.txt
/testapp
/timedrun
/doc/doxy
/memcached.spec
5 changes: 4 additions & 1 deletion memcached.spec → memcached.spec.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: memcached
Version: 1.3.2
Version: @VERSION@
Release: 1%{?dist}
Summary: High Performance, Distributed Memory Object Cache

Expand Down Expand Up @@ -93,6 +93,9 @@ exit 0


%changelog
* Sat Aug 29 2009 Dustin Sallings <[email protected]> - 1.4.1-1
- Autogenerate the version number from tags.

* Wed Jul 4 2007 Paul Lindner <[email protected]> - 1.2.2-5
- Use /var/run/memcached/ directory to hold PID file

Expand Down
3 changes: 2 additions & 1 deletion version.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4f56793

Please sign in to comment.