summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 52d341ba0e0a976c9cd5079235194b441efbdd89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
#
# debian/rules
# Part of Debian ‘bugs-everywhere’ package.
#
# Copyright © 2008–2011 Ben Finney <ben+debian@benfinney.id.au>
# This is free software; you may copy, modify, and/or distribute this work
# under the terms of the GNU General Public License, version 2 or later.
# No warranty expressed or implied.
# See the file ‘/usr/share/common-licenses/GPL-2’ for details.

%:
	dh $@ --with=python2

override_dh_auto_install:
	dh_auto_install -- LAYOUT=deb

override_dh_auto_test:


override_dh_installchangelogs:
	dh_installchangelogs -k NEWS

version=$(shell parsechangelog --format=rfc822 | grep Version: | cut -d' ' -f2- | cut -d- -f1)

.PHONY: new-version
new-version: libbe/_version.py


.PHONY: libbe/_version.py
libbe/_version.py:
	git log -1 --encoding=UTF-8 --date=short --pretty='format:# -*- coding: utf-8 -*-%n# Autogenerated by debian/rules libbe/_version.py"%nversion_info = {%n    "date":"%cd",%n    "revision":"%H",%n    "committer":"%cn"}%n' $(version) > $@
	git commit -m"generate new metadata file for version $(version)" -a


# Local Variables:
# mode: makefile
# coding: utf-8
# End:
# vim: filetype=make fileencoding=utf-8 :