summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-04-29 11:39:30 +0200
committerAlexander Larsson <alexl@redhat.com>2016-04-29 15:38:23 +0200
commitee7be7f82dc72bc4bbbc9fce0ee66fa232baf7dc (patch)
tree191886d44a37f97343bae3fee486f0782923e4ef
parent27642b3d6df1992f393748e7ade84d89a038df65 (diff)
downloadxdg-app-ee7be7f82dc72bc4bbbc9fce0ee66fa232baf7dc.tar.gz
Build bwrap
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am16
-rwxr-xr-xautogen.sh1
-rw-r--r--tests/Makefile.am.inc2
4 files changed, 19 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 970839e..f485b14 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,3 +77,4 @@ po/.intltool-merge-cache
po/Makefile.in.in
po/POTFILES
system-helper/org.freedesktop.XdgApp.policy
+bwrap
diff --git a/Makefile.am b/Makefile.am
index dacbd23..234177f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -73,6 +73,22 @@ include document-portal/Makefile.am.inc
include Makefile.gtester
include tests/Makefile.am.inc
+bwrap_PROGRAMS = bwrap
+bwrapdir = $(libdir)/xdg-app
+include bubblewrap/Makefile-bwrap.am.inc
+
+# NOTE: bwrap is install-bwrapPROGS which is run from install-data, not install-exec, this data-hook is used
+install-data-hook:
+ $(MAKE) $(AM_MAKEFLAGS) install-test-data-hook
+if PRIV_MODE_SETUID
+ $(SUDO_BIN) chown root $(DESTDIR)$(libdir)/xdg-app/bwrap
+ $(SUDO_BIN) chmod u+s $(DESTDIR)$(libdir)/xdg-app/bwrap
+else
+if PRIV_MODE_FILECAPS
+ $(SUDO_BIN) setcap cap_sys_admin,cap_net_admin,cap_sys_chroot+ep $(DESTDIR)$(libdir)/xdg-app/bwrap
+endif
+endif
+
completiondir = $(datadir)/bash-completion/completions
completion_DATA = completion/xdg-app
EXTRA_DIST += $(completion_DATA)
diff --git a/autogen.sh b/autogen.sh
index a6e3505..dc84bf7 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -23,6 +23,7 @@ if ! test -f libglnx/README.md; then
fi
# Workaround automake bug with subdir-objects and computed paths
sed -e 's,$(libglnx_srcpath),'${srcdir}/libglnx,g < libglnx/Makefile-libglnx.am >libglnx/Makefile-libglnx.am.inc
+sed -e 's,$(bwrap_srcpath),'${srcdir}/bubblewrap,g < bubblewrap/Makefile-bwrap.am >bubblewrap/Makefile-bwrap.am.inc
GTKDOCIZE=$(which gtkdocize 2>/dev/null)
if test -z $GTKDOCIZE; then
diff --git a/tests/Makefile.am.inc b/tests/Makefile.am.inc
index 6767275..76d6a5b 100644
--- a/tests/Makefile.am.inc
+++ b/tests/Makefile.am.inc
@@ -34,7 +34,7 @@ tests/services/org.freedesktop.XdgApp.service: session-helper/org.freedesktop.Xd
tests/libtest.sh: tests/services/org.freedesktop.portal.Documents.service tests/services/org.freedesktop.XdgApp.service
-install-data-hook:
+install-test-data-hook:
if ENABLE_INSTALLED_TESTS
mkdir -p $(DESTDIR)$(installed_testdir)/services
ln -sf $(dbus_servicedir)/org.freedesktop.XdgApp.service $(DESTDIR)$(installed_testdir)/services/