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.

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