104 | 104 |
# Some convenience variables
|
105 | 105 |
export TMPBUILD_MIT := $(CURDIR)/build-mit
|
106 | 106 |
export TMPBUILD_HEIMDAL := $(CURDIR)/build-heimdal
|
|
107 |
export TMP_MIT := $(CURDIR)/debian/tmp
|
|
108 |
export TMP_HEIMDAL := $(CURDIR)/debian/tmp-heimdal
|
107 | 109 |
export MIT_LDFLAGS := $(shell krb5-config.mit --libs gssapi | sed -e 's/ -l.*//')
|
108 | 110 |
export MIT_CPPFLAGS := $(shell krb5-config.mit --cflags gssapi)
|
109 | 111 |
export HEIMDAL_LDFLAGS := $(shell krb5-config.heimdal --libs gssapi | sed -e 's/ -l.*//')
|
|
111 | 113 |
|
112 | 114 |
AUTOFILES=acinclude.m4 aclocal.m4 config/config.sub config/config.guess \
|
113 | 115 |
config/ltmain.sh config/libtool.m4
|
114 | |
|
115 | |
TMPBUILD=$(CURDIR)/build
|
116 | 116 |
|
117 | 117 |
### The Makefile targets begin. ###
|
118 | 118 |
|
|
174 | 174 |
/usr/bin/pod2man --stderr debian/gen-auth/gen-auth >gen-auth.1
|
175 | 175 |
|
176 | 176 |
override_dh_auto_install:
|
177 | |
dh_auto_install -B$(TMPBUILD_HEIMDAL) -- sasldir=/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2
|
178 | |
dh_install -plibsasl2-modules-gssapi-heimdal
|
179 | |
dh_auto_install -B$(TMPBUILD_MIT) -- sasldir=/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2
|
|
177 |
dh_auto_install -B$(TMPBUILD_HEIMDAL) --destdir=$(TMP_HEIMDAL) -- sasldir=/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2
|
|
178 |
dh_auto_install -B$(TMPBUILD_MIT) --destdir=$(TMP_MIT) -- sasldir=/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2
|
180 | 179 |
|
181 | 180 |
# Remove static plugins - they are useless
|
182 | |
rm debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2/*.a
|
|
181 |
rm $(TMP_MIT)/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2/*.a
|
183 | 182 |
# Remove libtool la files, they are eeevil
|
184 | |
rm debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.la \
|
185 | |
debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2/*.la
|
|
183 |
rm $(TMP_MIT)/usr/lib/$(DEB_HOST_MULTIARCH)/*.la \
|
|
184 |
$(TMP_MIT)/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2/*.la
|
186 | 185 |
|
187 | 186 |
# Note the version of Berkeley DB used to build this package
|
188 | |
mkdir -p debian/tmp/usr/lib/sasl2
|
189 | |
echo $(BDB_VERSION) > debian/tmp/usr/lib/sasl2/berkeley_db.txt
|
|
187 |
mkdir -p $(TMP_MIT)/usr/lib/sasl2
|
|
188 |
echo $(BDB_VERSION) > $(TMP_MIT)/usr/lib/sasl2/berkeley_db.txt
|
190 | 189 |
|
191 | 190 |
# Alter the default location and names of files to fit Debian
|
192 | 191 |
# policy and better integrate with the Debian system.
|
193 | |
mv debian/tmp/usr/sbin/pluginviewer debian/tmp/usr/sbin/saslpluginviewer
|
194 | |
mv debian/tmp/usr/share/man/man8/pluginviewer.8 \
|
195 | |
debian/tmp/usr/share/man/man8/saslpluginviewer.8
|
|
192 |
mv $(TMP_MIT)/usr/sbin/pluginviewer $(TMP_MIT)/usr/sbin/saslpluginviewer
|
|
193 |
mv $(TMP_MIT)/usr/share/man/man8/pluginviewer.8 \
|
|
194 |
$(TMP_MIT)/usr/share/man/man8/saslpluginviewer.8
|
196 | 195 |
install -m 644 saslauthd/saslauthd.mdoc \
|
197 | |
debian/tmp/usr/share/man/man8/saslauthd.8
|
|
196 |
$(TMP_MIT)/usr/share/man/man8/saslauthd.8
|
198 | 197 |
install -m 644 $(CURDIR)/debian/testsaslauthd.8 \
|
199 | |
debian/tmp/usr/share/man/man8/testsaslauthd.8
|
200 | |
mv debian/tmp/usr/sbin/dbconverter-2 debian/tmp/usr/sbin/sasldbconverter2
|
|
198 |
$(TMP_MIT)/usr/share/man/man8/testsaslauthd.8
|
|
199 |
mv $(TMP_MIT)/usr/sbin/dbconverter-2 $(TMP_MIT)/usr/sbin/sasldbconverter2
|
201 | 200 |
|
202 | 201 |
# Install sample-{client,server} with Debianized names
|
203 | 202 |
install -m 755 -D $(CURDIR)/sample/sample-client \
|
204 | |
debian/tmp/usr/bin/sasl-sample-client
|
|
203 |
$(TMP_MIT)/usr/bin/sasl-sample-client
|
205 | 204 |
install -m 755 -D $(CURDIR)/sample/sample-server \
|
206 | |
debian/tmp/usr/sbin/sasl-sample-server
|
|
205 |
$(TMP_MIT)/usr/sbin/sasl-sample-server
|
207 | 206 |
|
208 | 207 |
# Alter the rpath of certain binaries and shared libraries.
|
209 | |
chrpath -d debian/tmp/usr/sbin/sasldblistusers2 \
|
210 | |
debian/tmp/usr/sbin/saslpasswd2
|
|
208 |
chrpath -d $(TMP_MIT)/usr/sbin/sasldblistusers2 \
|
|
209 |
$(TMP_MIT)/usr/sbin/saslpasswd2
|
|
210 |
chrpath -d $(TMP_HEIMDAL)/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2/libgssapiv2.so.*.*.*
|
211 | 211 |
ifeq (,$(findstring no-sql,$(DEB_BUILD_OPTIONS)))
|
212 | |
chrpath -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2/libsql.so.*.*.*
|
|
212 |
chrpath -d $(TMP_MIT)/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2/libsql.so.*.*.*
|
213 | 213 |
endif
|
214 | 214 |
|
215 | 215 |
# Install the sasl-sample-client and -server man pages.
|
|
217 | 217 |
|
218 | 218 |
# Install saslfinger
|
219 | 219 |
install -m 644 -D $(CURDIR)/debian/saslfinger/saslfinger.1 \
|
220 | |
debian/tmp/usr/share/man/man1/saslfinger.1
|
|
220 |
$(TMP_MIT)/usr/share/man/man1/saslfinger.1
|
221 | 221 |
install -m 755 -D $(CURDIR)/debian/saslfinger/saslfinger \
|
222 | |
debian/tmp/usr/bin/saslfinger
|
|
222 |
$(TMP_MIT)/usr/bin/saslfinger
|
223 | 223 |
|
224 | 224 |
# Install gen-auth
|
225 | 225 |
install -m 755 -D $(CURDIR)/debian/gen-auth/gen-auth \
|
226 | |
debian/tmp/usr/bin/gen-auth
|
|
226 |
$(TMP_MIT)/usr/bin/gen-auth
|
227 | 227 |
|
228 | 228 |
# Install logcheck snippet
|
229 | 229 |
install -m 644 -D $(CURDIR)/debian/libsasl2-modules.logcheck.server \
|
230 | |
debian/tmp/etc/logcheck/ignore.d.server/libsasl2-modules
|
|
230 |
$(TMP_MIT)/etc/logcheck/ignore.d.server/libsasl2-modules
|
231 | 231 |
|
232 | 232 |
override_dh_install:
|
233 | |
dh_install -Nlibsasl2-modules-gssapi-heimdal
|
|
233 |
dh_install -Nlibsasl2-modules-gssapi-heimdal --sourcedir=$(TMP_MIT)
|
|
234 |
dh_install -plibsasl2-modules-gssapi-heimdal --sourcedir=$(TMP_HEIMDAL)
|
234 | 235 |
|
235 | 236 |
override_dh_missing:
|
236 | 237 |
dh_missing --fail-missing
|