mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
add meson build supporting
This commit is contained in:
parent
9acad15b72
commit
7dba31c923
20 changed files with 336 additions and 8 deletions
6
res/create-symlinks
Executable file
6
res/create-symlinks
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
SYSTEMD_SYSTEM_UNIT_DIR=${DESTDIR}`pkg-config --variable=systemdsystemunitdir systemd`
|
||||
ln -sfv miracle-wifid.service \
|
||||
${SYSTEMD_SYSTEM_UNIT_DIR}/dbos-org.freedesktop.miracle.wifi.service
|
||||
ln -sfv miracle-dispd.service \
|
||||
${SYSTEMD_SYSTEM_UNIT_DIR}/dbos-org.freedesktop.miracle.wfd.service
|
8
res/install-scripts
Executable file
8
res/install-scripts
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
RESDIR="${MESON_SOURCE_ROOT}/res"
|
||||
BINDIR="${MESON_INSTALL_DESTDIR_PREFIX}/$1"
|
||||
|
||||
install -dv "$BINDIR"
|
||||
install -v "$RESDIR"/miracle-gst "$BINDIR"
|
||||
install -v "$RESDIR"/gstplayer "$BINDIR"
|
||||
install -v "$RESDIR"/uibc-viewer "$BINDIR"
|
42
res/meson.build
Normal file
42
res/meson.build
Normal file
|
@ -0,0 +1,42 @@
|
|||
dbus1 = dependency('dbus-1')
|
||||
systemd = dependency('systemd')
|
||||
|
||||
dbus_system_services_dir = dbus1.get_pkgconfig_variable('system_bus_services_dir')
|
||||
systemd_system_unit_dir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
|
||||
|
||||
conf_data = configuration_data()
|
||||
dbus_name_prefix = 'org.freedesktop.miracle'
|
||||
conf_data.set('dbus_name_prefix', dbus_name_prefix)
|
||||
conf_data.set('exec_path',
|
||||
join_paths(get_option('prefix'), get_option('bindir'))
|
||||
)
|
||||
|
||||
configure_file(input: 'miracle-wifid.service.in',
|
||||
output: 'miracle-wifid.service',
|
||||
configuration: conf_data,
|
||||
install_dir: systemd_system_unit_dir
|
||||
)
|
||||
configure_file(input: 'miracle-dispd.service.in',
|
||||
output: 'miracle-dispd.service',
|
||||
configuration: conf_data,
|
||||
install_dir: systemd_system_unit_dir
|
||||
)
|
||||
# create symlinks for DBus activiated services
|
||||
meson.add_install_script('create-symlinks')
|
||||
|
||||
configure_file(input: 'org.freedesktop.miracle.wifi.service.in',
|
||||
output: 'org.freedesktop.miracle.wifi.service',
|
||||
configuration: conf_data,
|
||||
install_dir: dbus_system_services_dir
|
||||
)
|
||||
configure_file(input: 'org.freedesktop.miracle.wfd.service.in',
|
||||
output: 'org.freedesktop.miracle.wfd.service',
|
||||
configuration: conf_data,
|
||||
install_dir: dbus_system_services_dir
|
||||
)
|
||||
install_data(
|
||||
dbus_name_prefix + '.conf',
|
||||
install_dir: join_paths('/', get_option('sysconfdir'), 'dbus-1/system.d')
|
||||
)
|
||||
|
||||
meson.add_install_script('install-scripts', get_option('bindir'))
|
15
res/miracle-dispd.service.in
Normal file
15
res/miracle-dispd.service.in
Normal file
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Miraclecast WiFi Display Service
|
||||
After=dbus.service
|
||||
Requires=miracle-wifid.service
|
||||
After=miracle-wifid.service
|
||||
|
||||
[Service]
|
||||
BusName=@dbus_name_prefix@.wfd
|
||||
Environment=LOG_LEVEL=trace
|
||||
ExecStart=@exec_path@/miracle-dispd
|
||||
KillSignal=SIGKILL
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=dbus-@dbus_name_prefix@.wfd.service
|
16
res/miracle-wifid.service.in
Normal file
16
res/miracle-wifid.service.in
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=Miraclecast WiFi Daemon
|
||||
After=dbus.service
|
||||
Requires=network.target
|
||||
|
||||
[Service]
|
||||
BusName=@dbus_name_prefix@.wifi
|
||||
Environment=PATH=/sbin:/usr/bin
|
||||
ExecStart=@exec_path@/miracle-wifid \
|
||||
--use-dev \
|
||||
--log-level trace \
|
||||
--lazy-managed
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=dbus-@dbus_name_prefix@.wifi.service
|
5
res/org.freedesktop.miracle.wfd.service.in
Normal file
5
res/org.freedesktop.miracle.wfd.service.in
Normal file
|
@ -0,0 +1,5 @@
|
|||
[D-BUS Service]
|
||||
Name=@dbus_name_prefix@.wfd
|
||||
Exec=/bin/sh -c 'LOG_LEVEL=trace @exec_path@/miracle-dispd'
|
||||
User=root
|
||||
SystemdService=dbus-@dbus_name_prefix@.wfd.service
|
5
res/org.freedesktop.miracle.wifi.service.in
Normal file
5
res/org.freedesktop.miracle.wifi.service.in
Normal file
|
@ -0,0 +1,5 @@
|
|||
[D-BUS Service]
|
||||
Name=@dbus_name_prefix@.wifi
|
||||
Exec=/bin/sh -c 'PATH=/sbin:/usr/bin @exec_path@/miracle-wifid --use-dev --log-level trace'
|
||||
User=root
|
||||
SystemdService=dbus-@dbus_name_prefix@.wifi.service
|
Loading…
Add table
Add a link
Reference in a new issue