summaryrefslogtreecommitdiff
path: root/debian/rules.d/binary-base.mk
blob: 88428345e856a4e53e1b40632494c09eb1a17f52 (plain)
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
$(lib_binaries) += base

# ---------------------------------------------------------------------------
# gcc-base

ifneq (,$(filter $(distrelease),oneiric precise wheezy sid))
  additional_links =
else ifneq (,$(filter $(distrelease),))
  additional_links =
else
  additional_links =
endif

$(binary_stamp)-base: $(install_dependencies)
	dh_testdir
	dh_testroot
	rm -rf $(d_base)
	dh_installdirs -p$(p_base) \
		$(gcc_lexec_dir)

ifneq ($(DEB_STAGE),rtlibs)
	ln -sf $(BASE_VERSION) \
	    $(d_base)/$(subst /$(BASE_VERSION),/$(GCC_VERSION),$(gcc_lib_dir))
	for link in $(additional_links); do \
	  ln -sf $(BASE_VERSION) \
	    $(d_base)/$$(dirname $(gcc_lib_dir))/$$link; \
        done
  ifneq ($(gcc_lib_dir),$(gcc_lexec_dir))
	ln -sf $(BASE_VERSION) \
	    $(d_base)/$(subst /$(BASE_VERSION),/$(GCC_VERSION),$(gcc_lexec_dir))
	for link in $(additional_links); do \
	  ln -sf $(BASE_VERSION) \
	    $(d_base)/$$(dirname $(gcc_lexec_dir))/$$link; \
        done
  endif
endif

ifeq ($(with_base_only),yes)
	dh_installdocs -p$(p_base) debian/README.Debian
else
	dh_installdocs -p$(p_base) debian/README.Debian.$(DEB_TARGET_ARCH)
endif
	rm -f $(d_base)/usr/share/doc/$(p_base)/README.Debian
	dh_installchangelogs -p$(p_base)
	dh_compress -p$(p_base)
	dh_fixperms -p$(p_base)
ifeq ($(DEB_STAGE)-$(DEB_CROSS),rtlibs-yes)
	$(cross_gencontrol) dh_gencontrol -p$(p_base) -- -v$(DEB_VERSION) $(common_substvars)
else
	dh_gencontrol -p$(p_base) -- -v$(DEB_VERSION) $(common_substvars)
endif
	dh_installdeb -p$(p_base)
	dh_md5sums -p$(p_base)
	dh_builddeb -p$(p_base)
	touch $@