summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2004-07-12 07:54:02 +0000
committerRoland McGrath <roland@redhat.com>2004-07-12 07:54:02 +0000
commitb46cd51d58d5278165121907765fcc4b97f3b5be (patch)
treef5812d8ba035fc41318b8e2450c960cd293e1c8d /debian/rules
parent0165e7790d83fe64da4fbe4dc73d91590381ca98 (diff)
downloadstrace-b46cd51d58d5278165121907765fcc4b97f3b5be.tar.gz
strace-b46cd51d58d5278165121907765fcc4b97f3b5be.tar.bz2
strace-b46cd51d58d5278165121907765fcc4b97f3b5be.tar.xz
2004-07-12 Roland McGrath <roland@redhat.com>
* debian/rules: On sparc-linux, build strace64 as well. From Ben Collins <bcollins@debian.org>. Fixes Debian bug #254728.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules26
1 files changed, 25 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index cdce167..6f99d66 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,18 @@
# Debian package information
package = strace
+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+
+ifeq ($(DEB_HOST_GNU_TYPE),sparc-linux)
+ build64 = yes
+ HOST64 = sparc64-linux
+ CC64 = gcc -m64
+endif
+
+ifeq ($(build64),yes)
+ extra_build_targets += stamp-build64
+endif
+
all build: Makefile
$(MAKE) $(MFLAGS)
touch stamp-build
@@ -13,12 +25,19 @@ clean:
test ! -f Makefile || $(MAKE) distclean
rm -f stamp-build
rm -rf debian/tmp debian/substvars debian/files
+ rm -rf build64 stamp-build64
binary: binary-indep binary-arch
binary-indep:
-binary-arch: build checkroot
+stamp-build64:
+ mkdir build64
+ cd build64 && CC="$(CC64)" sh ../configure --prefix=/usr --build=$(HOST64)
+ cd build64 && $(MAKE) $(MFLAGS)
+ touch $@
+
+binary-arch: $(extra_build_targets) build checkroot
test -f stamp-build || make $(MFLAGS) -f debian/rules build
-rm -rf debian/tmp debian/files debian/substvars
@@ -45,6 +64,11 @@ binary-arch: build checkroot
install -p -o root -g root -m 644 strace.1 debian/tmp/usr/share/man/man1/strace.1
gzip -9 debian/tmp/usr/share/man/man1/strace.1
+ifeq ($(build64),yes)
+ install -s -o root -g root -m 755 build64/strace debian/tmp/usr/bin/strace64
+ ln -s strace.1 debian/tmp/usr/share/man/man1/strace64.1
+endif
+
dpkg-shlibdeps strace
dpkg-gencontrol -isp
dpkg --build debian/tmp ..