build: setup all data (polkit, icon, dbus...) in the same `data' directory

Also fixed dist when not using polkit, the icon was no longer included in the
tarball.
This commit is contained in:
Aleksander Morgado
2011-11-22 13:36:48 +01:00
parent 6b69605633
commit 8d97538c72
9 changed files with 63 additions and 59 deletions

View File

@@ -1,40 +1,4 @@
SUBDIRS = . marshallers build-aux data include libmm-common libqcdm libwmc src plugins introspection po test docs
SUBDIRS = . marshallers build-aux include libmm-common libqcdm libwmc src plugins introspection po test docs
if WITH_POLKIT
SUBDIRS += policy
endif
dbusservicedir = $(DBUS_SYS_DIR)
dbusservice_DATA = org.freedesktop.ModemManager.conf
dbusservice_file_polkit = org.freedesktop.ModemManager.conf.polkit
dbusservice_file_nopolkit = org.freedesktop.ModemManager.conf.nopolkit
if WITH_POLKIT
org.freedesktop.ModemManager.conf: $(top_srcdir)/$(dbusservice_file_polkit)
cp -f $(top_srcdir)/$(dbusservice_file_polkit) $(dbusservice_DATA)
else
org.freedesktop.ModemManager.conf: $(top_srcdir)/$(dbusservice_file_nopolkit)
cp -f $(top_srcdir)/$(dbusservice_file_nopolkit) $(dbusservice_DATA)
endif
dbusactivationdir = $(datadir)/dbus-1/system-services
dbusactivation_in_files = org.freedesktop.ModemManager.service.in
dbusactivation_DATA = $(dbusactivation_in_files:.service.in=.service)
%service: %service.in
$(edit) $< >$@
XMLS = $(wildcard introspection/*.xml)
xmldir = $(datadir)/dbus-1/interfaces
xml_DATA = $(filter-out introspection/all.xml introspection/org.freedesktop.DBus.Properties.xml, $(XMLS))
edit = @sed \
-e 's|@sbindir[@]|$(sbindir)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@libexecdir[@]|$(libexecdir)|g'
DISTCHECK_CONFIGURE_FLAGS = \ DISTCHECK_CONFIGURE_FLAGS = \
--with-udev-base-dir="$$dc_install_base" \ --with-udev-base-dir="$$dc_install_base" \
@@ -47,17 +11,12 @@ INTLTOOL_FILES = \
intltool-update.in intltool-update.in
DISTCLEANFILES = \ DISTCLEANFILES = \
$(dbusactivation_DATA) \
$(dbusservice_DATA) \
intltool-extract \ intltool-extract \
intltool-merge \ intltool-merge \
intltool-update \ intltool-update \
po/.intltool-merge-cache po/.intltool-merge-cache
EXTRA_DIST = \ EXTRA_DIST = \
$(dbusactivation_in_files) \ $(INTLTOOL_FILES)
$(INTLTOOL_FILES) \
$(dbusservice_file_polkit) \
$(dbusservice_file_nopolkit)
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4

View File

@@ -173,6 +173,7 @@ AM_CONDITIONAL(WMC_STANDALONE, test "yes" = "no")
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
marshallers/Makefile marshallers/Makefile
data/Makefile
include/Makefile include/Makefile
build-aux/Makefile build-aux/Makefile
libmm-common/Makefile libmm-common/Makefile
@@ -188,7 +189,6 @@ plugins/Makefile
test/Makefile test/Makefile
introspection/Makefile introspection/Makefile
po/Makefile.in po/Makefile.in
policy/Makefile
docs/Makefile docs/Makefile
docs/man/Makefile docs/man/Makefile
docs/man/modem-manager.8 docs/man/modem-manager.8

60
data/Makefile.am Normal file
View File

@@ -0,0 +1,60 @@
# DBus Service file
dbusservicedir = $(DBUS_SYS_DIR)
dbusservice_DATA = org.freedesktop.ModemManager.conf
dbusservice_file_polkit = org.freedesktop.ModemManager.conf.polkit
dbusservice_file_nopolkit = org.freedesktop.ModemManager.conf.nopolkit
if WITH_POLKIT
org.freedesktop.ModemManager.conf: $(top_srcdir)/data/$(dbusservice_file_polkit)
cp -f $(top_srcdir)/data/$(dbusservice_file_polkit) $(dbusservice_DATA)
else
org.freedesktop.ModemManager.conf: $(top_srcdir)/data/$(dbusservice_file_nopolkit)
cp -f $(top_srcdir)/data/$(dbusservice_file_nopolkit) $(dbusservice_DATA)
endif
# DBus Activation file
edit = @sed \
-e 's|@sbindir[@]|$(sbindir)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@libexecdir[@]|$(libexecdir)|g'
dbusactivationdir = $(datadir)/dbus-1/system-services
dbusactivation_in_files = org.freedesktop.ModemManager.service.in
dbusactivation_DATA = $(dbusactivation_in_files:.service.in=.service)
%service: %service.in
$(edit) $< >$@
# DBus Introspection files
XMLS = $(wildcard $(top_srcdir)/introspection/*.xml)
xmldir = $(datadir)/dbus-1/interfaces
xml_DATA = $(filter-out $(top_srcdir)/introspection/all.xml, $(XMLS))
# Icon
icondir=${datadir}/icons/hicolor/22x22/apps
icon_DATA = modem-manager.png
# Polkit
dist_polkit_policy_in_files = org.freedesktop.modem-manager.policy.in
if WITH_POLKIT
polkit_policydir = $(datadir)/polkit-1/actions
dist_polkit_policy_DATA = $(dist_polkit_policy_in_files:.policy.in=.policy)
@INTLTOOL_POLICY_RULE@
endif
DISTCLEANFILES = \
$(dbusactivation_DATA) \
$(dbusservice_DATA)
EXTRA_DIST = \
$(dbusactivation_in_files) \
$(dbusservice_file_polkit) \
$(dbusservice_file_nopolkit) \
$(icon_DATA) \
$(dist_polkit_policy_in_files)

View File

Before

Width:  |  Height:  |  Size: 817 B

After

Width:  |  Height:  |  Size: 817 B

View File

@@ -1,15 +0,0 @@
icondir=${datadir}/icons/hicolor/22x22/apps
icon_DATA = modem-manager.png
polkit_policydir = $(datadir)/polkit-1/actions
dist_polkit_policy_in_files = org.freedesktop.modem-manager.policy.in
dist_polkit_policy_DATA = $(dist_polkit_policy_in_files:.policy.in=.policy)
@INTLTOOL_POLICY_RULE@
clean-local :
rm -f *~
EXTRA_DIST = $(dist_polkit_policy_in_files) $(icon_DATA)