#!/usr/bin/make -f UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -e '/^Version/!d' -e 's/^Version: //g' -e 's/-.*//g') UPSTREAM_REVISION=$(shell echo $(UPSTREAM_VERSION) | sed -e 's/.*svn/-r/') UPSTREAM_SVN=svn://openbios.org/openbios/trunk/openbios-devel UPSTREAM_CHECKOUT=openbios-sparc-$(UPSTREAM_VERSION) get-orig-source: svn export $(UPSTREAM_REVISION) $(UPSTREAM_SVN) $(UPSTREAM_CHECKOUT) rm -fr openbios-$(UPSTREAM_VERSION)/utils/iso tar --owner=root --group=root -Jcf ../openbios_$(UPSTREAM_VERSION).orig.tar.xz $(UPSTREAM_CHECKOUT) rm -rf $(UPSTREAM_CHECKOUT) # We build a firmware, so we do not link to the ssp libraries export DEB_BUILD_MAINT_OPTIONS = hardening=-stackprotector binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep: %: dh $@ override_dh_auto_configure: config/scripts/switch-arch builtin-ppc builtin-sparc32 builtin-sparc64 override_dh_auto_build-indep: obj-ppc/.built obj-sparc32/.built obj-sparc64/.built obj-%/.built: $(MAKE) -C obj-$* V=1 EXTRACFLAGS="-ffreestanding -fno-pic -fno-stack-protector" touch $@ override_dh_auto_clean: dh_clean rm -rf obj-* rm -f config-host.mak config.xml rules.xml override_dh_auto_install-indep: mkdir -p debian/openbios-ppc/usr/share/openbios install -m644 obj-ppc/openbios-qemu.elf debian/openbios-ppc/usr/share/openbios/openbios-ppc mkdir -p debian/openbios-sparc/usr/share/openbios install -m644 obj-sparc32/openbios-builtin.elf debian/openbios-sparc/usr/share/openbios/openbios-sparc32 install -m644 obj-sparc32/QEMU,tcx.bin debian/openbios-sparc/usr/share/openbios/QEMU,tcx.bin install -m644 obj-sparc32/QEMU,cgthree.bin debian/openbios-sparc/usr/share/openbios/QEMU,cgthree.bin install -m644 obj-sparc64/openbios-builtin.elf debian/openbios-sparc/usr/share/openbios/openbios-sparc64 install -m644 obj-sparc64/QEMU,VGA.bin debian/openbios-sparc/usr/share/openbios/QEMU,VGA.bin override_dh_installchangelogs: dh_installchangelogs Documentation/ChangeLog.arch