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.

86 lines
2.2 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.0
  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:=2e74c7e8b54b340ad5d472e59286c6758e1e1e96c6b43c3dbdc8ddafbf0e525d
  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. define Package/libseccomp/Default
  23. SUBMENU:=
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=seccomp
  27. URL:=https://github.com/seccomp/libseccomp/wiki
  28. endef
  29. define Package/libseccomp/Default/description
  30. The libseccomp library provides an easy to use, platform independent, interface
  31. to the Linux Kernel's syscall filtering mechanism. The libseccomp API is
  32. designed to abstract away the underlying BPF based syscall filter language and
  33. present a more conventional function-call based filtering interface that should
  34. be familiar to, and easily adopted by, application developers.
  35. endef
  36. define Package/libseccomp
  37. $(call Package/libseccomp/Default)
  38. TITLE+= (library)
  39. DEPENDS+=
  40. endef
  41. define Package/scmp_sys_resolver
  42. $(call Package/libseccomp/Default)
  43. TITLE+= scmp_sys_resolver
  44. DEPENDS+= libseccomp
  45. endef
  46. define Package/libseccomp/description
  47. This package contains the seccomp library.
  48. endef
  49. define Build/InstallDev
  50. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
  51. $(CP) \
  52. $(PKG_INSTALL_DIR)/usr/include/seccomp.h \
  53. $(1)/usr/include/
  54. $(CP) \
  55. $(PKG_INSTALL_DIR)/usr/lib/libseccomp.{a,so*} \
  56. $(1)/usr/lib/
  57. $(CP) \
  58. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libseccomp.pc \
  59. $(1)/usr/lib/pkgconfig/
  60. endef
  61. define Package/libseccomp/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libseccomp.so.* $(1)/usr/lib/
  64. endef
  65. define Package/scmp_sys_resolver/install
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(CP) $(PKG_INSTALL_DIR)/usr/bin/scmp_sys_resolver $(1)/usr/bin/
  68. endef
  69. $(eval $(call BuildPackage,libseccomp))
  70. $(eval $(call BuildPackage,scmp_sys_resolver))