1
arch_binaries := $(arch_binaries) gdc
3
ifeq ($(with_libphobos),yes)
4
arch_binaries += libphobos-dev
7
p_gdc = gdc$(pkg_ver)$(cross_bin_arch)
8
p_libphobos = libphobos$(pkg_ver)-dev
10
d_gdc = debian/$(p_gdc)
11
d_libphobos = debian/$(p_libphobos)
13
gdc_include_dir := $(PF)/include/d
17
$(PF)/share/man/man1 \
19
ifneq ($(DEB_CROSS),yes)
21
$(gdc_include_dir)/$(BASE_VERSION)
25
$(PF)/bin/$(cmd_prefix)gdc$(pkg_ver) \
27
ifneq ($(GFDL_INVARIANT_FREE),yes-now-pure-gfdl)
29
$(PF)/share/man/man1/$(cmd_prefix)gdc$(pkg_ver).1
35
$(gdc_include_dir)/$(BASE_VERSION) \
39
$(PF)/$(libdir)/libgphobos2.a \
40
$(gdc_include_dir)/$(BASE_VERSION)
43
$(binary_stamp)-gdc: $(install_stamp)
46
mv $(install_stamp) $(install_stamp)-tmp
49
dh_installdirs -p$(p_gdc) $(dirs_gdc)
51
dh_installdocs -p$(p_gdc) src/gcc/d/README
52
dh_installchangelogs -p$(p_gdc) src/gcc/d/ChangeLog
54
DH_COMPAT=2 dh_movefiles -p$(p_gdc) -X/zlib/ $(files_gdc)
56
ifneq ($(DEB_CROSS),yes)
57
ln -sf gdc$(pkg_ver) \
58
$(d_gdc)/$(PF)/bin/$(DEB_TARGET_GNU_TYPE)-gdc$(pkg_ver)
59
ln -sf gdc$(pkg_ver) \
60
$(d_gdc)/$(PF)/bin/$(TARGET_ALIAS)-gdc$(pkg_ver)
61
ifneq ($(GFDL_INVARIANT_FREE),yes-now-pure-gfdl)
62
ln -sf gdc$(pkg_ver).1 \
63
$(d_gdc)/$(PF)/share/man/man1/$(DEB_TARGET_GNU_TYPE)-gdc$(pkg_ver).1
64
ln -sf gdc$(pkg_ver).1 \
65
$(d_gdc)/$(PF)/share/man/man1/$(TARGET_ALIAS)-gdc$(pkg_ver).1
69
# FIXME: object.di needs to go into a libgdc-dev Multi-Arch: same package
70
ifneq ($(DEB_CROSS),yes)
71
# Always needed by gdc.
72
cp $(srcdir)/libphobos/libdruntime/object.di \
73
$(d_gdc)/$(gdc_include_dir)/$(BASE_VERSION)/.
75
/$(gdc_include_dir)/$(BASE_VERSION) \
76
/$(gdc_include_dir)/$(GCC_VERSION)
80
/$(docdir)/$(p_gcc)/README.Bugs \
81
/$(docdir)/$(p_gdc)/README.Bugs
84
dh_compress -p$(p_gdc)
85
dh_fixperms -p$(p_gdc)
86
dh_shlibdeps -p$(p_gdc)
87
dh_gencontrol -p$(p_gdc) -- -v$(DEB_GDC_VERSION) $(common_substvars)
88
dh_installdeb -p$(p_gdc)
90
dh_builddeb -p$(p_gdc)
92
find $(d_gdc) -type d -empty -delete
94
trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
96
$(binary_stamp)-libphobos: $(install_stamp)
99
mv $(install_stamp) $(install_stamp)-tmp
101
rm -rf $(d_libphobos)
102
dh_installdirs -p$(p_libphobos) $(dirs_libphobos)
104
DH_COMPAT=2 dh_movefiles -p$(p_libphobos) $(files_libphobos)
106
# better to have it there, avoid conflicts
107
mv $(d_libphobos)/$(PF)/$(libdir)/libgphobos2.a \
108
$(d_libphobos)/$(gcc_lib_dir)
110
# included in gdc package
111
rm -f $(d_libphobos)/$(gdc_include_dir)/$(BASE_VERSION)/object.di
113
ifeq ($(with_separate_gdc),yes)
114
debian/dh_doclink -p$(p_libphobos) $(p_gdc)
116
debian/dh_doclink -p$(p_libphobos) $(p_base)
119
dh_strip -p$(p_libphobos)
120
dh_compress -p$(p_libphobos)
121
dh_fixperms -p$(p_libphobos)
122
dh_shlibdeps -p$(p_libphobos)
123
dh_gencontrol -p$(p_libphobos) -- -v$(DEB_GDC_VERSION) $(common_substvars)
124
dh_installdeb -p$(p_libphobos)
125
dh_md5sums -p$(p_libphobos)
126
dh_builddeb -p$(p_libphobos)
128
find $(d_libphobos) -type d -empty -delete
130
trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
132
define __do_libphobos_dev
135
mv $(install_stamp) $(install_stamp)-tmp
138
dh_installdirs -p$(p_l) \
140
DH_COMPAT=2 dh_movefiles -p$(p_l) \
143
: # better to have it there, avoid conflicts
144
mv $(d_l)/$(PF)/$(libdir)/libgphobos2.a \
145
$(d_l)/$(gcc_lib_dir)
147
: # included in gdc package
148
rm -f $(d_l)/$(gdc_include_dir)/$(BASE_VERSION)/object.di
150
debian/dh_doclink -p$(p_l) \
151
$(if $(filter yes,$(with_separate_gdc)),$(p_gdc),$(p_base))
155
$(cross_gencontrol) dh_gencontrol -p$(p_l) \
156
-- -v$(DEB_VERSION) $(common_substvars)
157
$(call cross_mangle_control,$(p_l))
158
dh_installdeb -p$(p_l)
162
trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
165
# don't put this as a comment within define/endef
166
# $(call install_gcc_lib,libphobos,$(PHOBOS_SONAME),$(2),$(p_l))
168
do_libphobos_dev = $(call __do_libphobos_dev,lib$(1)phobos-$(BASE_VERSION)-dev,$(1))
170
$(binary_stamp)-libphobos-dev: $(install_stamp)
171
$(call do_libphobos_dev,)