Commits

Guido Draheim  committed 4cb8c79

add local hg revision

  • Participants
  • Parent commits 78c1b4c

Comments (0)

Files changed (2)

File src/GNUmakefile

 	test -d $(RPMROOT)/SPECS || mkdir $(RPMROOT)/SPECS
 	- test -d $(BUILDDIR)/$(PKG) && rm -rf $(BUILDDIR)/*
 	cp $(SPECNAME).spec $(RPMROOT)/SPECS/$(SPECNAME).spec
-	$(RPMBUILD) -ba $(SPECNAME).spec
+	revision=`hg summary| sed -e '/parent:/!d' -e 's/parent: *//' -e 's/:.*//'` \
+	; if [ -n "$$revision" ]; then set -x \
+	;   sed -i -e "s/revision 0/revision $$revision/"  $(RPMROOT)/SPECS/$(SPECNAME).spec \
+	; else echo "no revision found" \
+	; fi
+	$(RPMBUILD) -ba $(RPMROOT)/SPECS/$(SPECNAME).spec
 
 update:
 	@ version=`cat $(SPECNAME).spec | sed -e '/define _version/!d' -e 's/.*_version *//'` \

File src/trac-dvbcronrecording-plugin.spec

 %{?!revision: %define revision 0 }
 
 Name:           trac-dvbcronrecording-plugin
-Version:        %_version.0.%revision
+Version:        %_version.%revision
 Release:        1
 License:        BSD
 Group:          Development/Tools/Other