File: rules

package info (click to toggle)
klayout 0.26.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 146,224 kB
  • sloc: cpp: 1,465,078; ruby: 35,220; xml: 19,003; python: 8,881; sh: 1,393; tcl: 210; perl: 107; makefile: 90; ansic: 42
file content (60 lines) | stat: -rwxr-xr-x 2,395 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
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#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

MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  EXTRA_MAKE_OPTIONS = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

CXXFLAGS := $(filter-out -Werror=format-security, $(CXXFLAGS))
CFLAGS := $(filter-out -Werror=format-security, $(CFLAGS))

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

%:
	dh $@


override_dh_auto_configure:

override_dh_auto_build:

override_dh_auto_install:
	mkdir -p debian/klayout/usr/lib/klayout
	CC=$(CC) CXX=$(CXX) OBJCOPY=objcopy AR=$(AR) CXXFLAGS="$(CXXFLAGS)" CFLAGS="$(CFLAGS)" ./build.sh -qt5 -option $(EXTRA_MAKE_OPTIONS) -expert -qmake /usr/lib/$(MULTIARCH)/qt5/bin/qmake -bin $(CURDIR)/debian/klayout/usr/lib/klayout
	mkdir -p debian/klayout/usr/bin
	echo "#!/bin/sh\nLD_LIBRARY_PATH=/usr/lib/klayout exec /usr/lib/klayout/klayout \"\$$@\"" > debian/klayout/usr/bin/klayout
	chmod +x debian/klayout/usr/bin/klayout
	chmod -x debian/klayout/usr/lib/klayout/pymod/klayout/db/__init__.py
	chmod -x debian/klayout/usr/lib/klayout/pymod/klayout/db/pcell_declaration_helper.py
	chmod -x debian/klayout/usr/lib/klayout/pymod/klayout/__init__.py
	chmod -x debian/klayout/usr/lib/klayout/pymod/klayout/rdb/__init__.py
	chmod -x debian/klayout/usr/lib/klayout/pymod/klayout/tl/__init__.py
	chmod -x debian/klayout/usr/lib/klayout/pymod/pya/__init__.py
	find debian/klayout/usr/lib/klayout -mindepth 1 -type f -name "*.so*" -exec chmod -x {} \;
	find debian/klayout/usr/lib/klayout -maxdepth 1 -type f -exec chrpath --delete {} \;
	find debian/klayout/usr/lib/klayout -mindepth 2 -type f -name "*.so*" -exec chrpath --delete {} \;
	mkdir -p debian/klayout/usr/share/pixmaps
	cp etc/logo.png debian/klayout/usr/share/pixmaps/klayout.png

override_dh_auto_clean:
	dh_auto_clean
	$(RM) -r build-release

override_dh_auto_test:

override_dh_shlibdeps:
	dh_shlibdeps -l"$(CURDIR)/debian/klayout/usr/lib/klayout:$(CURDIR)/debian/klayout/usr/lib/klayout/lay_plugins:$(CURDIR)/debian/klayout/usr/lib/klayout/db_plugins"

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