File: rules

package info (click to toggle)
cod-tools 3.1.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 149,700 kB
  • sloc: perl: 56,946; sh: 32,158; ansic: 6,385; xml: 1,982; yacc: 1,117; makefile: 728; python: 166
file content (39 lines) | stat: -rwxr-xr-x 1,123 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
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/make -f
# -*- makefile -*-

export PYBUILD_NAME = pycodcif
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

PERL_VENDORARCH = $(shell perl -wle 'use Config; print $$Config{vendorarch}')

%:
	dh $@ --with python3 --no-parallel

override_dh_auto_install:
	dh_auto_install -- PREFIX=$(CURDIR)/debian/tmp/usr
	dh_auto_install -O--buildsystem=pybuild -- --dir src/components/pycodcif

override_dh_install-arch:
	for TPL in debian/templates/*; \
	do sed -e "s@##DEB_HOST_MULTIARCH##@$(DEB_HOST_MULTIARCH)@g" \
		$${TPL} > debian/$$(basename $${TPL}); \
	done
	mkdir --parents debian/tmp/${PERL_VENDORARCH}/COD/CIF/Parser
	mv debian/tmp/usr/lib/perl5/auto debian/tmp/${PERL_VENDORARCH}
	mv debian/tmp/usr/lib/perl5/COD/SPGLib.pm debian/tmp/${PERL_VENDORARCH}/COD
	mv debian/tmp/usr/lib/perl5/COD/CIF/Parser/Bison.pm debian/tmp/${PERL_VENDORARCH}/COD/CIF/Parser
	dh_install

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG

override_dh_auto_clean:
	dh_auto_clean
	rm -rf tmp-*

override_dh_clean:
	dh_clean
	for TPL in debian/templates/*; \
	do rm -f debian/$$(basename $${TPL}); \
	done
	rm -rf .pybuild