c9b624f4aa
* debian/rules: Rewrite sparc64 change of 2004-07-12. Always do each build in a separate build directory. Fixes Debian bug #254728.
79 lines
2.1 KiB
Makefile
Executable File
79 lines
2.1 KiB
Makefile
Executable File
#! /usr/bin/make -f
|
|
|
|
# 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: stamp-build
|
|
|
|
stamp-%: %/Makefile
|
|
$(MAKE) -C $*
|
|
touch $@
|
|
|
|
build/Makefile:
|
|
mkdir -p $(@D)
|
|
cd $(@D); sh ../configure --prefix=/usr
|
|
|
|
build64/Makefile:
|
|
mkdir -p $(@D)
|
|
cd $(@D); CC="$(CC64)" sh ../configure --prefix=/usr --build=$(HOST64)
|
|
|
|
clean:
|
|
rm -rf debian/tmp debian/substvars debian/files
|
|
rm -rf build64 stamp-build64
|
|
rm -rf build stamp-build
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
binary-indep:
|
|
|
|
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
|
|
|
|
install -d -m 755 -o root -g root debian/tmp
|
|
# reset the mode to work around a bug in install
|
|
chown 755 debian/tmp
|
|
install -d -m 755 -o root -g root debian/tmp/DEBIAN
|
|
|
|
# Install documentation
|
|
install -d -o root -g root -m 755 debian/tmp/usr/share/doc/$(package)
|
|
install -p -o root -g root -m 644 debian/changelog \
|
|
debian/tmp/usr/share/doc/$(package)/changelog.Debian
|
|
install -p -o root -g root -m 644 TODO \
|
|
debian/tmp/usr/share/doc/$(package)/TODO
|
|
install -p -o root -g root -m 644 NEWS \
|
|
debian/tmp/usr/share/doc/$(package)/changelog
|
|
gzip -9 debian/tmp/usr/share/doc/$(package)/*
|
|
install -p -o root -g root -m 644 debian/copyright \
|
|
debian/tmp/usr/share/doc/$(package)/copyright
|
|
|
|
# Install strace
|
|
install -d -o root -g root -m 755 debian/tmp/usr/bin debian/tmp/usr/share/man/man1
|
|
install -s -o root -g root -m 755 build/strace debian/tmp/usr/bin/strace
|
|
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 ..
|
|
|
|
checkroot:
|
|
test root = "`whoami`"
|