File: rules

package info (click to toggle)
bernhard 0.2.6-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 172 kB
  • sloc: python: 251; makefile: 10
file content (15 lines) | stat: -rwxr-xr-x 595 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /usr/bin/make -f

export PYBUILD_NAME=bernhard

%:
	dh $@ --buildsystem=pybuild

execute_before_dh_auto_build:
	protoc -I=debian --python_out=bernhard debian/riemann.proto
	mv bernhard/riemann_pb2.py bernhard/pb.py

execute_before_dh_gencontrol:
	pbvercur=`dpkg -l python3-protobuf | grep 'ii' | sed -e 's/^.*python3-protobuf[[:space:]]\+\([0-9.]\+\)-[0-9].*/\1/' | cut -d '.' -f 1,2` ; \
	pbvernext=`echo $$pbvercur | awk -F '[.]' '{printf "%d.%d\n", $$1, $$2 + 1}'` ; \
	sed -i "s/python3-protobuf/python3-protobuf (>= $${pbvercur}), python3-protobuf (<< $${pbvernext})/" debian/*substvars