1Fix cross-compilation issues
2
3 - During target package compilation the host version of b_sortnl is
4   needed.
5
6 - Do not call a 'amiroot' program built for the target when
7   cross-compiling. We're anyway not root, so simply remove the
8   chown/chgrp dance.
9
10Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
11Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
12
13Index: b/Makefile.am
14===================================================================
15--- a/Makefile.am
16+++ b/Makefile.am
17@@ -311,7 +311,7 @@
18
19 configparam_data.c: $(srcdir)/config.table b_sortnl$(EXEEXT) genconfigparam_data.awk
20 	rm -f config.table.sorted
21-	./b_sortnl$(EXEEXT) <$(srcdir)/config.table >config.table.sorted
22+	./b_sortnl_host$(EXEEXT) <$(srcdir)/config.table >config.table.sorted
23 	$(AWK) -f $(srcdir)/genconfigparam_data.awk <config.table.sorted >$@ \
24 	|| { rm -f $@ ; false ; }
25
26@@ -326,13 +326,7 @@
27 install-data-hook:
28 	$(INSTALL) -d -m 02770 $(DESTDIR)$(SPOOLDIR)
29 	$(INSTALL) -d -m 02770 $(DESTDIR)$(SPOOLDIR)/leaf.node
30-	-./amiroot && chown $(RUNAS_USER) $(DESTDIR)$(SPOOLDIR)
31-	-./amiroot && chown $(RUNAS_USER) $(DESTDIR)$(SPOOLDIR)/leaf.node
32-	-./amiroot && chgrp $(RUNAS_GROUP) $(DESTDIR)$(SPOOLDIR)
33-	-./amiroot && chgrp $(RUNAS_GROUP) $(DESTDIR)$(SPOOLDIR)/leaf.node
34 	rm -f $(DESTDIR)$(sbindir)/leafnode-version # now in $(bindir)
35-	./amiroot && p=$(DESTDIR)$(bindir)/newsq && chown 0 $$p \
36-		&& chgrp $(RUNAS_GROUP) $$p && chmod 2111 $$p  ; true
37 	@echo
38 	@echo "### If upgrading from leafnode before 1.6,"
39 	@echo "### run:  make update"
40