# Set required packages
INCLUDE(FindPkgConfig)
-SET(pkgs_requires "dlog glib-2.0 gio-2.0 bundle vconf security-manager")
-IF(_APPFW_FEATURE_SOCKET_ACTIVATION)
- SET(pkgs_requires "${pkgs_requires} libsystemd-daemon")
- ADD_DEFINITIONS("-D_APPFW_FEATURE_SOCKET_ACTIVATION")
-ENDIF(_APPFW_FEATURE_SOCKET_ACTIVATION)
+SET(pkgs_requires "dlog glib-2.0 gio-2.0 bundle vconf security-manager libsystemd-daemon")
pkg_check_modules(pkgs REQUIRED ${pkgs_requires})
BuildRequires: pkgconfig(security-manager)
BuildRequires: pkgconfig(libsystemd-daemon)
-%define appfw_feature_socket_activation 1
-
%description
Debug launchpad
%endif
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -D_APPFW_FEATURE_SOCKET_ACTIVATION:BOOL=${_APPFW_FEATURE_SOCKET_ACTIVATION} \
.
make %{?jobs:-j%jobs}
rm -rf %{buildroot}
%make_install
-%if 0%{?appfw_feature_socket_activation}
mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir_user}/debug-launchpad.service
install -m 0644 %{SOURCE2} %{buildroot}%{_unitdir_user}/debug-launchpad.socket
ln -s ../debug-launchpad.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/debug-launchpad.socket
-%endif
%clean
rm -rf %{buildroot}
%license LICENSE
%manifest debug-launchpad.manifest
%caps(cap_mac_admin,cap_setgid,cap_dac_override=ei) %{_bindir}/debug_launchpad_preloading_preinitializing_daemon
-%if 0%{?appfw_feature_socket_activation}
%{_unitdir_user}/debug-launchpad.service
%{_unitdir_user}/debug-launchpad.socket
%{_unitdir_user}/sockets.target.wants/debug-launchpad.socket
-%endif
#include <unistd.h>
#include <bundle.h>
#include <bundle_internal.h>
-#ifdef _APPFW_FEATURE_SOCKET_ACTIVATION
#include <systemd/sd-daemon.h>
-#endif /* _APPFW_FEATURE_SOCKET_ACTIVATION */
#include "common.h"
#include "debug_util.h"
setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
}
-#ifdef _APPFW_FEATURE_SOCKET_ACTIVATION
static int __create_sock_activation(void)
{
int listen_fds;
return -1;
}
-#endif /* _APPFW_FEATURE_SOCKET_ACTIVATION */
static int __create_server_socket(bool is_app)
{
{
int fd = -1;
-#ifdef _APPFW_FEATURE_SOCKET_ACTIVATION
fd = __create_sock_activation();
-#endif /* _APPFW_FEATURE_SOCKET_ACTIAVTION */
if (fd < 0) {
fd = __create_server_socket(false);
if (fd < 0) {