gpsd: proper usage of prefix and DESTDIR

prefix should always be /usr, and destdir must be passed as DESTDIR,
and in the environment, not as a scons argument. Finally, we pass the
sysroot= argument to scons so that it doesn't add -L/usr/lib
parameters when compiling.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Thomas Petazzoni 2012-07-25 00:01:55 +02:00
parent 30d2b422e5
commit 4c0f75e444

View File

@ -17,8 +17,9 @@ GPSD_SCONS_ENV = $(TARGET_CONFIGURE_OPTS)
GPSD_SCONS_OPTS = \ GPSD_SCONS_OPTS = \
arch=$(ARCH)\ arch=$(ARCH)\
prefix=$(TARGET_DIR)/usr\ prefix=/usr\
chrpath=no\ chrpath=no\
sysroot=$(STAGING_DIR)\
strip=no strip=no
ifeq ($(BR2_PACKAGE_NCURSES),y) ifeq ($(BR2_PACKAGE_NCURSES),y)
@ -207,9 +208,9 @@ endef
define GPSD_INSTALL_TARGET_CMDS define GPSD_INSTALL_TARGET_CMDS
(cd $(@D); \ (cd $(@D); \
$(GPSD_SCONS_ENV) \ $(GPSD_SCONS_ENV) \
DESTDIR=$(TARGET_DIR) \
$(SCONS) \ $(SCONS) \
$(GPSD_SCONS_OPTS) \ $(GPSD_SCONS_OPTS) \
destdir=$(TARGET_DIR) \
install) install)
if [ ! -f $(TARGET_DIR)/etc/init.d/S50gpsd ]; then \ if [ ! -f $(TARGET_DIR)/etc/init.d/S50gpsd ]; then \
$(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd; \ $(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd; \
@ -220,10 +221,9 @@ endef
define GPSD_INSTALL_STAGING_CMDS define GPSD_INSTALL_STAGING_CMDS
(cd $(@D); \ (cd $(@D); \
$(GPSD_SCONS_ENV) \ $(GPSD_SCONS_ENV) \
DESTDIR=$(STAGING_DIR) \
$(SCONS) \ $(SCONS) \
$(GPSD_SCONS_OPTS) \ $(GPSD_SCONS_OPTS) \
destdir=$(STAGING_DIR) \
includedir="$(STAGING_DIR)/usr/include" \
install) install)
endef endef