Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/3] build: Rename configfiles option to datafiles
@ 2011-07-02  3:35 Lucas De Marchi
  2011-07-02  3:35 ` [PATCH 2/3] build: Remove udevrules option Lucas De Marchi
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lucas De Marchi @ 2011-07-02  3:35 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

Instead of passing --[disable|enable]-configfiles, now we use
--[disable|enable]-datafiles as not all of the files are installed for
configuration but are rather data files.
---
 Makefile.am    |    6 +++---
 Makefile.tools |    2 +-
 acinclude.m4   |    8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e320105..2268890 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,7 @@ includedir = @includedir@/bluetooth
 
 include_HEADERS =
 
-if CONFIGFILES
+if DATAFILES
 dbusdir = $(sysconfdir)/dbus-1/system.d
 
 dbus_DATA = src/bluetooth.conf
@@ -270,7 +270,7 @@ CLEANFILES += $(builtin_files)
 
 man_MANS = src/bluetoothd.8
 
-if CONFIGFILES
+if DATAFILES
 conf_DATA += src/main.conf
 endif
 
@@ -301,7 +301,7 @@ audio_libasound_module_ctl_bluetooth_la_LDFLAGS = -module -avoid-version #-expor
 audio_libasound_module_ctl_bluetooth_la_LIBADD = lib/libbluetooth.la @ALSA_LIBS@
 audio_libasound_module_ctl_bluetooth_la_CFLAGS = @ALSA_CFLAGS@
 
-if CONFIGFILES
+if DATAFILES
 alsaconfdir = $(datadir)/alsa
 
 alsaconf_DATA = audio/bluetooth.conf
diff --git a/Makefile.tools b/Makefile.tools
index bec10b5..1cd8c9e 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -1,6 +1,6 @@
 
 if TOOLS
-if CONFIGFILES
+if DATAFILES
 conf_DATA += tools/rfcomm.conf
 endif
 
diff --git a/acinclude.m4 b/acinclude.m4
index a37959a..089d775 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -206,7 +206,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 	hid2hci_enable=no
 	dfutool_enable=no
 	udevrules_enable=yes
-	configfiles_enable=yes
+	datafiles_enable=yes
 	telephony_driver=dummy
 	maemo6_enable=no
 	sap_driver=dummy
@@ -325,8 +325,8 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 		udevrules_enable=${enableval}
 	])
 
-	AC_ARG_ENABLE(configfiles, AC_HELP_STRING([--enable-configfiles], [install Bluetooth configuration files]), [
-		configfiles_enable=${enableval}
+	AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--enable-datafiles], [install Bluetooth configuration and data files]), [
+		datafiles_enable=${enableval}
 	])
 
 	AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable compiling with debugging information]), [
@@ -403,7 +403,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 	AM_CONDITIONAL(HID2HCI, test "${hid2hci_enable}" = "yes" && test "${usb_found}" = "yes" && test "${udev_found}" = "yes")
 	AM_CONDITIONAL(DFUTOOL, test "${dfutool_enable}" = "yes" && test "${usb_found}" = "yes")
 	AM_CONDITIONAL(UDEVRULES, test "${udevrules_enable}" = "yes")
-	AM_CONDITIONAL(CONFIGFILES, test "${configfiles_enable}" = "yes")
+	AM_CONDITIONAL(DATAFILES, test "${datafiles_enable}" = "yes")
 	AM_CONDITIONAL(MAEMO6PLUGIN, test "${maemo6_enable}" = "yes")
 	AM_CONDITIONAL(DBUSOOBPLUGIN, test "${dbusoob_enable}" = "yes")
 ])
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] build: Remove udevrules option
  2011-07-02  3:35 [PATCH 1/3] build: Rename configfiles option to datafiles Lucas De Marchi
@ 2011-07-02  3:35 ` Lucas De Marchi
  2011-07-02  3:50   ` Marcel Holtmann
  2011-07-02  3:35 ` [PATCH 3/3] build: Add support for systemd service configuration Lucas De Marchi
  2011-07-02  3:50 ` [PATCH 1/3] build: Rename configfiles option to datafiles Marcel Holtmann
  2 siblings, 1 reply; 7+ messages in thread
From: Lucas De Marchi @ 2011-07-02  3:35 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

Use the new datafiles options instead.
---
 Makefile.am  |   14 ++++++--------
 acinclude.m4 |    6 ------
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 2268890..cb3ae91 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -336,7 +336,7 @@ EXTRA_DIST += audio/bluetooth.conf
 
 include Makefile.tools
 
-if UDEVRULES
+if DATAFILES
 rulesdir = @UDEV_DIR@/rules.d
 
 udev_files = scripts/bluetooth.rules
@@ -346,7 +346,11 @@ udev_files += scripts/bluetooth-hid2hci.rules
 endif
 
 if PCMCIA
+udevdir = @UDEV_DIR@
+
 udev_files += scripts/bluetooth-serial.rules
+
+dist_udev_SCRIPTS = scripts/bluetooth_serial
 endif
 
 rules_DATA = $(foreach file,$(udev_files), scripts/97-$(notdir $(file)))
@@ -357,12 +361,6 @@ CLEANFILES += $(rules_DATA)
 EXTRA_DIST += scripts/bluetooth.rules \
 		scripts/bluetooth-hid2hci.rules scripts/bluetooth-serial.rules
 
-if PCMCIA
-udevdir = @UDEV_DIR@
-
-dist_udev_SCRIPTS = scripts/bluetooth_serial
-endif
-
 EXTRA_DIST += doc/manager-api.txt \
 		doc/adapter-api.txt doc/device-api.txt \
 		doc/service-api.txt doc/agent-api.txt doc/attribute-api.txt \
@@ -388,7 +386,7 @@ pkgconfigdir = $(libdir)/pkgconfig
 
 pkgconfig_DATA = bluez.pc
 
-DISTCHECK_CONFIGURE_FLAGS = --disable-udevrules
+DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles
 
 DISTCLEANFILES = $(pkgconfig_DATA)
 
diff --git a/acinclude.m4 b/acinclude.m4
index 089d775..67ee1a4 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -205,7 +205,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 	pcmcia_enable=no
 	hid2hci_enable=no
 	dfutool_enable=no
-	udevrules_enable=yes
 	datafiles_enable=yes
 	telephony_driver=dummy
 	maemo6_enable=no
@@ -321,10 +320,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 		test_enable=${enableval}
 	])
 
-	AC_ARG_ENABLE(udevrules, AC_HELP_STRING([--enable-udevrules], [install Bluetooth udev rules]), [
-		udevrules_enable=${enableval}
-	])
-
 	AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--enable-datafiles], [install Bluetooth configuration and data files]), [
 		datafiles_enable=${enableval}
 	])
@@ -402,7 +397,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 	AM_CONDITIONAL(PCMCIA, test "${pcmcia_enable}" = "yes")
 	AM_CONDITIONAL(HID2HCI, test "${hid2hci_enable}" = "yes" && test "${usb_found}" = "yes" && test "${udev_found}" = "yes")
 	AM_CONDITIONAL(DFUTOOL, test "${dfutool_enable}" = "yes" && test "${usb_found}" = "yes")
-	AM_CONDITIONAL(UDEVRULES, test "${udevrules_enable}" = "yes")
 	AM_CONDITIONAL(DATAFILES, test "${datafiles_enable}" = "yes")
 	AM_CONDITIONAL(MAEMO6PLUGIN, test "${maemo6_enable}" = "yes")
 	AM_CONDITIONAL(DBUSOOBPLUGIN, test "${dbusoob_enable}" = "yes")
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] build: Add support for systemd service configuration
  2011-07-02  3:35 [PATCH 1/3] build: Rename configfiles option to datafiles Lucas De Marchi
  2011-07-02  3:35 ` [PATCH 2/3] build: Remove udevrules option Lucas De Marchi
