Browse Source

libudev-zero: add

This is a more actively developed libudev shim.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 4 years ago
committed by Daniel Golle
parent
commit
b7ff78d6b4
2 changed files with 75 additions and 0 deletions
  1. +51
    -0
      libs/libudev-zero/Makefile
  2. +24
    -0
      libs/libudev-zero/patches/010-pkgconfig.patch

+ 51
- 0
libs/libudev-zero/Makefile View File

@ -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 <daniel@makrotopia.org>
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))

+ 24
- 0
libs/libudev-zero/patches/010-pkgconfig.patch View File

@ -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

Loading…
Cancel
Save