File: rules

package info (click to toggle)
python-unicodedata2 15.1.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 496 kB
  • sloc: ansic: 1,523; python: 1,237; makefile: 14
file content (23 lines) | stat: -rwxr-xr-x 832 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
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=unicodedata2

%:
	dh $@ --with python3 --buildsystem=pybuild

execute_before_dh_auto_build:
	# Generate unicode data headers
	mkdir -p data
	unicode_ver=`dpkg -s unicode-data | grep '^Version: ' | sed 's/^Version: \(.*\)-.*$$/\1/'`; \
	for i in `ls /usr/share/unicode/*.txt | xargs -n1 basename`; do \
		ln -s "/usr/share/unicode/$${i}" "data/$${i%.txt}-$${unicode_ver}.txt" ; \
	done
	bunzip2 -ckd /usr/share/unicode/Unihan_NumericValues.txt.bz2 > data/Unihan_NumericValues.txt
	python3 makeunicodedata.py
	rm -rf data

override_dh_gencontrol:
	dh_gencontrol -- -VBuilt-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W unicode-data)"