File: rules

package info (click to toggle)
darktable 3.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 30,936 kB
  • sloc: ansic: 276,408; cpp: 34,602; xml: 12,464; lisp: 9,585; sh: 3,434; javascript: 3,264; perl: 1,830; ruby: 975; python: 493; makefile: 294; awk: 110; asm: 46; sql: 38
file content (34 lines) | stat: -rwxr-xr-x 965 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

SOURCEPKG=$(shell dpkg-parsechangelog | sed  -n 's/^Source: \(.*\)/\1/p')
UPSTREAM=$(shell dpkg-parsechangelog |  sed -n 's/^Version: \(.*\)-[^-]*/\1/p')
SHA1=$(lastword $(subst ~g, ,$(UPSTREAM)))
ORIG=${SOURCEPKG}_${UPSTREAM}.orig.tar.gz

export CONFIG_SHELL=/bin/bash

ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
	export DEB_CFLAGS_MAINT_APPEND=-O0
	export DEB_CXXFLAGS_MAINT_APPEND=-O0
else
	export DEB_CFLAGS_MAINT_APPEND=-O3
	export DEB_CXXFLAGS_MAINT_APPEND=-O3
endif

%:
	dh $@

override_dh_auto_configure: cmake/version.cmake
	dh_auto_configure -- -DBINARY_PACKAGE_BUILD=1 -DCMAKE_BUILD_TYPE=Release -DRAWSPEED_ENABLE_LTO=ON

describe-current-version:
	git describe --tags upstream | sed 's,^release-,,;s,-,+,;s,-,~,;'

get-orig-source:
	git archive --format=tar $(SHA1) | gzip -9 > ../$(ORIG)

.PHONY: describe-current-version git-orig-source

cmake/version.cmake:
	echo "set(PROJECT_VERSION \"${UPSTREAM}\")" > $@