File: rules

package info (click to toggle)
dh-ros 0.14.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 236 kB
  • sloc: python: 995; xml: 64; perl: 38; sh: 21; makefile: 19; cpp: 6
file content (28 lines) | stat: -rwxr-xr-x 871 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/pkg-info.mk

export PYBUILD_NAME = dhros
export PYBUILD_DESTDIR = debian/dh-ros
export PYBUILD_INSTALL_DIR = /usr/share/dh-ros

ifeq ($(shell grep '^version *= *$(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*$$//')$$' setup.cfg),)
$(error version in setup.py does not match the one in debian/changelog)
endif

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_install:
	find $(PYBUILD_DESTDIR) -name ".pytest_cache" -print0 | xargs -r0 rm -r
	mv $(PYBUILD_DESTDIR)/usr/bin/rosbuilder $(PYBUILD_DESTDIR)$(PYBUILD_INSTALL_DIR)

execute_after_dh_python3:
	# Once debhelper has collected the dependencies, we no longer need this
	rm -r $(PYBUILD_DESTDIR)$(PYBUILD_INSTALL_DIR)/*.dist-info

execute_before_dh_installman: rosbuilder.1

%.1: %.1.in
	sed -e 's/@VERSION@/$(DEB_VERSION_UPSTREAM)/g' $< >$@