@ 2011-07-02  3:35 ` Lucas De Marchi
  2011-07-02  3:51   ` Marcel Holtmann
  2011-07-02  3:50 ` [PATCH 1/3] build: Rename configfiles option to datafiles Marcel Holtmann
  2 siblings, 1 reply; 7+ messages in thread
From: Lucas De Marchi @ 2011-07-02  3:35 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

---
 .gitignore               |    1 +
 Makefile.am              |    6 ++++++
 configure.ac             |   11 ++++++++++-
 src/bluetooth.service.in |   12 ++++++++++++
 4 files changed, 29 insertions(+), 1 deletions(-)
 create mode 100644 src/bluetooth.service.in

diff --git a/.gitignore b/.gitignore
index 2ef7cb5..2ce99e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -93,3 +93,4 @@ doc/version.xml
 doc/xml
 doc/html
 src/bluetoothd.8
+src/bluetooth.service
diff --git a/Makefile.am b/Makefile.am
index cb3ae91..15216cd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,12 @@ conf_DATA =
 statedir = $(localstatedir)/lib/bluetooth
 
 state_DATA =
+
+if SYSTEMD
+systemdunitdir = @SYSTEMD_UNITDIR@
+
+systemdunit_DATA = src/bluetooth.service
+endif
 endif
 
 plugindir = $(libdir)/bluetooth/plugins
diff --git a/configure.ac b/configure.ac
index 223c9d1..926a647 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,5 +61,14 @@ if (test "${enable_capng}" = "yes"); then
 	AC_DEFINE(HAVE_CAPNG, 1, [Define to 1 if you have capabilities library.])
 fi
 
+AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR],
+	[path to systemd system service directory]), [path_systemdunit=${withval}],
+		[path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
+if (test -n "${path_systemdunit}"); then
+	SYSTEMD_UNITDIR="${path_systemdunit}"
+	AC_SUBST(SYSTEMD_UNITDIR)
+fi
+AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
+
 AC_OUTPUT(Makefile scripts/bluetooth.rules doc/version.xml
-					src/bluetoothd.8 bluez.pc)
+			src/bluetoothd.8 src/bluetooth.service bluez.pc)
diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in
new file mode 100644
index 0000000..02b6707
--- /dev/null
+++ b/src/bluetooth.service.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=Bluetooth service
+After=syslog.target
+
+[Service]
+Type=dbus
+BusName=org.bluez
+ExecStart=@prefix@/sbin/bluetoothd -n
+StandardOutput=syslog
+
+[Install]
+WantedBy=bluetooth.target
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] build: Rename configfiles option to datafiles
  2011-07-02  3:35 [PATCH 1/3] build: Rename configfiles option to datafiles Lucas De Marchi
  2011-07-02  3:35 ` [PATCH 2/3] build: Remove udevrules option Lucas De Marchi
  2011-07-02  3:35 ` [PATCH 3/3] build: Add support for systemd service configuration Lucas De Marchi
@ 2011-07-02  3:50 ` Marcel Holtmann
  2011-07-02  3:53   ` Lucas De Marchi
  2 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2011-07-02  3:50 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-bluetooth

Hi Lucas,

> Instead of passing --[disable|enable]-configfiles, now we use
> --[disable|enable]-datafiles as not all of the files are installed for
> configuration but are rather data files.
> ---
>  Makefile.am    |    6 +++---
>  Makefile.tools |    2 +-
>  acinclude.m4   |    8 ++++----
>  3 files changed, 8 insertions(+), 8 deletions(-)

patch has been applied, but you forgot bootstrap-configure. I fixed that
one for you.

Regards

Marcel



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] build: Remove udevrules option
  2011-07-02  3:35 ` [PATCH 2/3] build: Remove udevrules option Lucas De Marchi
