File: rules

package info (click to toggle)
ponyprog 3.0.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,752 kB
  • sloc: cpp: 33,187; python: 981; sh: 507; makefile: 36
file content (61 lines) | stat: -rwxr-xr-x 1,982 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
61
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_HOST_ARCH_OS   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)

ICON_SIZES=128x128 64x64 48x48 32x32 24x24 16x16

# out of tree build folder for application
DEB_BUILD_DIR=debian/build
# default install folder
INSTDIR=$(CURDIR)/debian/tmp

DEB_PONYPROG_CMAKE_OPTS := \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$(LDFLAGS)" \
	-DUSE_DEBUGGER=ON \
	-DUSE_QT5=ON \
	$(NULL)

%:
	dh $@

override_dh_auto_clean:
	dh_clean
	rm -f SrcPony/version.h
	rm -rf debian/build

override_dh_auto_configure:
	mkdir -p $(DEB_BUILD_DIR)
	####################################
	# configuring PonyProg application #
	####################################
	dh_auto_configure --sourcedirectory=$(CURDIR) --builddirectory=$(DEB_BUILD_DIR) -- $(DEB_PONYPROG_CMAKE_OPTS)

override_dh_auto_build:
	dh_auto_build --sourcedirectory=$(CURDIR) --builddirectory=$(DEB_BUILD_DIR)

override_dh_auto_install:
	###################################
	# installing PonyProg application #
	###################################
	dh_auto_install --destdir=$(INSTDIR) --sourcedirectory=$(CURDIR) --builddirectory=$(DEB_BUILD_DIR)
	# remove the shipped icon and create the needed graphic by ourself
	rm -f $(INSTDIR)/usr/share/icons/ponyprog.png
	for size in ${ICON_SIZES}; do \
		mkdir -p $(INSTDIR)/usr/share/icons/hicolor/"$${size}"; \
		convert +antialias -background transparent -resize "$${size}!" $(CURDIR)/icons/ponyprog.svg $(INSTDIR)/usr/share/icons/hicolor/"$${size}"/ponyprog.png; \
	done