|
@@ -25,7 +25,8 @@ GPSD_SCONS_OPTS = \
|
|
strip=no \
|
|
strip=no \
|
|
python=no \
|
|
python=no \
|
|
qt=no \
|
|
qt=no \
|
|
- ntpshm=yes
|
|
|
|
|
|
+ ntpshm=yes \
|
|
|
|
+ systemd=$(if $(BR2_INIT_SYSTEMD),yes,no)
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NCURSES),y)
|
|
ifeq ($(BR2_PACKAGE_NCURSES),y)
|
|
GPSD_DEPENDENCIES += ncurses
|
|
GPSD_DEPENDENCIES += ncurses
|
|
@@ -214,7 +215,7 @@ define GPSD_INSTALL_TARGET_CMDS
|
|
DESTDIR=$(TARGET_DIR) \
|
|
DESTDIR=$(TARGET_DIR) \
|
|
$(HOST_DIR)/bin/python2 $(SCONS) \
|
|
$(HOST_DIR)/bin/python2 $(SCONS) \
|
|
$(GPSD_SCONS_OPTS) \
|
|
$(GPSD_SCONS_OPTS) \
|
|
- install)
|
|
|
|
|
|
+ $(if $(BR2_PACKAGE_HAS_UDEV),udev-install,install))
|
|
endef
|
|
endef
|
|
|
|
|
|
define GPSD_INSTALL_INIT_SYSV
|
|
define GPSD_INSTALL_INIT_SYSV
|
|
@@ -222,6 +223,14 @@ define GPSD_INSTALL_INIT_SYSV
|
|
$(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd
|
|
$(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd
|
|
endef
|
|
endef
|
|
|
|
|
|
|
|
+# systemd unit files are installed automatically, but need to update the
|
|
|
|
+# /usr/local path references in the provided files to /usr.
|
|
|
|
+define GPSD_INSTALL_INIT_SYSTEMD
|
|
|
|
+ $(SED) 's%/usr/local%/usr%' \
|
|
|
|
+ $(TARGET_DIR)/usr/lib/systemd/system/gpsd.service \
|
|
|
|
+ $(TARGET_DIR)/usr/lib/systemd/system/gpsdctl@.service
|
|
|
|
+endef
|
|
|
|
+
|
|
define GPSD_INSTALL_STAGING_CMDS
|
|
define GPSD_INSTALL_STAGING_CMDS
|
|
(cd $(@D); \
|
|
(cd $(@D); \
|
|
$(GPSD_SCONS_ENV) \
|
|
$(GPSD_SCONS_ENV) \
|
|
@@ -231,16 +240,10 @@ define GPSD_INSTALL_STAGING_CMDS
|
|
install)
|
|
install)
|
|
endef
|
|
endef
|
|
|
|
|
|
-# After installing the udev rule, make it writable so that this
|
|
|
|
|
|
+# After the udev rule is installed, make it writable so that this
|
|
# package can be re-built/re-installed.
|
|
# package can be re-built/re-installed.
|
|
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
|
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
|
define GPSD_INSTALL_UDEV_RULES
|
|
define GPSD_INSTALL_UDEV_RULES
|
|
- (cd $(@D); \
|
|
|
|
- $(GPSD_SCONS_ENV) \
|
|
|
|
- DESTDIR=$(TARGET_DIR) \
|
|
|
|
- $(HOST_DIR)/bin/python2 $(SCONS) \
|
|
|
|
- $(GPSD_SCONS_OPTS) \
|
|
|
|
- udev-install)
|
|
|
|
chmod u+w $(TARGET_DIR)/lib/udev/rules.d/25-gpsd.rules
|
|
chmod u+w $(TARGET_DIR)/lib/udev/rules.d/25-gpsd.rules
|
|
endef
|
|
endef
|
|
|
|
|