libfm-qt

Qt port of libfm, a library providing components to build desktop file managers

runtime dependencies libexif (Libraries/Graphics)
qt5x11extras (Graphic libraries and applications/Other GUIs)
menu-cache (Libraries/Graphics)
gvfs Hardware handling/Firmware)
make dependencies lxqt-build-tools
qt5tools
libmenu-cache-dev
libexif-dev
apt install libmenu-cache-dev libexif-dev
mkdir /data/buildroot/package/libfm-qt
cat > /data/buildroot/package/libfm-qt/Config.in<< 'EOF'
config BR2_PACKAGE_LIBFM_QT
        bool "libfm-qt"
        depends on BR2_PACKAGE_GVFS
        depends on BR2_PACKAGE_LIBEXIF
        depends on BR2_PACKAGE_MENU_CACHE
        depends on BR2_PACKAGE_QT5X11EXTRAS
        depends on BR2_PACKAGE_QT5TOOLS
        depends on BR2_PACKAGE_LXQT_BUILD_TOOLS
        help
          Qt port of libfm, a library providing components to build desktop file managers
EOF

cat > /data/buildroot/package/libfm-qt/libfm-qt.mk<< 'EOF'
#############################################################
#
# libfm-qt
#https://github.com/lxqt/libfm-qt/archive/refs/tags/1.1.0.tar.gz
#############################################################
LIBFM_QT_VERSION = 1.1.0
LIBFM_QT_SOURCE  = $(LIBFM_QT_VERSION).tar.gz
LIBFM_QT_SITE    = https://github.com/lxqt/libfm-qt/archive/refs/tags

LIBFM_QT_DEPENDENCIES = gvfs libexif menu-cache qt5x11extras qt5tools lxqt-build-tools
LIBFM_QT_INSTALL_TARGET = YES
LIBFM_QT_SUPPORTS_IN_SOURCE_BUILD = NO 
    
LIBFM_QT_CONF_OPTS = -DCMAKE_TOOLCHAIN_FILE=$(HOST_DIR)/share/buildroot/toolchainfile.cmake \
    -Dlxqt-build-tools_DIR=$(TARGET-DIR)/usr/share/cmake/lxqt-build-tools \
    -DCMAKE_INSTALL_PREFIX=/usr
    
define LIBFM_QT_CONFIGURE_CMDS
  if [[ ! -L "$(HOST_DIR)/usr/lib/libpcre.so.3" ]]; then ln -s $(HOST_DIR)/usr/lib/libpcre.so $(HOST_DIR)/usr/lib/libpcre.so.3; fi
  if [[ ! -d $(@D)/buildroot-build ]]; then mkdir $(@D)/buildroot-build; fi
  cd $(@D)/buildroot-build && \
  LDFLAGS="$(LDFLAGS) -pthread -Wl,--as-needed -Wl,--allow-shlib-undefined" cmake "$(@D)/" $(LIBFM_QT_CONF_OPTS)
endef

$(eval $(cmake-package))
EOF

sed -i '/menu "Custom packages"/a source "package/libfm-qt/Config.in"' /data/buildroot/package/Config.in