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.6 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.2
  10. PKG_RELEASE:=$(AUTORELEASE)
  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:=17a652dfb491d96be893960e9b791914936ee16c13b777a3caf562fe48cb87df
  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_FIXUP:=autoreconf
  20. PKG_INSTALL:=1
  21. PKG_BUILD_PARALLEL:=1
  22. PKG_BUILD_DEPENDS:=gperf/host
  23. PKG_LIBTOOL_PATHS:=. lib
  24. PKG_CONFIG_DEPENDS:= \
  25. CONFIG_KERNEL_SECCOMP
  26. include $(INCLUDE_DIR)/package.mk
  27. # This is done instead of DEPENDS:=@!arc to avoid a recursive dependency when
  28. # the library is conditionally selected by util/lxc.
  29. define Package/libseccomp/config
  30. depends on !arc
  31. endef
  32. define Package/libseccomp/Default
  33. SUBMENU:=
  34. SECTION:=libs
  35. CATEGORY:=Libraries
  36. TITLE:=seccomp
  37. URL:=https://github.com/seccomp/libseccomp/wiki
  38. endef
  39. define Package/libseccomp/Default/description
  40. The libseccomp library provides an easy to use, platform independent, interface
  41. to the Linux Kernel's syscall filtering mechanism. The libseccomp API is
  42. designed to abstract away the underlying BPF based syscall filter language and
  43. present a more conventional function-call based filtering interface that should
  44. be familiar to, and easily adopted by, application developers.
  45. endef
  46. define Package/libseccomp
  47. $(call Package/libseccomp/Default)
  48. TITLE+= (library)
  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))