Use 3.0 (quilt) format with new dh_illumos_gate

This commit is contained in:
Igor Pashev 2015-10-17 17:45:37 +03:00
parent 28f163a7ad
commit 708a8737a6
4 changed files with 56 additions and 97 deletions

View File

@ -1,3 +1,9 @@
uts (4.3.1.git.35107df-1) UNRELEASED; urgency=medium
* Use 3.0 (quilt) format with new dh_illumos_gate
-- Igor Pashev <pashev.igor@gmail.com> Sat, 17 Oct 2015 16:16:01 +0300
uts (4.3+9) unstable; urgency=medium
* Patched for GCC 5 and newer coreutils:

View File

@ -4,10 +4,8 @@ Priority: optional
Maintainer: Igor Pashev <pashev.igor@gmail.com>
Build-Depends:
debhelper,
dh-illumos,
illumos-source-4.3,
dh-illumos (>= 9.6),
gcc (>= 4:4.8.2),
quilt,
sunmake,
sgs-yacc,
sgs-lex,

View File

@ -2,18 +2,25 @@
include /usr/share/dpkg/architecture.mk
debug_build = no
%:
dh $@
# building with GNU make is broken
make := -m 'sunmake'
BUILD = build-tree
ILLUMOS_GATE = illumos-gate
extract := \
usr/src/uts \
usr/src/common \
usr/src/lib/gss_mechs/mech_krb5/include/k5-int-pkinit.h \
usr/src/lib/gss_mechs/mech_krb5/include/preauth_plugin.h \
usr/src/lib/gss_mechs/mech_krb5/include/autoconf.h \
usr/src/lib/gss_mechs/mech_krb5/krb5/krb/int-proto.h
$(ILLUMOS_GATE):
dh_illumos_gate --checkout --destdir=$(ILLUMOS_GATE)
.PHONY: orig-tarball
create-orig:
dh_illumos_gate --create-orig --build \
-X /doc/ \
$(ILLUMOS_GATE)/usr/src/uts \
$(ILLUMOS_GATE)/usr/src/common \
$(ILLUMOS_GATE)/usr/src/lib/gss_mechs/mech_krb5/include/k5-int-pkinit.h \
$(ILLUMOS_GATE)/usr/src/lib/gss_mechs/mech_krb5/include/preauth_plugin.h \
$(ILLUMOS_GATE)/usr/src/lib/gss_mechs/mech_krb5/include/autoconf.h \
$(ILLUMOS_GATE)/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/int-proto.h
ifeq (illumos-amd64,$(DEB_HOST_ARCH))
libarch := amd64
@ -25,122 +32,70 @@ else
$(error $(DEB_HOST_ARCH) is not supported)
endif
# building with GNU make is broken
make := -m 'sunmake'
unpack: unpack-stamp
unpack-stamp:
dh_testdir
dh_illumos_gate --build $(extract)
# this a shell script generating assembler source files
# and passing that source to as.
override_dh_auto_configure:
dh_illumos_gate --configure --destdir=$(BUILD)
find $(BUILD)/usr/src/uts/common/sys/lvm -name \*.x \
-exec ./debian/fix.x.pl {} \;
# this shell script generates assembler source files
# and passes that source to as.
# Default output format is expected to be 32-bit:
echo "export ELFWRAP='$(CURDIR)/debian/elfwrap -32'" >> usr/env.sh
echo "export ELFWRAP='$(CURDIR)/debian/elfwrap -32'" >> $(BUILD)/usr/env.sh
# We need a wrapper for GNU CPP to undefine some macros.
# The wrapper is debian/cpp
echo "export RPCGEN='rpcgen -Y $(CURDIR)/debian'" >> usr/env.sh
echo "export RPCGEN='rpcgen -Y $(CURDIR)/debian'" >> $(BUILD)/usr/env.sh
# We need these versions for mdb:
echo 'export YACC=/usr/bin/sgs-yacc' >> usr/env.sh
echo 'export LEX=/usr/bin/sgs-lex' >> usr/env.sh
echo 'export YACC=/usr/bin/sgs-yacc' >> $(BUILD)/usr/env.sh
echo 'export LEX=/usr/bin/sgs-lex' >> $(BUILD)/usr/env.sh
# GCC does not support -msave-args for a while:
echo 'export SAVEARGS=' >> usr/env.sh
echo 'export SAVEARGS=' >> $(BUILD)/usr/env.sh
# Use GNU ld for helper programs (due to changes in crt1.o)
# and sun ld for kernel modules
sed -i /LD_ALTEXEC/d usr/env.sh
echo 'export LD=sunld' >> usr/env.sh
sed -i /LD_ALTEXEC/d $(BUILD)/usr/env.sh
echo 'export LD=sunld' >> $(BUILD)/usr/env.sh
echo 'export DEF_BUILDS$(DEB_HOST_ARCH_BITS)=obj$(DEB_HOST_ARCH_BITS)' >> $(BUILD)/usr/env.sh
echo 'export ALL_BUILDS$(DEB_HOST_ARCH_BITS)=obj$(DEB_HOST_ARCH_BITS)' >> $(BUILD)/usr/env.sh
# Disable 32-bit builds on 64-bit host, and vice versa
ifeq (64,$(DEB_HOST_ARCH_BITS))
echo "export DEF_BUILDS32=''" >> usr/env.sh
echo "export ALL_BUILDS32=''" >> usr/env.sh
echo "export DEF_BUILDS32=''" >> $(BUILD)/usr/env.sh
echo "export ALL_BUILDS32=''" >> $(BUILD)/usr/env.sh
else ifeq (32,$(DEB_HOST_ARCH_BITS))
echo "export DEF_BUILDS64=''" >> usr/env.sh
echo "export ALL_BUILDS64=''" >> usr/env.sh
echo "export DEF_BUILDS64=''" >> $(BUILD)/usr/env.sh
echo "export ALL_BUILDS64=''" >> $(BUILD)/usr/env.sh
else
$(error DEB_HOST_ARCH_BITS is not defined or holds something wrong)
endif
ifeq (yes,$(debug_build))
echo 'export DEF_BUILDS$(DEB_HOST_ARCH_BITS)=debug$(DEB_HOST_ARCH_BITS)' >> usr/env.sh
echo 'export ALL_BUILDS$(DEB_HOST_ARCH_BITS)=debug$(DEB_HOST_ARCH_BITS)' >> usr/env.sh
else
echo 'export DEF_BUILDS$(DEB_HOST_ARCH_BITS)=obj$(DEB_HOST_ARCH_BITS)' >> usr/env.sh
echo 'export ALL_BUILDS$(DEB_HOST_ARCH_BITS)=obj$(DEB_HOST_ARCH_BITS)' >> usr/env.sh
endif
touch $@
patch: patch-stamp
patch-stamp: unpack-stamp
dh_testdir
[ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
touch $@
unpatch:
dh_testdir
[ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt pop -a -f || test $$? = 2
rm -f patch-stamp
fix-x-stamp: patch-stamp
find usr/src/uts/common/sys/lvm -name \*.x \
-exec ./debian/fix.x.pl {} \;
touch $@
build build-arch build-indep: build-stamp
dirs-stamp:
override_dh_auto_build:
mkdir -p \
debian/tmp/etc \
debian/tmp/etc/security \
debian/tmp/boot \
debian/tmp/boot/solaris
touch $@
dh_illumos_make $(BUILD)/usr/src/uts -t install_h $(make)
dh_illumos_make --ctf $(BUILD)/usr/src/uts $(make)
build-uts-stamp: headers-stamp patch-stamp fix-x-stamp dirs-stamp
dh_illumos_make --ctf usr/src/uts $(make)
touch $@
build-stamp: build-uts-stamp
touch $@
headers-stamp: patch-stamp fix-x-stamp
dh_illumos_make usr/src/uts -t install_h $(make)
touch $@
install: install-stamp
install-stamp: build-stamp
override_dh_install:
set -x; for p in `grep -E -v '^(#|$$)' debian/notpacked`; do \
rm -rf debian/tmp/$$p || exit 1; \
done
touch $@
binary binary-arch binary-indep: binary-stamp
binary-stamp: install-stamp
dh_testdir
dh_testroot
dh_installdirs
dh_install --fail-missing
dh_installman
dh_installdocs
dh_installexamples
dh_installchangelogs
dh_link
dh_compress
dh_fixperms
override_dh_installdeb:
(cd debian/illumos-kernel && find kernel platform usr/kernel \
-type f -name \*.conf) > debian/illumos-kernel.conffiles
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb -- -Zxz
touch $@
clean: unpatch
dh_testdir
dh_clean
rm -rf usr .pc
override_dh_auto_clean:
rm -rf $(BUILD)

View File

@ -1 +1 @@
3.0 (native)
3.0 (quilt)