index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2008-05-31 11:53:51 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-05-31 12:06:34 -0500 |
commit | 636610432a8dc633812d323d3e85b639aabb3302 (patch) | |
tree | f010af321584cb935a364678327a6948c49fa2b0 /src | |
parent | 54e1e3e642d834d8c676db7f74e95c6e24b19eab (diff) |
-rw-r--r-- | src/pacman/Makefile.am | 5 | ||||
-rw-r--r-- | src/pacman/pacman.c | 6 |
diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am index 5d6fef3c..e5f8cb36 100644 --- a/src/pacman/Makefile.am +++ b/src/pacman/Makefile.am @@ -21,6 +21,11 @@ INCLUDES = -I$(top_srcdir)/lib/libalpm AM_CFLAGS = -pedantic -D_GNU_SOURCE +if USE_GIT_VERSION +GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty +DEFS += -DGIT_VERSION=\"$(GIT_VERSION)\" +endif + pacman_SOURCES = \ conf.h conf.c \ deptest.c \ diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 66fafa10..0ce9c1e8 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -19,6 +19,12 @@ #include "config.h" +/* special handling of package version for GIT */ +#if defined(GIT_VERSION) +#undef PACKAGE_VERSION +#define PACKAGE_VERSION GIT_VERSION +#endif + #include <stdlib.h> /* atoi */ #include <stdio.h> #include <limits.h> |