blob: 14f7723d0439aad65f170c43db07645648b05edf (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
#!/usr/bin/make -f
# debian/rules file for ACE+TAO Debian GNU/Linux packages
# written February 2002 by Ossama Othman <ossama@debian.org>
# Modified August 2003 by Brian Nelson <pyro@debian.org>
# Copyright (C) 2004 Raphael Bossek <bossekr@debian.org>
# Copyright © 2005-2012 Thomas Girard <thomas.g.girard@free.fr>
# Copyright © 2009-2014 Pau Garcia i Quiles <pgquiles@elpauer.org>
# Copyright © 2010-2014 Johnny Willemsen <jwillemsen@remedy.nl>
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_BUILD_MAINT_OPTIONS = hardening=+format,+fortify,+stackprotector,+relro,+bindnow
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
export DEB_CFLAGS_MAINT_APPEND = $(CPPFLAGS)
export DEB_CXXFLAGS_MAINT_APPEND = $(CPPFLAGS)
export DEB_CPPFLAGS_MAINT_APPEND = -g
MWCFLAGS := -type gnuace -noreldefs
DSO_MAKE_FLAG := versioned_so=2
INSTALL_FLAGS := DESTDIR=$(CURDIR)/debian/tmp INSTALL_PREFIX=/usr install_rpath=0 $(DSO_MAKE_FLAG)
MAN1 := debian/ace_netsvcs.1 \
debian/mpc-ace.1
# Where we install every file before calling dh_install
DT := debian/tmp
DOXYGEN_FILES_TO_REMOVE := -name '*.md5' -o \
-name '*.map' -o \
-name '*.tag'
# Package names, used when overriding dh_installchangelogs
ALL_PACKAGES := $(shell dh_listpackages)
ALL_ACEXML := $(filter libacexml%,$(ALL_PACKAGES))
export ACE_ROOT := $(shell pwd)
export MPC_ROOT := $(ACE_ROOT)/MPC
ACE_MAJOR_VERSION := $(shell awk '/ACE_MAJOR_VERSION/ { print $$3 }' ${ACE_ROOT}/ace/Version.h)
ACE_MINOR_VERSION := $(shell awk '/ACE_MINOR_VERSION/ { print $$3 }' ${ACE_ROOT}/ace/Version.h)
ACE_MICRO_VERSION := $(shell awk '/ACE_MICRO_VERSION/ { print $$3 }' ${ACE_ROOT}/ace/Version.h)
ACE_VERSION = ${ACE_MAJOR_VERSION}.${ACE_MINOR_VERSION}.${ACE_MICRO_VERSION}
%:
dh $@
# Implement our own configure machinery; it will copy Debian specific
# configuration before launching MPC to generate ACE+TAO GNUmakefile
.PHONY: configure
configure: configure-stamp
configure-stamp:
for fname in debian/*VERSION*; do \
cp $$fname $$(echo $$fname | \
sed -e 's/VERSION/${ACE_VERSION}/'); done
for flname in debian/*.install.in; do \
sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
$$flname > $${flname%.in}; done
for flname in debian/*.lintian-overrides.in; do \
sed 's/@ACE_VERSION@/${ACE_VERSION}/g' \
$$flname > $${flname%.in}; done
cp debian/platform_macros.GNU $(ACE_ROOT)/include/makeinclude
cp debian/config.h $(ACE_ROOT)/ace/
cp debian/default.features $(ACE_ROOT)/bin/MakeProjectCreator/config
cp debian/ACE-DPKG.mwc $(ACE_ROOT)
cd $(ACE_ROOT) && $(ACE_ROOT)/bin/mwc.pl $(MWCFLAGS) ACE-DPKG.mwc
touch $@
override_dh_auto_build-arch: configure-stamp
$(MAKE) -C $(ACE_ROOT) $(DSO_MAKE_FLAG)
override_dh_auto_build-indep: configure-stamp
$(MAKE) -C $(ACE_ROOT) $(DSO_MAKE_FLAG)
cd $(ACE_ROOT) && bin/generate_doxygen.pl -is_release -exclude_tao
find $(ACE_ROOT)/html $(DOXYGEN_FILES_TO_REMOVE) | xargs -r rm -f
override_dh_auto_install: manpages-stamp
$(MAKE) -C $(ACE_ROOT) install $(INSTALL_FLAGS)
mkdir -p $(DT)/usr/share/man/man1
cp $(ACE_ROOT)/apps/gperf/ace_gperf.1 $(DT)/usr/share/man/man1
# Relocate .idl and .pidl files
cd $(DT) && for f in $$(find usr/include -name '*.idl' -o -name '*.pidl') ; do \
g=$$(echo $${f%%include*}share/idl/$${f##*usr/include/}) ; \
mkdir -p $$(dirname $$g) ; \
mv $$f $$g ; \
done
override_dh_auto_clean:
[ -f $(ACE_ROOT)/GNUmakefile ] && $(MAKE) -C $(ACE_ROOT) realclean $(DSO_MAKE_FLAG) || true
find $(ACE_ROOT) -name 'GNUmakefile*' -o -name '.depend.*' | xargs -r rm
rm -f $(ACE_ROOT)/include/makeinclude/platform_macros.GNU
rm -f $(ACE_ROOT)/bin/MakeProjectCreator/config/default.features
rm -f $(ACE_ROOT)/ace/config.h
rm -f $(ACE_ROOT)/ACE-DPKG.mwc
rm -f debian/*.1 debian/mpc-ace.sgml
rm -f *-stamp
rm -Rf $(ACE_ROOT)/html/libace-doc \
$(ACE_ROOT)/html/libacexml-doc \
$(ACE_ROOT)/doxygen_sqlite3.db
override_dh_compress:
dh_compress -Xexamples
# ACE+TAO has different changelogs. Use the right one in every package.
override_dh_installchangelogs:
dh_installchangelogs -pmpc-ace MPC/ChangeLog
dh_installchangelogs --remaining-packages \
ChangeLogs/ACE-$(ACE_MAJOR_VERSION)_$(ACE_MINOR_VERSION)_$(ACE_MICRO_VERSION)
override_dh_fixperms:
ifneq (,$(filter libace-doc, $(shell dh_listpackages)))
find debian -name '*.pl' | xargs -r sed -i -e '1i#!/usr/bin/perl'
endif
dh_fixperms
debian/mpc-ace.sgml: MPC/docs/MPC.sgml
sed -e 's/mpc\.pl/mpc-ace/g' -e 's/mwc\.pl/mwc-ace/g' $< > $@
debian/%.1: debian/%.sgml
docbook-to-man $< > $@
.PHONY: manpages
manpages: manpages-stamp
manpages-stamp: $(MAN1)
touch $@
|