diff --git a/cmd/snap-seccomp/main.go b/cmd/snap-seccomp/main.go index 2c8736eb68d5..6351fd3addb0 100644 --- a/cmd/snap-seccomp/main.go +++ b/cmd/snap-seccomp/main.go @@ -19,6 +19,8 @@ package main +//#cgo LDFLAGS: ${SRCDIR}/libseccomp.upstream/src/.libs/libseccomp.a +// //#include //#include //#include @@ -133,6 +135,8 @@ package main // import "C" +//go:generate sh -c "(cd libseccomp.upstream ; ./autogen.sh ; ./configure; make)" + import ( "bufio" "bytes" diff --git a/packaging/ubuntu-14.04/rules b/packaging/ubuntu-14.04/rules index 5ae9bb2b974b..102e60c13862 100755 --- a/packaging/ubuntu-14.04/rules +++ b/packaging/ubuntu-14.04/rules @@ -98,6 +98,7 @@ override_dh_auto_build: # Build golang bits mkdir -p _build/src/$(DH_GOPKG)/cmd/snap/test-data cp -a cmd/snap/test-data/*.gpg _build/src/$(DH_GOPKG)/cmd/snap/test-data/ + cp -a cmd/snap-seccomp/libseccomp.upstream/* _build/src/$(DH_GOPKG)/cmd/snap-seccomp/libseccomp.upstream dh_auto_build -- $(BUILDFLAGS) $(TAGS) $(GCCGOFLAGS) # Build C bits, sadly manually cd cmd && ( autoreconf -i -f ) diff --git a/packaging/ubuntu-16.04/rules b/packaging/ubuntu-16.04/rules index e30aa555355e..1658836dca03 100755 --- a/packaging/ubuntu-16.04/rules +++ b/packaging/ubuntu-16.04/rules @@ -105,6 +105,7 @@ override_dh_auto_build: # Build golang bits mkdir -p _build/src/$(DH_GOPKG)/cmd/snap/test-data cp -a cmd/snap/test-data/*.gpg _build/src/$(DH_GOPKG)/cmd/snap/test-data/ + cp -a cmd/snap-seccomp/libseccomp.upstream/* _build/src/$(DH_GOPKG)/cmd/snap-seccomp/libseccomp.upstream dh_auto_build -- $(BUILDFLAGS) $(TAGS) $(GCCGOFLAGS) # Build C bits, sadly manually cd cmd && ( autoreconf -i -f )