File: rules

package info (click to toggle)
fpga-icestorm 0~20250207git7fbf8c0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,440 kB
  • sloc: python: 28,401; cpp: 4,970; sh: 2,594; ansic: 1,206; makefile: 697; xml: 16
file content (48 lines) | stat: -rwxr-xr-x 1,328 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
40
41
42
43
44
45
46
47
48
#!/usr/bin/make -f
#export DH_VERBOSE = 1

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

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CHANGELOG_DATE ?= $(shell LC_ALL=C date -u -d @$(SOURCE_DATE_EPOCH) +"%d %B %Y")

export CHIPDB_SUBDIR=fpga-icestorm/chipdb

export deb_udevdir = $(shell pkg-config --variable=udevdir udev | sed s,^/,,)

%:
	dh $@ --with sphinxdoc

override_dh_auto_clean:
	dh_auto_clean
	$(RM) debian/man/*.1
	$(RM) -r icebox/__pycache__
	$(RM) -r docs/build
	for dir in examples/*/; do make -C $$dir clean; done

execute_after_dh_auto_build:
	make -C docs html

override_dh_auto_install:
	PREFIX=/usr dh_auto_install

override_dh_install:
	dh_install

        # Note: dh_install will install icebox source files twice, since we
        # can't tell it only to install non-overlapping files in the
        # install file, we fix this up here.
        #
        # Also, on arch:all builds only the chipdb package gets built so
        # the fpga-icestorm directory will be missing.
	if [ -d debian/fpga-icestorm ]; then \
		cd debian/fpga-icestorm/usr/share/fpga-icestorm/python/ && \
		find . -type f -print0 | xargs -0 -n1 -I{} rm ../../../bin/{}; \
	fi

override_dh_installman:
	cd debian/man ; CHANGELOG_DATE="$(CHANGELOG_DATE)" ./genmanpages.sh
	dh_installman