vectorscan-vl.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. %global vectorscan_tag d29730e1cb9daaa66bda63426cdce83505d2c809
  2. %global __cmake_in_source_build 1
  3. %global _lto_cflags %{nil}
  4. Name: vectorscan
  5. Summary: A portable fork of hyperscan, used as a high performance pcre replacement
  6. Version: 5.4.11
  7. Release: 9%{?_dist_release}
  8. Group: system
  9. # note google test framework not part of shipped binary
  10. # vectorscan is BSD-3-Clause but it utilizes boost, which is a C++ template
  11. # library and ends up embedded in the binary. BSL is included here for
  12. # completeness for this reason, but may not strictly be required as
  13. # the source is contained in the boost-devel packages.
  14. License: BSD-3-Clause AND BSL-1.0
  15. # https://bugzilla.redhat.com/show_bug.cgi?id=2264465
  16. ExcludeArch: s390x
  17. URL: https://github.com/VectorCamp/vectorscan
  18. Source0: https://github.com/VectorCamp/vectorscan/archive/%{vectorscan_tag}.tar.gz
  19. Patch0: 0001-Change-PPC-default-to-power8.patch
  20. Patch1: 0001-documentation-Add-cmake-option-to-build-man-pages.patch
  21. # hyperscan is x86 only, so lets obsolete it. There is one package in the
  22. # fedora repos that depends on hyperscan (suricata) and it appears to work
  23. # with this vectorscan package.
  24. Provides: hyperscan = %{version}
  25. Obsoletes: hyperscan < 5.4.7
  26. BuildRequires: patch
  27. BuildRequires: gcc
  28. BuildRequires: gcc-c++
  29. BuildRequires: make
  30. BuildRequires: cmake
  31. BuildRequires: ragel
  32. #BuildRequires: python3-sphinx
  33. #BuildRequires: python3-breathe
  34. BuildRequires: doxygen
  35. BuildRequires: libboost-devel
  36. BuildRequires: sqlite3-devel
  37. BuildRequires: glibc-devel
  38. BuildRequires: python3-devel
  39. BuildRequires: libpcap-devel
  40. %ifarch x86_64
  41. # the doc lies about VBMI implying AVX512 implying AVX2, without AVX2 the build fails
  42. %global fatruntime -DFAT_RUNTIME=ON -DBUILD_AVX2=ON -DBUILD_AVX512=ON -DBUILD_AVX512VBMI=ON
  43. %else
  44. %ifarch aarch64
  45. %global fatruntime -DFAT_RUNTIME=ON -DBUILD_SVE=ON -DBUILD_SVE2=ON -DBUILD_SVE2_BITPERM=ON
  46. %else
  47. %global fatruntime -DFAT_RUNTIME=OFF
  48. %endif
  49. %endif
  50. %description
  51. A fork of Intel's Hyperscan, modified to run on more
  52. platforms. Hyperscan is a high-performance multiple regex matching
  53. library. It follows the regular expression syntax of the commonly-used
  54. libpcre library, but is a standalone library with its own C API.
  55. Hyperscan uses hybrid automata techniques to allow simultaneous
  56. matching of large numbers (up to tens of thousands) of regular
  57. expressions and for the matching of regular expressions across streams
  58. of data.
  59. Hyperscan is typically used in a DPI library stack.
  60. %package devel
  61. Summary: Development files for the vectorscan library
  62. Group: programming
  63. Requires: %{name}%{?_isa} = %{version}-%{release}
  64. %description devel
  65. Provides: hyperscan-devel = %{version}
  66. Obsoletes: hyperscan-devel < 5.4.7
  67. The vectorscan-devel package contains headers and libraries needed
  68. to develop .
  69. %debug_package
  70. %prep
  71. %setup -q -n vectorscan-%{vectorscan_tag}
  72. %patch -P0 -p1
  73. %patch -P1 -p1
  74. %build
  75. %cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=ON %{fatruntime} . -Wno-dev
  76. %cmake_build
  77. %install
  78. %cmake_install
  79. %ifarch x86_64
  80. %check
  81. bin/unit-hyperscan
  82. %endif
  83. %files
  84. %license COPYING
  85. %license LICENSE
  86. %{_libdir}/*.so.*
  87. %doc README.md
  88. %files devel
  89. %dir %{_defaultdocdir}/%{name}
  90. %dir %{_defaultdocdir}/%{name}/examples
  91. %doc %{_defaultdocdir}/%{name}/examples/README.md
  92. %doc %{_defaultdocdir}/%{name}/examples/*.cc
  93. %doc %{_defaultdocdir}/%{name}/examples/*.c
  94. %{_libdir}/*.so
  95. %{_libdir}/pkgconfig/libhs.pc
  96. %{_includedir}/hs/
  97. #------------------------------------------------------------------------------
  98. %changelog
  99. * Sat Dec 14 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 5.4.11-9
  100. - initial build for Vine Linux.
  101. * Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.11-8
  102. - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
  103. * Mon Feb 26 2024 Jeremy Linton <jeremy.linton@arm.com> - 5.4.11-6
  104. - Review issues, add man page updates, explicitly conflict hyperscan on x86
  105. * Mon Feb 12 2024 Jeremy Linton <jeremy.linton@arm.com> - 5.4.11-5
  106. - Fix fedora review issues
  107. * Fri Feb 9 2024 Jeremy Linton <jeremy.linton@arm.com> - 5.4.11-4
  108. - Make fedpkg lint happy
  109. * Wed Dec 6 2023 Jeremy Linton <jeremy.linton@arm.com> - 5.4.11-3
  110. - Enable Fat runtime on x86/aarch64
  111. * Wed Dec 6 2023 Jeremy Linton <jeremy.linton@arm.com> - 5.4.11-2
  112. - Change PPC compiler baseline to POWER8
  113. * Wed Dec 6 2023 Jeremy Linton <jeremy.linton@arm.com> - 5.4.11-1
  114. - Attempt upgrade to 5.4.11
  115. * Thu Oct 12 2023 Jeremy Linton <jeremy.linton@arm.com> - 5.4.10-1
  116. - Attempt upgrade to 5.4.10.1
  117. * Fri May 13 2022 Jeremy Linton <jeremy.linton@arm.com> - 5.4.7-1
  118. - First vectorscan package