File: rules

package info (click to toggle)
libjpeg-turbo 1:1.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 9,032 kB
  • ctags: 6,297
  • sloc: ansic: 43,492; asm: 25,683; sh: 5,436; java: 3,134; makefile: 802; xml: 24
file content (70 lines) | stat: -rwxr-xr-x 2,136 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
62
63
64
65
66
67
68
69
70
#!/usr/bin/make -f
# -*- makefile -*-

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

# To enable all, uncomment following line
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic -ffloat-store
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export DPKG_GENSYMBOLS_CHECK_LEVEL = 4

include /usr/share/dpkg/default.mk

CFLAGS ?= $(shell dpkg-buildflags --get CFLAGS)
CPPFLAGS ?= $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS ?= $(shell dpkg-buildflags --get LDFLAGS)
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -Wall
endif

ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CC = gcc
else
CC = $(DEB_HOST_GNU_TYPE)-gcc
endif

SIMD_BROKEN_ARCHS = x32

ifeq (,$(filter $(DEB_HOST_ARCH), $(SIMD_BROKEN_ARCHS)))
  DISABLE_SIMD=
else
  DISABLE_SIMD=--without-simd
endif

%:
	dh $@ --parallel --with autoreconf -O--dbgsym-migration='libjpeg-turbo-progs-dbg (<< 1.5.0-1~), libjpeg62-turbo-dbg (<< 1.5.0-1~), libturbojpeg0-dbg (<< 1.5.0-1~)'

override_dh_auto_configure:
	dh_auto_configure -- --with-build-date=$(DEB_VERSION) $(DISABLE_SIMD)

override_dh_auto_build:
	dh_auto_build -- V=1
	$(MAKE) -C debian/extra CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" V=1

override_dh_auto_clean:
	$(MAKE) -C debian/extra clean
	if [ -e Makefile ]; then $(MAKE) testclean; fi
	dh_auto_clean
	rm -f simd/jsimdcfg.inc

override_dh_auto_install:
	dh_auto_install
	# Install extra utilities
	$(MAKE) -C debian/extra install prefix=/usr DESTDIR=$(CURDIR)/debian/tmp
	# Install manual page for tjbench.1
	install -m 644 debian/tjbench.1 $(CURDIR)/debian/tmp/usr/share/man/man1/
	# Fix jconfig.h for MultiArch
	rm -f debian/tmp/usr/include/jconfig.h
	mkdir -p debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)
	sed -e "s/#\(undef\|define\) HAVE_\(LOCALE\|\(STD\(DEF\|LIB\)\)\)_H 1//g" \
		jconfig.h > debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/jconfig.h

override_dh_install:
	dh_install -X.la -X/usr/share/doc --fail-missing

override_dh_installchangelogs:
	dh_installchangelogs -plibjpeg62-turbo-dev change.log
	dh_installchangelogs -Nlibjpeg62-turbo-dev