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.

91 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2014-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libseccomp
  9. PKG_VERSION:=2.4.2
  10. PKG_RELEASE:=2
  11. PKG_USE_MIPS16:=0
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/
  14. PKG_HASH:=b54f27b53884caacc932e75e6b44304ac83586e2abe7a83eca6daecc5440585b
  15. PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
  16. PKG_CPE_ID:=cpe:/a:libseccomp_project:libseccomp
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=1
  19. PKG_LIBTOOL_PATHS:=. lib
  20. PKG_CONFIG_DEPENDS:= \
  21. CONFIG_KERNEL_SECCOMP
  22. include $(INCLUDE_DIR)/package.mk
  23. # This is done instead of DEPENDS:=@!arc to avoid a recursive dependency when
  24. # the library is conditionally selected by util/lxc.
  25. define Package/libseccomp/config
  26. depends on !arc
  27. endef
  28. define Package/libseccomp/Default
  29. SUBMENU:=
  30. SECTION:=libs
  31. CATEGORY:=Libraries
  32. TITLE:=seccomp
  33. URL:=https://github.com/seccomp/libseccomp/wiki
  34. endef
  35. define Package/libseccomp/Default/description
  36. The libseccomp library provides an easy to use, platform independent, interface
  37. to the Linux Kernel's syscall filtering mechanism. The libseccomp API is
  38. designed to abstract away the underlying BPF based syscall filter language and
  39. present a more conventional function-call based filtering interface that should
  40. be familiar to, and easily adopted by, application developers.
  41. endef
  42. define Package/libseccomp
  43. $(call Package/libseccomp/Default)
  44. TITLE+= (library)
  45. endef
  46. define Package/scmp_sys_resolver
  47. $(call Package/libseccomp/Default)
  48. TITLE+= scmp_sys_resolver
  49. DEPENDS+= libseccomp
  50. endef
  51. define Package/libseccomp/description
  52. This package contains the seccomp library.
  53. endef
  54. define Build/InstallDev
  55. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
  56. $(CP) \
  57. $(PKG_INSTALL_DIR)/usr/include/seccomp*.h \
  58. $(1)/usr/include/
  59. $(CP) \
  60. $(PKG_INSTALL_DIR)/usr/lib/libseccomp.{a,so*} \
  61. $(1)/usr/lib/
  62. $(CP) \
  63. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libseccomp.pc \
  64. $(1)/usr/lib/pkgconfig/
  65. endef
  66. define Package/libseccomp/install
  67. $(INSTALL_DIR) $(1)/usr/lib
  68. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libseccomp.so.* $(1)/usr/lib/
  69. endef
  70. define Package/scmp_sys_resolver/install
  71. $(INSTALL_DIR) $(1)/usr/bin
  72. $(CP) $(PKG_INSTALL_DIR)/usr/bin/scmp_sys_resolver $(1)/usr/bin/
  73. endef
  74. $(eval $(call BuildPackage,libseccomp))
  75. $(eval $(call BuildPackage,scmp_sys_resolver))