forked from flatpak/flatpak
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This moves a all source code into separate subdirs per binary. The helper and the generic stuff goes into lib/ which is then used by all the others. For now this is a completely internal library, but at some point we will probably clean it up and expose some subset. Also, we move the dbus proxy to libexecdir.
- Loading branch information
1 parent
ef223b6
commit 302f88e
Showing
39 changed files
with
153 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,6 @@ xdg-app-systemd-dbus.[ch] | |
xdg-app-resources.[ch] | ||
xdg-dbus-proxy | ||
*.service | ||
xdg-app.env | ||
xdg-app.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
bin_PROGRAMS += \ | ||
xdg-app \ | ||
$(NULL) | ||
|
||
xdg_app_SOURCES = \ | ||
app/xdg-app-main.c \ | ||
app/xdg-app-builtins.h \ | ||
app/xdg-app-builtins-add-remote.c \ | ||
app/xdg-app-builtins-delete-remote.c \ | ||
app/xdg-app-builtins-list-remotes.c \ | ||
app/xdg-app-builtins-repo-contents.c \ | ||
app/xdg-app-builtins-install.c \ | ||
app/xdg-app-builtins-make-current.c \ | ||
app/xdg-app-builtins-update.c \ | ||
app/xdg-app-builtins-uninstall.c \ | ||
app/xdg-app-builtins-list.c \ | ||
app/xdg-app-builtins-run.c \ | ||
app/xdg-app-builtins-build-init.c \ | ||
app/xdg-app-builtins-build.c \ | ||
app/xdg-app-builtins-build-finish.c \ | ||
app/xdg-app-builtins-build-export.c \ | ||
app/xdg-app-builtins-repo-update.c \ | ||
$(NULL) | ||
|
||
xdg_app_LDADD = $(BASE_LIBS) $(OSTREE_LIBS) $(SOUP_LIBS) libglnx.la libxdgapp.la | ||
xdg_app_CFLAGS = $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(SOUP_CFLAGS) | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
libexec_PROGRAMS += \ | ||
xdg-dbus-proxy \ | ||
$(NULL) | ||
|
||
xdg_dbus_proxy_SOURCES = \ | ||
dbus-proxy/xdg-app-proxy.c \ | ||
dbus-proxy/xdg-app-proxy.h \ | ||
dbus-proxy/dbus-proxy.c \ | ||
$(NULL) | ||
|
||
xdg_dbus_proxy_LDADD = $(BASE_LIBS) libglnx.la | ||
xdg_dbus_proxy_CFLAGS = $(BASE_CFLAGS) -I$(srcdir)/dbus-proxy |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
noinst_LTLIBRARIES += libxdgapp.la | ||
|
||
dbus_built_sources = lib/xdg-app-dbus.c lib/xdg-app-dbus.h | ||
systemd_dbus_built_sources = lib/xdg-app-systemd-dbus.c lib/xdg-app-systemd-dbus.h | ||
BUILT_SOURCES = $(dbus_built_sources) $(systemd_dbus_built_sources) | ||
|
||
$(dbus_built_sources) : data/xdg-app-dbus-interfaces.xml | ||
$(AM_V_GEN) $(GDBUS_CODEGEN) \ | ||
--interface-prefix org.freedesktop.XdgApp. \ | ||
--c-namespace XdgApp \ | ||
--generate-c-code $(builddir)/lib/xdg-app-dbus \ | ||
$(srcdir)/data/xdg-app-dbus-interfaces.xml \ | ||
$(NULL) | ||
|
||
$(systemd_dbus_built_sources) : data/org.freedesktop.systemd1.xml | ||
$(AM_V_GEN) $(GDBUS_CODEGEN) \ | ||
--interface-prefix org.freedesktop.systemd1. \ | ||
--c-namespace Systemd \ | ||
--generate-c-code $(builddir)/lib/xdg-app-systemd-dbus \ | ||
$(srcdir)/data/org.freedesktop.systemd1.xml \ | ||
$(NULL) | ||
|
||
libxdgapp_la_SOURCES = \ | ||
lib/xdg-app-dir.c \ | ||
lib/xdg-app-dir.h \ | ||
lib/xdg-app-run.c \ | ||
lib/xdg-app-run.h \ | ||
lib/xdg-app-utils.c \ | ||
lib/xdg-app-utils.h \ | ||
$(dbus_built_sources) \ | ||
$(systemd_dbus_built_sources) \ | ||
$(NULL) | ||
|
||
libxdgapp_la_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(SOUP_CFLAGS) -I$(srcdir)/dbus-proxy | ||
libxdgapp_la_LIBADD = libglnx.la $(BASE_LIBS) $(OSTREE_LIBS) $(SOUP_LIBS) | ||
|
||
bin_PROGRAMS += \ | ||
xdg-app-helper \ | ||
$(NULL) | ||
|
||
xdg_app_helper_SOURCES = lib/xdg-app-helper.c | ||
xdg_app_helper_LDADD = $(LIBSECCOMP_LIBS) | ||
xdg_app_helper_CFLAGS = $(LIBSECCOMP_CFLAGS) | ||
|
||
install-exec-hook: | ||
if DISABLE_USERNS | ||
if PRIV_MODE_SETUID | ||
$(SUDO_BIN) chown root $(DESTDIR)$(bindir)/xdg-app-helper | ||
$(SUDO_BIN) chmod u+s $(DESTDIR)$(bindir)/xdg-app-helper | ||
else | ||
if PRIV_MODE_FILECAPS | ||
$(SUDO_BIN) setcap cap_sys_admin+ep $(DESTDIR)$(bindir)/xdg-app-helper | ||
endif | ||
endif | ||
endif |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/session-helper/xdg-app.gresource.xml) | ||
|
||
libexec_PROGRAMS += \ | ||
xdg-app-session-helper \ | ||
$(NULL) | ||
|
||
session-helper/xdg-app-resources.h: session-helper/xdg-app.gresource.xml | ||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \ | ||
--target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-header | ||
|
||
session-helper/xdg-app-resources.c: session-helper/xdg-app.gresource.xml $(resource_files) | ||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \ | ||
--target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-source | ||
|
||
# D-BUS service file | ||
%.service: %.service.in config.log | ||
$(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ | ||
|
||
servicedir = $(DBUS_SERVICE_DIR) | ||
service_in_files = session-helper/xdg-app-session.service.in | ||
service_DATA = session-helper/xdg-app-session.service | ||
DISTCLEANFILES += $(service_DATA) | ||
|
||
EXTRA_DIST += session-helper/xdg-app.gresource.xml $(service_in_files) | ||
|
||
xdg_app_session_helper_SOURCES = \ | ||
session-helper/xdg-app-session-helper.c \ | ||
session-helper/xdg-app-resources.h \ | ||
session-helper/xdg-app-resources.c \ | ||
$(NULL) | ||
|
||
xdg_app_session_helper_LDADD = $(BASE_LIBS) libxdgapp.la | ||
xdg_app_session_helper_CFLAGS = $(BASE_CFLAGS) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<gresources> | ||
<gresource prefix='/org/freedesktop/XdgApp'> | ||
<file>xdg-app-dbus-interfaces.xml</file> | ||
<file alias="xdg-app-dbus-interfaces.xml">data/xdg-app-dbus-interfaces.xml</file> | ||
</gresource> | ||
</gresources> |