diff options
author | Colin Watson <cjwatson@debian.org> | 2012-04-02 11:19:33 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2012-04-02 11:19:33 +0100 |
commit | 6f6ea15b1e8db08a4008abff64a287ee5ac327a8 (patch) | |
tree | a02908efad33d197d6140d0b0e549cf5cd914a7c /debian/rules | |
parent | b4fcc0dd1f8ca61369332f4b9e8f1a718ea3e277 (diff) |
* Fix cross-building:
- Allow using a cross-architecture pkg-config.
- Pass default LDFLAGS to contrib/Makefile.
- Allow dh_strip to strip gnome-ssh-askpass, rather than calling
'install -s'.
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/debian/rules b/debian/rules index 0200d48d7..889b5a079 100755 --- a/debian/rules +++ b/debian/rules | |||
@@ -17,8 +17,10 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) | |||
17 | 17 | ||
18 | ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) | 18 | ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) |
19 | CC := gcc | 19 | CC := gcc |
20 | PKG_CONFIG = pkg-config | ||
20 | else | 21 | else |
21 | CC := $(DEB_HOST_GNU_TYPE)-gcc | 22 | CC := $(DEB_HOST_GNU_TYPE)-gcc |
23 | PKG_CONFIG = $(DEB_HOST_GNU_TYPE)-pkg-config | ||
22 | RUN_TESTS := | 24 | RUN_TESTS := |
23 | endif | 25 | endif |
24 | 26 | ||
@@ -96,7 +98,8 @@ confflags += --with-cflags='$(cflags)' | |||
96 | confflags_udeb += --with-cflags='$(cflags_udeb)' | 98 | confflags_udeb += --with-cflags='$(cflags_udeb)' |
97 | 99 | ||
98 | # Linker flags. | 100 | # Linker flags. |
99 | confflags += --with-ldflags='$(strip -Wl,--as-needed $(shell dpkg-buildflags --get LDFLAGS))' | 101 | default_ldflags := $(shell dpkg-buildflags --get LDFLAGS) |
102 | confflags += --with-ldflags='$(strip -Wl,--as-needed $(default_ldflags))' | ||
100 | confflags_udeb += --with-ldflags='-Wl,--as-needed' | 103 | confflags_udeb += --with-ldflags='-Wl,--as-needed' |
101 | 104 | ||
102 | %: | 105 | %: |
@@ -118,7 +121,7 @@ override_dh_auto_build: | |||
118 | $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' | 121 | $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' |
119 | $(MAKE) -C build-udeb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen | 122 | $(MAKE) -C build-udeb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen |
120 | 123 | ||
121 | $(MAKE) -C contrib gnome-ssh-askpass2 CC='$(CC) $(default_cflags) -Wall -Wl,--as-needed' | 124 | $(MAKE) -C contrib gnome-ssh-askpass2 CC='$(CC) $(default_cflags) -Wall -Wl,--as-needed $(default_ldflags)' PKG_CONFIG=$(PKG_CONFIG) |
122 | 125 | ||
123 | override_dh_auto_test: | 126 | override_dh_auto_test: |
124 | ifeq ($(RUN_TESTS),yes) | 127 | ifeq ($(RUN_TESTS),yes) |
@@ -144,7 +147,7 @@ override_dh_install: | |||
144 | dh_install -popenssh-client-udeb -popenssh-server-udeb \ | 147 | dh_install -popenssh-client-udeb -popenssh-server-udeb \ |
145 | --sourcedir=build-udeb | 148 | --sourcedir=build-udeb |
146 | 149 | ||
147 | install -s -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/openssh/gnome-ssh-askpass | 150 | install -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/openssh/gnome-ssh-askpass |
148 | 151 | ||
149 | install -o root -g root debian/openssh-server.if-up debian/openssh-server/etc/network/if-up.d/openssh-server | 152 | install -o root -g root debian/openssh-server.if-up debian/openssh-server/etc/network/if-up.d/openssh-server |
150 | install -o root -g root -m 644 debian/openssh-server.ufw.profile debian/openssh-server/etc/ufw/applications.d/openssh-server | 153 | install -o root -g root -m 644 debian/openssh-server.ufw.profile debian/openssh-server/etc/ufw/applications.d/openssh-server |