File: rules

package info (click to toggle)
libocas 0.97%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,756 kB
  • ctags: 352
  • sloc: ansic: 7,956; makefile: 118; sh: 7
file content (55 lines) | stat: -rwxr-xr-x 1,378 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
#!/usr/bin/make -f
# -*- makefile -*-

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

# Get version information
PKGDIR := $(dir $(firstword $(MAKEFILE_LIST)))..
DEBVER := $(shell dpkg-parsechangelog -l$(PKGDIR)/debian/changelog -S Version)
UPVER := $(shell echo $(DEBVER) | sed -re 's/\+dfsg-.*//')
LVER = $(shell echo $(UPVER) | sed -nre 's/([0-9]+)\..*/\1/p')
LSUBVER = $(shell echo $(UPVER) | sed -nre 's/[0-9]\.([0-9]+).*/\1/p')
# Version information is needed by the build process
export LVER
export LSUBVER

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
    DEB_CFLAGS_MAINT_APPEND += -O0
else
    DEB_CFLAGS_MAINT_APPEND += -O3
ifeq (amd64,$(DEB_HOST_ARCH))
    DEB_CFLAGS_MAINT_APPEND += -msse
endif
endif

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)


%:
	dh $@


override_dh_auto_install:
	dh_auto_install -- libdir=/usr/lib/$(DEB_HOST_MULTIARCH)/


override_dh_strip:
	dh_strip --dbgsym-migration='libocas-dbg (<< $(DEBVER)~)'


# Remove upstream's non-DFSG-compliant files
get-orig-source:
	uscan \
		--noconf \
		--download-version $(UPVER) \
		--force-download \
		--check-dirname-level=0 \
		--destdir=$(CURDIR) \
		--rename \
		--repack \
		--compression xz \
		--copyright-file=$(PKGDIR)/debian/files-excluded \
		$(PKGDIR)