@ 2011-07-02  3:50   ` Marcel Holtmann
  0 siblings, 0 replies; 7+ messages in thread
From: Marcel Holtmann @ 2011-07-02  3:50 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-bluetooth

Hi Lucas,

> Use the new datafiles options instead.
> ---
>  Makefile.am  |   14 ++++++--------
>  acinclude.m4 |    6 ------
>  2 files changed, 6 insertions(+), 14 deletions(-)

patch has been applied.

Regards

Marcel



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] build: Add support for systemd service configuration
  2011-07-02  3:35 ` [PATCH 3/3] build: Add support for systemd service configuration Lucas De Marchi
@ 2011-07-02  3:51   ` Marcel Holtmann
  0 siblings, 0 replies; 7+ messages in thread
From: Marcel Holtmann @ 2011-07-02  3:51 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-bluetooth

Hi Lucas,

>  .gitignore               |    1 +
>  Makefile.am              |    6 ++++++
>  configure.ac             |   11 ++++++++++-
>  src/bluetooth.service.in |   12 ++++++++++++
>  4 files changed, 29 insertions(+), 1 deletions(-)
>  create mode 100644 src/bluetooth.service.in

patch has been applied. Thanks.

Regards

Marcel



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] build: Rename configfiles option to datafiles
  2011-07-02  3:50 ` [PATCH 1/3] build: Rename configfiles option to datafiles Marcel Holtmann
@ 2011-07-02  3:53   ` Lucas De Marchi
  0 siblings, 0 replies; 7+ messages in thread
From: Lucas De Marchi @ 2011-07-02  3:53 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,


On Sat, Jul 2, 2011 at 12:50 AM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Lucas,
>
>> Instead of passing --[disable|enable]-configfiles, now we use
>> --[disable|enable]-datafiles as not all of the files are installed for
>> configuration but are rather data files.
>> ---
>>  Makefile.am    |    6 +++---
>>  Makefile.tools |    2 +-
>>  acinclude.m4   |    8 ++++----
>>  3 files changed, 8 insertions(+), 8 deletions(-)
>
> patch has been applied, but you forgot bootstrap-configure. I fixed that
> one for you.

Ohh, right. I ran all the possible tests and forgot the most basic one :-)

Thanks a lot.

regards,

Lucas De Marchi

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-07-02  3:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-02  3:35 [PATCH 1/3] build: Rename configfiles option to datafiles Lucas De Marchi
2011-07-02  3:35 ` [PATCH 2/3] build: Remove udevrules option Lucas De Marchi
2011-07-02  3:50   ` Marcel Holtmann
2011-07-02  3:35 ` [PATCH 3/3] build: Add support for systemd service configuration Lucas De Marchi
2011-07-02  3:51   ` Marcel Holtmann
2011-07-02  3:50 ` [PATCH 1/3] build: Rename configfiles option to datafiles Marcel Holtmann
2011-07-02  3:53   ` Lucas De Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox