Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] gpsd: make init script optional
@ 2013-06-16 11:34 spdawson at gmail.com
  2013-06-16 12:34 ` Maxime Ripard
  2013-06-16 13:09 ` Yann E. MORIN
  0 siblings, 2 replies; 9+ messages in thread
From: spdawson at gmail.com @ 2013-06-16 11:34 UTC (permalink / raw)
  To: buildroot

From: Simon Dawson <spdawson@gmail.com>

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 package/gpsd/Config.in | 7 +++++++
 package/gpsd/gpsd.mk   | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/package/gpsd/Config.in b/package/gpsd/Config.in
index 337f8e7..29e061f 100644
--- a/package/gpsd/Config.in
+++ b/package/gpsd/Config.in
@@ -21,6 +21,13 @@ config BR2_PACKAGE_GPSD_DEVICES
 	default "/dev/ttyS1"
 	depends on BR2_PACKAGE_GPSD
 
+config BR2_PACKAGE_GPSD_INSTALL_INITSCRIPT
+	bool "install init script"
+	default y
+	depends on BR2_PACKAGE_GPSD
+	help
+	  Install a gpsd init script
+
 menu "Features"
 	depends on BR2_PACKAGE_GPSD
 
diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
index be2e681..45d1aed 100644
--- a/package/gpsd/gpsd.mk
+++ b/package/gpsd/gpsd.mk
@@ -207,12 +207,19 @@ define GPSD_INSTALL_TARGET_CMDS
 		$(SCONS) \
 		$(GPSD_SCONS_OPTS) \
 		install)
+endef
+
+define GPSD_INSTALL_INITSCRIPT
 	if [ ! -f $(TARGET_DIR)/etc/init.d/S50gpsd ]; then \
 		$(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd; \
 		$(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd; \
 	fi
 endef
 
+ifeq ($(BR2_PACKAGE_GPSD_INSTALL_INITSCRIPT),y)
+GPSD_POST_INSTALL_TARGET_HOOKS = GPSD_INSTALL_INITSCRIPT
+endif
+
 define GPSD_INSTALL_STAGING_CMDS
 	(cd $(@D); \
 		$(GPSD_SCONS_ENV) \
-- 
1.8.1.2

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

end of thread, other threads:[~2013-06-18  7:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-16 11:34 [Buildroot] [PATCH] gpsd: make init script optional spdawson at gmail.com
2013-06-16 12:34 ` Maxime Ripard
2013-06-16 13:09 ` Yann E. MORIN
2013-06-16 15:59   ` Simon Dawson
2013-06-16 17:37     ` Peter Korsgaard
2013-06-16 18:16       ` Simon Dawson
2013-06-16 18:30     ` Maxime Ripard
2013-06-18  6:24       ` Arnout Vandecappelle
2013-06-18  7:07         ` Thomas Petazzoni

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