From b7ff78d6b4c46b2e3e556695f570cb824fa227eb Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 19 Oct 2020 15:28:19 -0700 Subject: [PATCH] libudev-zero: add This is a more actively developed libudev shim. Signed-off-by: Rosen Penev --- libs/libudev-zero/Makefile | 51 +++++++++++++++++++ libs/libudev-zero/patches/010-pkgconfig.patch | 24 +++++++++ 2 files changed, 75 insertions(+) create mode 100644 libs/libudev-zero/Makefile create mode 100644 libs/libudev-zero/patches/010-pkgconfig.patch diff --git a/libs/libudev-zero/Makefile b/libs/libudev-zero/Makefile new file mode 100644 index 0000000000..8bcc66d353 --- /dev/null +++ b/libs/libudev-zero/Makefile @@ -0,0 +1,51 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libudev-zero +PKG_VERSION:=0.4.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/illiliti/libudev-zero/tar.gz/$(PKG_VERSION)? +PKG_HASH:=4b135e16a9720430eda31dce96c1135aaa3db6b5bbccbbf2be94ec1aad7509a8 + +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libudev-zero + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Drop-in replacement for libudev + URL:=https://github.com/illiliti/libudev-zero + DEPENDS:=+libevdev + PROVIDES:=libudev + CONFLICTS:=libudev eudev udev +endef + +MAKE_FLAGS += \ + PREFIX=/usr + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/libudev.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libudev.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libudev.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libudev-zero/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libudev.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libudev-zero)) diff --git a/libs/libudev-zero/patches/010-pkgconfig.patch b/libs/libudev-zero/patches/010-pkgconfig.patch new file mode 100644 index 0000000000..e5d1ddc517 --- /dev/null +++ b/libs/libudev-zero/patches/010-pkgconfig.patch @@ -0,0 +1,24 @@ +--- a/Makefile ++++ b/Makefile +@@ -29,8 +29,7 @@ libudev.so: ${OBJ} + ${CC} ${XCFLAGS} -o $@ ${OBJ} ${XLDFLAGS} + + libudev.pc: libudev.pc.in +- sed -e 's|@libdir@|${LIBDIR}|g' \ +- -e 's|@includedir@|${INCLUDEDIR}|g' \ ++ sed -e 's|@prefix@|${PREFIX}|g' \ + -e 's|@VERSION@|243|g' \ + libudev.pc.in > libudev.pc + +--- a/libudev.pc.in ++++ b/libudev.pc.in +@@ -1,5 +1,7 @@ +-libdir=@libdir@ +-includedir=@includedir@ ++prefix=@prefix@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include + + Name: libudev + Description: Daemonless replacement for libudev -- 2.30.2