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.

56 lines
1.7 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=libwslay
  3. PKG_VERSION:=1.1.0
  4. PKG_RELEASE=1
  5. PKG_SOURCE:=release-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://codeload.github.com/tatsuhiro-t/wslay/tar.gz/release-$(PKG_VERSION)?
  7. PKG_HASH:=df5dca9f03614073cd8bdd22aa3c9b116f841ed3120b2d4463d2382cc44fc594
  8. PKG_BUILD_DIR:=$(BUILD_DIR)/wslay-release-$(PKG_VERSION)
  9. PKG_MAINTAINER:=James Taylor <james@jtaylor.id.au>
  10. PKG_LICENSE:=MIT
  11. PKG_LICENSE_FILES:=COPYING
  12. PKG_BUILD_PARALLEL:=1
  13. PKG_INSTALL:=1
  14. PKG_FIXUP:=autoreconf
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/libwslay
  17. SECTION:=libs
  18. CATEGORY:=Libraries
  19. TITLE:=Wslay is a WebSocket library written in C
  20. URL:=https://tatsuhiro-t.github.io/wslay/
  21. endef
  22. define Package/libwslay/description
  23. Wslay is a WebSocket library written in C. It implements the protocol version 13 described
  24. in RFC 6455. This library offers 2 levels of API: event-based API and frame-based low-level
  25. API. For event-based API, it is suitable for non-blocking reactor pattern style. You can set
  26. callbacks in various events. For frame-based API, you can send WebSocket frame directly.
  27. Wslay only supports data transfer part of WebSocket protocol and does not perform opening
  28. handshake in HTTP.
  29. endef
  30. define Build/InstallDev
  31. $(INSTALL_DIR) $(1)/usr/include/wslay
  32. $(CP) $(PKG_INSTALL_DIR)/usr/include/wslay/*.h $(1)/usr/include/wslay/
  33. $(INSTALL_DIR) $(1)/usr/lib
  34. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwslay.{a,so*} $(1)/usr/lib/
  35. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  36. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libwslay.pc $(1)/usr/lib/pkgconfig/
  37. endef
  38. define Package/libwslay/install
  39. $(INSTALL_DIR) $(1)/usr/lib
  40. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libwslay.so* $(1)/usr/lib/
  41. endef
  42. $(eval $(call BuildPackage,libwslay))