File: rules

package info (click to toggle)
highwayhash 0~git20200803.9490b14-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 904 kB
  • sloc: cpp: 7,804; ansic: 326; java: 271; makefile: 140; sh: 16
file content (40 lines) | stat: -rwxr-xr-x 1,222 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
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DESTDIR=/usr
export LIBDIR=$(DESTDIR)/lib/$(DEB_HOST_MULTIARCH)/
export INCDIR=$(DESTDIR)/include/
TESTBINS = highwayhash_test nanobenchmark_example profiler_example sip_hash_test vector_test

ifneq (,$(filter $(DEB_BUILD_ARCH),arm64))
export HH_AARCH64=1
endif
ifneq (,$(filter $(DEB_BUILD_ARCH),ppc64el))
export HH_POWER=1
endif

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	-$(RM) deps.mk

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test
	for ITEM in $(TESTBINS); do \
		./bin/$$ITEM; \
	done
endif

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/libhighwayhash0/usr/lib/$(DEB_HOST_MULTIARCH)
	rename 's/.so/.so.0/' debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.so
	install -m0755 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.so.0 \
		debian/libhighwayhash0/usr/lib/$(DEB_HOST_MULTIARCH)/
	mkdir -p debian/libhighwayhash-dev/usr/lib/$(DEB_HOST_MULTIARCH)
	install -m0755 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.a \
		debian/libhighwayhash-dev/usr/lib/$(DEB_HOST_MULTIARCH)/
	set -e; cd debian/libhighwayhash-dev/usr/lib/$(DEB_HOST_MULTIARCH)/; \
		ln -s libhighwayhash.so.0 libhighwayhash.so