diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-07-09 16:46:23 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-10-01 05:31:39 +0200 |
commit | beeb92cf3306a84f65ac62a6ca49424c62a6412d (patch) | |
tree | f7ee90edf6d74cbecc8a40387d5d5f617a678a64 | |
parent | 575c9c458264ca4e507a6a08eb104de5d1255556 (diff) | |
download | mkinitcpio-beeb92cf3306a84f65ac62a6ca49424c62a6412d.tar.gz mkinitcpio-beeb92cf3306a84f65ac62a6ca49424c62a6412d.tar.xz |
harden version generation
If you run make dist, extract that tarball somewhere else and try to run
makepkg it will fail because it can't find the git tree anymore.
[Dave: removed --dirty flag, as this breaks makepkg]
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | PKGBUILD | 4 |
2 files changed, 6 insertions, 5 deletions
@@ -1,6 +1,6 @@ # Makefile for mkinitcpio -VERSION = $(shell if test -f VERSION; then cat VERSION; else git describe; fi) +VERSION = $(shell if test -f VERSION; then cat VERSION; else git describe | sed 's/-/./g'; fi) DIRS = \ /bin \ @@ -68,4 +68,7 @@ dist: clean doc ${RM} -r mkinitcpio-${VERSION} gzip -9 mkinitcpio-${VERSION}.tar -.PHONY: clean dist install tarball +version: + @echo ${VERSION} + +.PHONY: clean dist install tarball version @@ -1,7 +1,5 @@ -IFS='-' read -r major minor _ < <(git describe) - pkgname=mkinitcpio-git -pkgver=$major.$minor +pkgver=$(make version) pkgrel=1 pkgdesc="Modular initramfs image creation utility" arch=(any) |