src/services: Add org.freedesktop.IBus.session.generic.service

Move bus/*.service.in & src/*.service.in into bus/services

BUG=https://github.com/ibus/ibus/pull/2381
This commit is contained in:
fujiwarat 2022-02-17 20:15:38 +09:00
Родитель a076b388d8
Коммит b5423f0cff
7 изменённых файлов: 112 добавлений и 53 удалений

Просмотреть файл

@ -3,8 +3,8 @@
# ibus - The Input Bus
#
# Copyright (c) 2007-2013 Peng Huang <shawn.p.huang@gmail.com>
# Copyright (c) 2013-2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2007-2018 Red Hat, Inc.
# Copyright (c) 2013-2022 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2007-2022 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@ -22,6 +22,7 @@
# USA
NULL =
SUBDIRS = . services
libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la
@ -190,15 +191,4 @@ man_onedir = $(mandir)/man1
%.1.gz: %.1
$(AM_V_GEN) gzip -c $< > $@.tmp && mv $@.tmp $@
dbusservice_in_files = org.freedesktop.IBus.service.in
dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
dbusservicedir=${datadir}/dbus-1/services
org.freedesktop.IBus.service: org.freedesktop.IBus.service.in
$(AM_V_GEN) sed -e "s|\@bindir\@|$(bindir)|" -e "s|\@xim_cli_arg\@|$(XIM_CLI_ARG)|" $< > $@.tmp && mv $@.tmp $@
EXTRA_DIST += $(dbusservice_in_files)
CLEANFILES += $(dbusservice_DATA)
-include $(top_srcdir)/git.mk

68
bus/services/Makefile.am Normal file
Просмотреть файл

@ -0,0 +1,68 @@
# vim:set noet ts=4:
#
# ibus - The Input Bus
#
# Copyright (c) 2022 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2022 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
NULL =
# Originally this D-Bus service file was added for GNOME but seems not to
# be used at present.
#
# TODO: Check if flatpack uses this file and we could delete
# org.freedesktop.IBus.service file in the future.
dbusservice_in_files = org.freedesktop.IBus.service.in
dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
dbusservicedir=${datadir}/dbus-1/services
systemdservice_in_files = \
org.freedesktop.IBus.session.generic.service.in \
org.freedesktop.IBus.session.GNOME.service.in \
$(NULL)
%.service: %.service.in
$(AM_V_GEN) sed -e "s|\@bindir\@|$(bindir)|" \
-e "s|\@xim_cli_arg\@|$(XIM_CLI_ARG)|" $< > $@.tmp && \
mv $@.tmp $@
if ENABLE_SYSTEMD
systemdservice_DATA = $(systemdservice_in_files:.service.in=.service)
systemdservicedir = $(SYSTEMD_USER_UNIT_DIR)
# in install-data-hook.
install-data-hook:
$(MKDIR_P) "$(DESTDIR)$(SYSTEMD_USER_UNIT_DIR)/gnome-session.target.wants/"
( \
cd "$(DESTDIR)$(SYSTEMD_USER_UNIT_DIR)/gnome-session.target.wants" ; \
$(LN_S) -f "../org.freedesktop.IBus.session.GNOME.service" .; \
)
$(NULL)
endif
EXTRA_DIST = \
$(dbusservice_in_files) \
$(systemdservice_in_files) \
$(NULL)
CLEANFILES = \
$(dbusservice_DATA) \
$(systemdservice_DATA) \
$(NULL)
-include $(top_srcdir)/git.mk

Просмотреть файл

@ -1,5 +1,5 @@
[Unit]
Description=IBus Daemon
Description=IBus Daemon for GNOME
CollectMode=inactive-or-failed
# Require GNOME session and specify startup ordering

Просмотреть файл

@ -0,0 +1,15 @@
[Unit]
Description=IBus Daemon for generic sessions
CollectMode=inactive-or-failed
# Never run in GNOME
Conflicts=gnome-session-initialized.target
[Service]
Type=dbus
# Only pull --xim in X11 session, it is done via Xwayland-session.d on Wayland
ExecStart=sh -c '@bindir@/ibus-daemon $IBUS_DAEMON_ARGS'
Restart=on-abnormal
BusName=org.freedesktop.IBus
TimeoutStopSec=5
Slice=session.slice

Просмотреть файл

@ -3,8 +3,8 @@
# ibus - The Input Bus
#
# Copyright (c) 2007-2016 Peng Huang <shawn.p.huang@gmail.com>
# Copyright (c) 2015-2021 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2007-2021 Red Hat, Inc.
# Copyright (c) 2015-2022 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2007-2022 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@ -791,24 +791,22 @@ AC_SUBST(XKBCONFIG_BASE)
AC_SUBST([GDBUS_CODEGEN], [`$PKG_CONFIG --variable gdbus_codegen gio-2.0`])
# OUTPUT files
AC_CONFIG_FILES([ po/Makefile.in
Makefile
ibus-1.0.pc
ibus.spec
AC_CONFIG_FILES([
po/Makefile.in
bindings/Makefile
bindings/pygobject/Makefile
bindings/vala/Makefile
bus/Makefile
bus/services/Makefile
client/Makefile
client/gtk2/Makefile
client/gtk3/Makefile
client/gtk4/Makefile
client/x11/Makefile
client/wayland/Makefile
src/Makefile
src/ibusversion.h
src/tests/Makefile
bus/Makefile
portal/Makefile
engine/Makefile
util/Makefile
util/IMdkit/Makefile
conf/Makefile
conf/dconf/Makefile
conf/memconf/Makefile
data/Makefile
data/annotations/Makefile
data/icons/Makefile
@ -819,20 +817,24 @@ docs/Makefile
docs/reference/Makefile
docs/reference/ibus/ibus-docs.sgml
docs/reference/ibus/Makefile
m4/Makefile
engine/Makefile
ibus/_config.py
ibus/Makefile
ibus/interface/Makefile
m4/Makefile
portal/Makefile
setup/Makefile
src/Makefile
src/ibusversion.h
src/tests/Makefile
tools/Makefile
ui/Makefile
ui/gtk3/Makefile
setup/Makefile
bindings/Makefile
bindings/pygobject/Makefile
bindings/vala/Makefile
conf/Makefile
conf/dconf/Makefile
conf/memconf/Makefile
tools/Makefile
util/Makefile
util/IMdkit/Makefile
Makefile
ibus-1.0.pc
ibus.spec
])
AC_OUTPUT

Просмотреть файл

@ -317,11 +317,6 @@ install-data-hook:
rm "$(DESTDIR)$(dictdir)/$$file" || exit $$?; \
fi; \
done
$(MKDIR_P) "$(DESTDIR)$(SYSTEMD_USER_UNIT_DIR)/gnome-session.target.wants/"
( \
cd "$(DESTDIR)$(SYSTEMD_USER_UNIT_DIR)/gnome-session.target.wants" ; \
$(LN_S) -f "../org.freedesktop.IBus.session.GNOME.service" .; \
)
emoji_parser_SOURCES = \
emoji-parser.c \
@ -388,17 +383,7 @@ clean-local:
$(NULL)
endif
if ENABLE_SYSTEMD
systemdservice_in_files = org.freedesktop.IBus.session.GNOME.service.in
systemdservice_DATA = $(systemdservice_in_files:.service.in=.service)
systemdservicedir=$(SYSTEMD_USER_UNIT_DIR)
org.freedesktop.IBus.session.GNOME.service: org.freedesktop.IBus.session.GNOME.service.in
$(AM_V_GEN) sed -e "s|\@bindir\@|$(bindir)|" $< > $@.tmp && mv $@.tmp $@
endif
EXTRA_DIST = \
org.freedesktop.IBus.session.GNOME.service.in \
emoji-parser.c \
ibusversion.h.in \
ibusmarshalers.list \
@ -408,7 +393,6 @@ EXTRA_DIST = \
$(NULL)
CLEANFILES += \
$(systemdservice_DATA) \
$(BUILT_SOURCES) \
stamp-ibusmarshalers.h \
stamp-ibusenumtypes.h \