Skip to content

Commit

Permalink
dbus-related files taken from directories and renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebrady committed Nov 12, 2017
1 parent f5248a2 commit d4eae76
Show file tree
Hide file tree
Showing 14 changed files with 274 additions and 95 deletions.
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/INSTALL
/shairport-sync
/shairport-sync.exe
/shairport-sync-dbus-test-client

*.o
/*~
*.xml~
Expand All @@ -26,12 +28,8 @@ scripts/shairport-sync
shairport-sync.core

#Some dbus files that are automatically generated
dbus/data/org.gnome.ShairportSync.service
dbus/src/shairport-sync-dbus-client
dbus/src/shairport-sync-dbus-interface.c
dbus/src/shairport-sync-dbus-interface.h
dbus/src/shairport-sync-dbus-service.c
dbus/src/shairport-sync-dbus-service.h
/org.gnome.ShairportSync.service
/shairport-sync-dbus-interface.*

# Some eclipse project files
.cproject
Expand Down
53 changes: 42 additions & 11 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
SUBDIRS = man

if USE_DBUS
SUBDIRS += dbus/src dbus/data
else
if USE_DBUS_CLIENT
SUBDIRS += dbus/src dbus/data
endif
endif

bin_PROGRAMS = shairport-sync

if USE_DBUS_CLIENT
noinst_PROGRAMS = dbus/src/shairport-sync-dbus-client
noinst_PROGRAMS = shairport-sync-dbus-test-client
endif

shairport_sync_SOURCES = shairport.c rtsp.c mdns.c mdns_external.c common.c rtp.c player.c alac.c audio.c loudness.c
Expand Down Expand Up @@ -82,7 +74,46 @@ shairport_sync_SOURCES += mdns_dns_sd.c
endif

if USE_DBUS
shairport_sync_SOURCES += dbus/src/shairport-sync-dbus-service.c dbus/src/shairport-sync-dbus-interface.c dacp.c
shairport_sync_SOURCES += shairport-sync-dbus-service.c shairport-sync-dbus-interface.c dacp.c
endif

if USE_DBUS_CLIENT
shairport_sync_dbus_test_client_SOURCES = shairport-sync-dbus-interface.c shairport-sync-dbus-interface.h shairport-sync-dbus-test-client.c
endif

if USE_DBUS
BUILT_SOURCES = shairport-sync-dbus-interface.h shairport-sync-dbus-interface.c org.gnome.ShairportSync.service
# We don't want to install this header
noinst_HEADERS = $(BUILT_SOURCES)

# Correctly clean the generated headers, but keep the xml description
CLEANFILES = $(BUILT_SOURCES)
#EXTRA_DIST = org.gnome.ShairportSync.xml

#Rule to generate the binding headers
shairport-sync-dbus-interface.h: org.gnome.ShairportSync.xml
gdbus-codegen --interface-prefix org.gnome --generate-c-code shairport-sync-dbus-interface org.gnome.ShairportSync.xml

shairport-sync-dbus-interface.c: org.gnome.ShairportSync.xml
gdbus-codegen --interface-prefix org.gnome --generate-c-code shairport-sync-dbus-interface org.gnome.ShairportSync.xml

# Dbus service file

interfacesdir = $(DESTDIR)/usr/local/share/dbus-1/interfaces
interfaces_DATA = org.gnome.ShairportSync.xml

servicedir = $(DESTDIR)/usr/local/share/dbus-1/services
service_in_files = org.gnome.ShairportSync.service.in
service_DATA = $(service_in_files:.service.in=.service)
EXTRA_DIST = $(service_in_files) org.gnome.ShairportSync.xml

# Rule to make the service file with bindir expanded
$(service_DATA): $(service_in_files) Makefile
@sed -e "s|\@bindir\@|$(bindir)|" $? > $@

clean-local:
rm -rf $(service_DATA)

endif

install-exec-hook:
Expand All @@ -91,7 +122,7 @@ if INSTALL_CONFIG_FILES
cp scripts/shairport-sync.conf $(DESTDIR)$(sysconfdir)/shairport-sync.conf.sample
[ -f $(DESTDIR)$(sysconfdir)/shairport-sync.conf ] || cp scripts/shairport-sync.conf $(DESTDIR)$(sysconfdir)/shairport-sync.conf
if USE_DBUS
cp dbus/config/system-bus-policy/shairport-sync.conf $(DESTDIR)$(sysconfdir)/dbus-1/system.d/shairport-sync.conf
cp shairport-sync-dbus-policy.conf $(DESTDIR)$(sysconfdir)/dbus-1/system.d/shairport-sync.conf
endif
endif
if INSTALL_SYSTEMV
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,6 @@ AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_CHECK_FUNCS([atexit clock_gettime gethostname inet_ntoa memchr memmove memset mkfifo pow select socket stpcpy strcasecmp strchr strdup strerror strstr strtol strtoul])

AC_CONFIG_FILES([Makefile man/Makefile dbus/src/Makefile dbus/data/Makefile scripts/shairport-sync.service])
AC_CONFIG_FILES([Makefile man/Makefile scripts/shairport-sync.service])
AC_CONFIG_FILES([scripts/shairport-sync],[chmod +x scripts/shairport-sync])
AC_OUTPUT
16 changes: 0 additions & 16 deletions dbus/data/Makefile.am

This file was deleted.

32 changes: 0 additions & 32 deletions dbus/sample dbus-send calls

This file was deleted.

26 changes: 0 additions & 26 deletions dbus/src/Makefile.am

This file was deleted.

File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions player.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@

#ifdef HAVE_DBUS
#include "dacp.h"
#include "dbus/src/shairport-sync-dbus-interface.h"
#include "dbus/src/shairport-sync-dbus-service.h"
#include "shairport-sync-dbus-interface.h"
#include "shairport-sync-dbus-service.h"
#endif

#include "common.h"
Expand Down
File renamed without changes.
Loading

0 comments on commit d4eae76

Please sign in to comment.