File: rules

package info (click to toggle)
git-annex 8.20210223-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 68,764 kB
  • sloc: haskell: 70,359; javascript: 9,103; sh: 1,304; makefile: 212; perl: 136; ansic: 44
file content (58 lines) | stat: -rwxr-xr-x 1,789 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
#!/usr/bin/make -f

export BUILDER=./Setup

# -j1 is used for reproducible build
export BUILDEROPTIONS=-j1

# Reduce optimisation on armhf and armel to avoid running out of
# memory.  Passing -O1 to ghc causes it to pass -O2 to llc.  We can't
# simply use ghc's -optlc to pass -O2 to llc, because when we don't
# pass -O1 to ghc, it will pass an -O3 to llc, overriding our -optlc
# attempt.  See definition of runPhase in
# compiler/main/DriverPipeline.hs in ghc source
DEB_HOST_ARCH?=$(shell dpkg-architecture -qDEB_HOST_ARCH)
ifneq (,$(filter armel,$(DEB_HOST_ARCH)))
export BUILDEROPTIONS:=$(BUILDEROPTIONS) --ghc-option=-O1
endif
ifneq (,$(filter armhf,$(DEB_HOST_ARCH)))
export BUILDEROPTIONS:=$(BUILDEROPTIONS) --ghc-option=-O1
endif

STANDALONE_BUILD=$(shell grep -qe '^Package: git-annex-standalone' debian/control \
                         && echo 1 || echo 0)

# Do use the changelog's version number, rather than making one up.
export RELEASE_BUILD=1

export ZSH_COMPLETIONS_PATH=/usr/share/zsh/vendor-completions

%:
	dh $@


# Standalone build logic/helpers
ifeq ($(STANDALONE_BUILD),1)

override_dh_auto_build:
	make linuxstandalone GIT_ANNEX_PACKAGE_INSTALL=1

override_dh_auto_install:
	make install-desktop install-docs install-completions \
		DESTDIR=debian/git-annex-standalone
	# bins are linked into place, as instructed in debian/install and debian/links

override_dh_fixperms:
	dh_fixperms -Xld-linux

# gdb can't do much with a haskell program, so avoid the debug package
override_dh_strip:
	dh_strip --no-ddebs

# Do not add "ldconfig" trigger since all libraries in the standalone build
# are private copies and the trigger activate-noawait trigger may not work
# on elderly distributions (e.g. squeeze)
override_dh_makeshlibs:
	dh_makeshlibs --noscripts

endif