mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-07-27 14:21:48 +00:00
build: fix spec file and srpm/rpm generation
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com> Reviewed-by: Steven Dake <sdake@redhat.com>
This commit is contained in:
parent
b2400314b2
commit
c835c88f73
25
Makefile.am
25
Makefile.am
@ -114,13 +114,24 @@ $(SPEC): $(SPEC).in
|
||||
git update-index --refresh > /dev/null 2>&1 || true && \
|
||||
dirty=`git diff-index --name-only HEAD 2>/dev/null` && \
|
||||
if [ -n "$$dirty" ]; then dirty="dirty"; else dirty=""; fi && \
|
||||
sed \
|
||||
-e "s#@version@#$$rpmver#g" \
|
||||
-e "s#@alphatag@#$$alphatag#g" \
|
||||
-e "s#@numcomm@#$$numcomm#g" \
|
||||
-e "s#@dirty@#$$dirty#g" \
|
||||
-e "s#@date@#$$date#g" \
|
||||
$< > $@-t
|
||||
if [ "$$numcomm" = "0" ]; then \
|
||||
sed \
|
||||
-e "s#@version@#$$rpmver#g" \
|
||||
-e "s#%glo.*alpha.*##g" \
|
||||
-e "s#%glo.*numcomm.*##g" \
|
||||
-e "s#@dirty@#$$dirty#g" \
|
||||
-e "s#@date@#$$date#g" \
|
||||
$< > $@-t; \
|
||||
else \
|
||||
sed \
|
||||
-e "s#@version@#$$rpmver#g" \
|
||||
-e "s#@alphatag@#$$alphatag#g" \
|
||||
-e "s#@numcomm@#$$numcomm#g" \
|
||||
-e "s#@dirty@#$$dirty#g" \
|
||||
-e "s#@date@#$$date#g" \
|
||||
$< > $@-t; \
|
||||
fi; \
|
||||
if [ -z "$$dirty" ]; then sed -i -e "s#%glo.*dirty.*##g" $@-t; fi
|
||||
chmod a-w $@-t
|
||||
mv $@-t $@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user