File: rules

package info (click to toggle)
python3-stdlib-extensions 3.13.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 84 kB
  • sloc: makefile: 25
file content (33 lines) | stat: -rwxr-xr-x 1,081 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
#!/usr/bin/make -f

PYVERS = $(shell py3versions -vs)

MIN_VER = 3.13.2-1~
NEXT_VER = 3.14

SPACE := $(EMPTY) $(EMPTY)
COMMA := ,
# $(call _pyver,<prefix>,<versions>,<suffix>)
_pyver = $(subst $(SPACE),$(COMMA)$(SPACE),$(strip $(foreach v,$2,$1$(v)$3)))

%:
	dh $@

override_dh_auto_install:
	( \
	  echo 'python3:Depends=python3 (>= $(MIN_VER)), python3 (<< $(NEXT_VER))'; \
	  echo 'python3:Versions=$(call _pyver,,$(PYVERS),)'; \
	  echo 'python3:Provides=$(call _pyver,python,$(PYVERS),-gdbm)'; \
	  echo 'gdbm:Depends=$(call _pyver,python,$(PYVERS),-gdbm)'; \
	) >> debian/python3-gdbm.substvars
	( \
	  echo 'python3:Depends=python3 (>= $(MIN_VER)), python3 (<< $(NEXT_VER))'; \
	  echo 'python3:Versions=$(call _pyver,,$(PYVERS),)'; \
	  echo 'python3:Provides=$(call _pyver,python,$(PYVERS),-tk)'; \
	  echo 'tk:Depends=$(call _pyver,python,$(PYVERS),-tk)'; \
	) >> debian/python3-tk.substvars

override_dh_installdocs:
	dh_installdocs -p python3-gdbm-dbg --link-doc python3-gdbm
	dh_installdocs -p python3-tk-dbg --link-doc python3-tk
	dh_installdocs --remaining-packages