deb building: make deb SNAPSHOT=1 adds a datestamp in the deb file name, patch from Mazen

git-svn-id: trunk@21185 -
This commit is contained in:
vincents 2009-08-12 08:29:34 +00:00
parent b1da3f1b5c
commit 3f954d651c
2 changed files with 10 additions and 0 deletions

View File

@ -3571,6 +3571,7 @@ ifneq ($(wildcard ${DEBDIR}/changelog),)
DEBPACKAGEVERSION:=$(shell head -n 1 ${DEBDIR}/changelog | awk '{ print $$2 }' | tr -d '[()]')
DEBVERSION:=$(shell echo $(DEBPACKAGEVERSION) | awk -F '-' '{ print $$1 }')
DEBSRCDIR:=$(BUILDDIR)/lazarus-$(DEBVERSION)
BUILDDATE=$(shell /bin/date --utc +%Y%m%d)
debcheck:
ifneq ($(DEBVERSION),$(PACKAGE_VERSION))
@$(ECHO) "Debian version ($(DEBVERSION)) is not correct, expect $(PACKAGE_VERSION)"
@ -3580,6 +3581,10 @@ debcopy: distclean
rm -rf ${BUILDDIR}
install -d $(DEBSRCDIR)
$(LINKTREE) ${DEBDIR} $(DEBSRCDIR)/debian
ifdef SNAPSHOT
sed s+${DEBPACKAGEVERSION}+${DEBPACKAGEVERSION}-${BUILDDATE}+ $(DEBSRCDIR)/debian/changelog > $(DEBSRCDIR)/debian/changelog.tmp
mv $(DEBSRCDIR)/debian/changelog.tmp $(DEBSRCDIR)/debian/changelog
endif
$(LINKTREE) Makefile.fpc $(DEBSRCDIR)
$(LINKTREE) COPYING.* $(DEBSRCDIR)
$(LINKTREE) README.txt $(DEBSRCDIR)

View File

@ -176,6 +176,7 @@ ifneq ($(wildcard ${DEBDIR}/changelog),)
DEBPACKAGEVERSION:=$(shell head -n 1 ${DEBDIR}/changelog | awk '{ print $$2 }' | tr -d '[()]')
DEBVERSION:=$(shell echo $(DEBPACKAGEVERSION) | awk -F '-' '{ print $$1 }')
DEBSRCDIR:=$(BUILDDIR)/lazarus-$(DEBVERSION)
BUILDDATE=$(shell /bin/date --utc +%Y%m%d)
debcheck:
ifneq ($(DEBVERSION),$(PACKAGE_VERSION))
@ -187,6 +188,10 @@ debcopy: distclean
rm -rf ${BUILDDIR}
install -d $(DEBSRCDIR)
$(LINKTREE) ${DEBDIR} $(DEBSRCDIR)/debian
ifdef SNAPSHOT
sed s+${DEBPACKAGEVERSION}+${DEBPACKAGEVERSION}-${BUILDDATE}+ $(DEBSRCDIR)/debian/changelog > $(DEBSRCDIR)/debian/changelog.tmp
mv $(DEBSRCDIR)/debian/changelog.tmp $(DEBSRCDIR)/debian/changelog
endif
$(LINKTREE) Makefile.fpc $(DEBSRCDIR)
$(LINKTREE) COPYING.* $(DEBSRCDIR)
$(LINKTREE) README.txt $(DEBSRCDIR)