Bug#572365: anna: add cross compiling support
Package: anna
Version: 1.34
Severity: wishlist
Hello,
I have written a mini-howto in wiki format to be able to cross compile anna package.
Could you consider applying the following patch or if you update packing taking care of cross compiling bits?
Thanks,
= Example of cross compiling a package =
== debian/control ==
Source: anna
Section: debian-installer
Build-Depends: debhelper (>= 5.0.22), dpkg-dev (>= 1.7.0), libdebconfclient0-dev (>= 0.46), libdebian-installer4-dev (>= 0.41)
== Fetch and install cross compiling libraries (XXX Need to test mrvn tool) ==
{{{
sudo apt-cross -a armel -f -i libdebconfclient0
sudo apt-cross -a armel -f -i libdebconfclient0-dev
sudo apt-cross -a armel -x libdebian-installer4 -x libdebian-installer-extra4 -f -i libdebian-installer4-dev
sudo apt-cross -a armel -f -x libc-bin -x libc-dev-bin -i libc6-dev
sudo apt-cross -a armel -f -x libc-bin -i libc6
E: sudo apt-cross -a armel -f -x libc-bin -x libc-dev-bin -i dpkg-dev
( I do not think you really need dpkg-dev to be able to cross-compile the package )
}}}
== Patch debian/rules, Makefiles or needed stuff ==
{{{
diff -urN anna-1.34/debian/rules anna-1.34.cross//debian/rules
--- anna-1.34/debian/rules 2006-03-16 01:25:42.000000000 +0100
+++ anna-1.34.cross//debian/rules 2010-03-03 19:35:33.000000000 +0100
@@ -1,4 +1,10 @@
#!/usr/bin/make -f
+export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+export CC=$(DEB_HOST_GNU_TYPE)-gcc
+endif
build: build-stamp
build-stamp:
}}}
== Build the package ==
* Native way: {{{ cd anna-*; dpkg-buildpackage -us -uc; cd .. }}}
* Cross way: {{{ cd anna-*; dpkg-buildpackage -aarmel -us -uc; cd .. }}}
== Send patch to the BTS ==
{{{
$ reportbug anna
}}}
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (600, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-2-686 (SMP w/2 CPU cores)
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Reply to: