mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-02 16:07:42 +00:00
libsysfs: convert to the autotools infrastructure
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
503062a355
commit
41d7e35fcf
@ -22,63 +22,8 @@
|
|||||||
# USA
|
# USA
|
||||||
|
|
||||||
LIBSYSFS_VERSION:=2.1.0
|
LIBSYSFS_VERSION:=2.1.0
|
||||||
LIBSYSFS_DIR:=$(BUILD_DIR)/sysfsutils-$(LIBSYSFS_VERSION)
|
|
||||||
LIBSYSFS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/linux-diag
|
LIBSYSFS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/linux-diag
|
||||||
LIBSYSFS_SOURCE:=sysfsutils-$(LIBSYSFS_VERSION).tar.gz
|
LIBSYSFS_SOURCE:=sysfsutils-$(LIBSYSFS_VERSION).tar.gz
|
||||||
LIBSYSFS_CAT:=$(ZCAT)
|
LIBSYSFS_INSTALL_STAGING=YES
|
||||||
|
|
||||||
$(DL_DIR)/$(LIBSYSFS_SOURCE):
|
$(eval $(call AUTOTARGETS,package,libsysfs))
|
||||||
$(call DOWNLOAD,$(LIBSYSFS_SITE),$(LIBSYSFS_SOURCE))
|
|
||||||
|
|
||||||
libsysfs-source: $(DL_DIR)/$(LIBSYSFS_SOURCE)
|
|
||||||
|
|
||||||
$(LIBSYSFS_DIR)/.unpacked: $(DL_DIR)/$(LIBSYSFS_SOURCE)
|
|
||||||
$(LIBSYSFS_CAT) $(DL_DIR)/$(LIBSYSFS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
||||||
$(CONFIG_UPDATE) $(@D)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(LIBSYSFS_DIR)/.configured: $(LIBSYSFS_DIR)/.unpacked
|
|
||||||
(cd $(LIBSYSFS_DIR); rm -rf config.cache; \
|
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
|
||||||
$(TARGET_CONFIGURE_ARGS) \
|
|
||||||
./configure $(QUIET) \
|
|
||||||
--target=$(GNU_TARGET_NAME) \
|
|
||||||
--host=$(GNU_TARGET_NAME) \
|
|
||||||
--build=$(GNU_HOST_NAME) \
|
|
||||||
--prefix=/usr \
|
|
||||||
--sysconfdir=/etc \
|
|
||||||
)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(LIBSYSFS_DIR)/.compiled: $(LIBSYSFS_DIR)/.configured
|
|
||||||
$(MAKE) -C $(LIBSYSFS_DIR)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(STAGING_DIR)/usr/lib/libsysfs.so: $(LIBSYSFS_DIR)/.compiled
|
|
||||||
$(MAKE) -C $(LIBSYSFS_DIR) DESTDIR=$(STAGING_DIR) install
|
|
||||||
$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
|
|
||||||
$(STAGING_DIR)/usr/lib/libsysfs.la
|
|
||||||
touch -c $@
|
|
||||||
|
|
||||||
$(TARGET_DIR)/usr/lib/libsysfs.so: $(STAGING_DIR)/usr/lib/libsysfs.so
|
|
||||||
cp -dpf $(STAGING_DIR)/usr/lib/libsysfs.so* $(TARGET_DIR)/usr/lib/
|
|
||||||
-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libsysfs.so
|
|
||||||
|
|
||||||
libsysfs: $(TARGET_DIR)/usr/lib/libsysfs.so
|
|
||||||
|
|
||||||
libsysfs-clean:
|
|
||||||
-$(MAKE) -C $(LIBSYSFS_DIR) clean
|
|
||||||
-$(MAKE) -C $(LIBSYSFS_DIR) DESTDIR=$(STAGING_DIR) uninstall
|
|
||||||
rm -f $(TARGET_DIR)/usr/lib/libsysfs.so*
|
|
||||||
|
|
||||||
libsysfs-dirclean:
|
|
||||||
rm -rf $(LIBSYSFS_DIR)
|
|
||||||
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
# Toplevel Makefile options
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
ifeq ($(BR2_PACKAGE_LIBSYSFS),y)
|
|
||||||
TARGETS+=libsysfs
|
|
||||||
endif
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user