You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.8 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=liburing
  3. PKG_VERSION:=0.6
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://git.kernel.dk/cgit/liburing/snapshot
  7. PKG_HASH:=44c99b9f148a885d882acd7aa63658141675eae251298cbf79bb9a4ab307ef9c
  8. PKG_MAINTAINER:=Christian Lachner <gladiac@gmail.com>
  9. PKG_LICENSE:=MIT
  10. PKG_LICENSE_FILES:=COPYING
  11. PKG_INSTALL:=1
  12. PKG_BUILD_PARALLEL:=1
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/liburing
  15. SECTION:=libs
  16. CATEGORY:=Libraries
  17. TITLE:=io_uring library
  18. URL:=https://git.kernel.dk/cgit/liburing
  19. endef
  20. define Package/liburing/description
  21. liburing provides helpers to setup and teardown io_uring instances,
  22. and also a simplified interface for applications that don't need
  23. (or want) to deal with the full kernel side implementation.
  24. For more info on io_uring, please see: https://kernel.dk/io_uring.pdf
  25. endef
  26. CONFIGURE_ARGS:=--prefix=$(CONFIGURE_PREFIX) --cc=${TARGET_CC}
  27. TARGET_CFLAGS += $(if $(CONFIG_USE_MUSL),-Dloff_t=off_t)
  28. define Build/Compile
  29. $(MAKE) $(PKG_BUILD_DIR) \
  30. DSTROOT="$(PKG_INSTALL_DIR)"
  31. endef
  32. define Build/InstallDev
  33. $(INSTALL_DIR) $(1)/usr/include/
  34. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  35. $(INSTALL_DIR) $(1)/usr/lib/
  36. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} $(1)/usr/lib/
  37. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  38. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/liburing.pc $(1)/usr/lib/pkgconfig/
  39. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/liburing.pc
  40. $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/liburing.pc
  41. endef
  42. define Package/liburing/install
  43. $(INSTALL_DIR) $(1)/usr/lib/
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/liburing.so $(PKG_INSTALL_DIR)/usr/lib/liburing.so.* $(1)/usr/lib/
  45. endef
  46. $(eval $(call BuildPackage,liburing))