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.

95 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. endef
  49. define Package/scmp_sys_resolver
  50. $(call Package/libseccomp/Default)
  51. TITLE+= scmp_sys_resolver
  52. DEPENDS+= libseccomp
  53. endef
  54. define Package/libseccomp/description
  55. This package contains the seccomp library.
  56. endef
  57. define Build/InstallDev
  58. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
  59. $(CP) \
  60. $(PKG_INSTALL_DIR)/usr/include/seccomp*.h \
  61. $(1)/usr/include/
  62. $(CP) \
  63. $(PKG_INSTALL_DIR)/usr/lib/libseccomp.{a,so*} \
  64. $(1)/usr/lib/
  65. $(CP) \
  66. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libseccomp.pc \
  67. $(1)/usr/lib/pkgconfig/
  68. endef
  69. define Package/libseccomp/install
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libseccomp.so.* $(1)/usr/lib/
  72. endef
  73. define Package/scmp_sys_resolver/install
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(CP) $(PKG_INSTALL_DIR)/usr/bin/scmp_sys_resolver $(1)/usr/bin/
  76. endef
  77. $(eval $(call BuildPackage,libseccomp))
  78. $(eval $(call BuildPackage,scmp_sys_resolver))