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.

96 lines
2.5 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.5.1
  10. PKG_RELEASE:=1
  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:=ee307e383c77aa7995abc5ada544d51c9723ae399768a97667d4cdb3c3a30d55
  15. PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
  16. PKG_LICENSE:=LGPL-2.1-or-later
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_CPE_ID:=cpe:/a:libseccomp_project:libseccomp
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_BUILD_DEPENDS:=gperf/host
  22. PKG_LIBTOOL_PATHS:=. lib
  23. PKG_CONFIG_DEPENDS:= \
  24. CONFIG_KERNEL_SECCOMP
  25. include $(INCLUDE_DIR)/package.mk
  26. # This is done instead of DEPENDS:=@!arc to avoid a recursive dependency when
  27. # the library is conditionally selected by util/lxc.
  28. define Package/libseccomp/config
  29. depends on !arc
  30. endef
  31. define Package/libseccomp/Default
  32. SUBMENU:=
  33. SECTION:=libs
  34. CATEGORY:=Libraries
  35. TITLE:=seccomp
  36. URL:=https://github.com/seccomp/libseccomp/wiki
  37. endef
  38. define Package/libseccomp/Default/description
  39. The libseccomp library provides an easy to use, platform independent, interface
  40. to the Linux Kernel's syscall filtering mechanism. The libseccomp API is
  41. designed to abstract away the underlying BPF based syscall filter language and
  42. present a more conventional function-call based filtering interface that should
  43. be familiar to, and easily adopted by, application developers.
  44. endef
  45. define Package/libseccomp
  46. $(call Package/libseccomp/Default)
  47. TITLE+= (library)
  48. DEPENDS+= @!arc
  49. endef
  50. define Package/scmp_sys_resolver
  51. $(call Package/libseccomp/Default)
  52. TITLE+= scmp_sys_resolver
  53. DEPENDS+= libseccomp
  54. endef
  55. define Package/libseccomp/description
  56. This package contains the seccomp library.
  57. endef
  58. define Build/InstallDev
  59. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
  60. $(CP) \
  61. $(PKG_INSTALL_DIR)/usr/include/seccomp*.h \
  62. $(1)/usr/include/
  63. $(CP) \
  64. $(PKG_INSTALL_DIR)/usr/lib/libseccomp.{a,so*} \
  65. $(1)/usr/lib/
  66. $(CP) \
  67. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libseccomp.pc \
  68. $(1)/usr/lib/pkgconfig/
  69. endef
  70. define Package/libseccomp/install
  71. $(INSTALL_DIR) $(1)/usr/lib
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libseccomp.so.* $(1)/usr/lib/
  73. endef
  74. define Package/scmp_sys_resolver/install
  75. $(INSTALL_DIR) $(1)/usr/bin
  76. $(CP) $(PKG_INSTALL_DIR)/usr/bin/scmp_sys_resolver $(1)/usr/bin/
  77. endef
  78. $(eval $(call BuildPackage,libseccomp))
  79. $(eval $(call BuildPackage,scmp_sys_resolver))