Commits

Yuya Nishihara committed e514875

debian: generate changelog by make

  • Participants
  • Parent commits 16d64f9

Comments (0)

Files changed (1)

 HGEXTDIR = $(PREFIX)/share/chg/hgext
 HGSERVEFLAGS = --cwd / --debug
 
+DEBCHANGE = debchange
+DEBUILD = debuild
 HG = hg
 PYTHON = python
 
 	@echo '  install      - install program to $(PREFIX)'
 	@echo '  tests        - run Mercurial test suite with cHg (needs HGROOT)'
 	@echo '  run-server   - run command server in foreground (for debug)'
+	@echo '  deb          - build debian package'
 	@echo '  clean        - remove intermediate files'
 
 .PHONY: install
 		--config extensions.chgsupport="$(PWD)/hgext/chgsupport.py" \
 		--config color.mode=chgauto $(HGSERVEFLAGS)
 
+.PHONY: deb
+deb: debian/changelog
+	$(DEBUILD)
+
+debian/changelog: .hg/dirstate .hg/store/00changelog.i
+	$(RM) $@
+	$(DEBCHANGE) --create --package mercurial-chg \
+		-v "0.0.`date +%Y%m%d`hg`$(HG) id -i`" \
+		'Nightly build.'
+	$(DEBCHANGE) --release ''
+
 .PHONY: clean
 clean:
 	$(RM) hgext/*.pyc