Skip to content

Commit

Permalink
debian: make cross-compile work
Browse files Browse the repository at this point in the history
This allows e.g. "sbuild --host=arm64" to build packages for other
architectures on, say, fat amd64 servers.  As a side effect, the Debian
build uses a separate builddir, which helps noting issues on that front.

Signed-off-by: David Lamparter <equinox@diac24.net>
  • Loading branch information
eqvinox committed Apr 7, 2020
1 parent 46bf67e commit d1312e0
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 24 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
frr (7.3-2) UNRELEASED; urgency=medium

* allow cross-compile with sbuild --host

-- David Lamparter <equinox-debian@diac24.net> Tue, 07 Apr 2020 16:39:43 +0200

frr (7.3-1) unstable; urgency=medium

* new upstream release
Expand Down
8 changes: 4 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Build-Depends:
libsystemd-dev <!pkg.frr.nosystemd>,
libyang-dev (>= 0.16.74),
pkg-config,
python3,
python3-dev,
python3-sphinx,
python3-pytest <!nocheck>,
python3:native,
python3-dev:native,
python3-sphinx:native,
python3-pytest:native <!nocheck>,
texinfo (>= 4.7)
Standards-Version: 4.4.1
Homepage: https://www.frrouting.org/
Expand Down
2 changes: 1 addition & 1 deletion debian/frr-doc.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
doc/user/_build/texinfo/frr.info
build/doc/user/_build/texinfo/frr.info
2 changes: 1 addition & 1 deletion debian/frr-doc.install
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ usr/share/doc/frr/html

# info + images referenced by it
usr/share/info/
doc/user/_build/texinfo/*.png usr/share/info
build/doc/user/_build/texinfo/*.png usr/share/info

# other
README.md usr/share/doc/frr
Expand Down
32 changes: 16 additions & 16 deletions debian/frr.manpages
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
doc/manpages/_build/man/frr-bgpd.8
doc/manpages/_build/man/frr-eigrpd.8
doc/manpages/_build/man/frr-fabricd.8
doc/manpages/_build/man/frr-isisd.8
doc/manpages/_build/man/frr-ldpd.8
doc/manpages/_build/man/frr-nhrpd.8
doc/manpages/_build/man/frr-ospf6d.8
doc/manpages/_build/man/frr-ospfd.8
doc/manpages/_build/man/frr-pimd.8
doc/manpages/_build/man/frr-ripd.8
doc/manpages/_build/man/frr-ripngd.8
doc/manpages/_build/man/frr-watchfrr.8
doc/manpages/_build/man/frr-zebra.8
doc/manpages/_build/man/frr.1
doc/manpages/_build/man/mtracebis.8
doc/manpages/_build/man/vtysh.1
build/doc/manpages/_build/man/frr-bgpd.8
build/doc/manpages/_build/man/frr-eigrpd.8
build/doc/manpages/_build/man/frr-fabricd.8
build/doc/manpages/_build/man/frr-isisd.8
build/doc/manpages/_build/man/frr-ldpd.8
build/doc/manpages/_build/man/frr-nhrpd.8
build/doc/manpages/_build/man/frr-ospf6d.8
build/doc/manpages/_build/man/frr-ospfd.8
build/doc/manpages/_build/man/frr-pimd.8
build/doc/manpages/_build/man/frr-ripd.8
build/doc/manpages/_build/man/frr-ripngd.8
build/doc/manpages/_build/man/frr-watchfrr.8
build/doc/manpages/_build/man/frr-zebra.8
build/doc/manpages/_build/man/frr.1
build/doc/manpages/_build/man/mtracebis.8
build/doc/manpages/_build/man/vtysh.1
9 changes: 7 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ endif
export PYTHON=python3

%:
dh $@ --with=$(DH_WITH_SYSTEMD)autoreconf --parallel
dh $@ -Bbuild --with=$(DH_WITH_SYSTEMD)autoreconf --parallel

override_dh_auto_configure:
$(shell dpkg-buildflags --export=sh); \
Expand Down Expand Up @@ -77,7 +77,7 @@ override_dh_auto_install:
ifeq ($(filter pkg.frr.nosystemd,$(DEB_BUILD_PROFILES)),)
cp tools/frr.service debian/frr.service
endif
cp tools/frrinit.sh debian/frr.init
cp build/tools/frrinit.sh debian/frr.init
-rm -f debian/tmp/usr/lib/frr/frr

# install config files
Expand Down Expand Up @@ -113,6 +113,11 @@ override_dh_makeshlibs:
override_dh_missing:
dh_missing --fail-missing

ifneq ($(filter nocheck,$(DEB_BUILD_PROFILES) $(DEB_BUILD_OPTIONS)),)
override_dh_auto_test:
true
endif

override_dh_auto_clean:
# we generally do NOT want a full distclean since that wipes both
# debian/changelog and config.version
Expand Down

0 comments on commit d1312e0

Please sign in to comment.