libpfm-vl.spec 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. %bcond_without python
  2. %if %{with python}
  3. %define python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
  4. %define python_prefix %(python -c "import sys; print sys.prefix")
  5. %{?filter_setup:
  6. %filter_provides_in %{python_sitearch}/perfmon/.*\.so$
  7. %filter_setup
  8. }
  9. %endif
  10. Name: libpfm
  11. Version: 4.5.0
  12. Release: 6%{?_dist_release}
  13. Summary: Library to encode performance events for use by perf tool
  14. Summary(ja): プロファイラが用いるパフォーマンスイベントをエンコードするライブラリ
  15. Group: System Environment/Libraries
  16. License: MIT
  17. URL: http://perfmon2.sourceforge.net/
  18. Source0: http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz
  19. Patch12: libpfm-ac57.patch
  20. Patch13: libpfm-ac53.patch
  21. %if %{with python}
  22. BuildRequires: python-devel
  23. BuildRequires: python-setuptools
  24. BuildRequires: swig
  25. %endif
  26. %description
  27. libpfm4 is a library to help encode events for use with operating system
  28. kernels performance monitoring interfaces. The current version provides support
  29. for the perf_events interface available in upstream Linux kernels since v2.6.31.
  30. %package devel
  31. Summary: Development library to encode performance events for perf_events based tools
  32. Summary(ja): パフォーマンスイベントをエンコードするための開発用ライブラリ
  33. Group: Development/Libraries
  34. Requires: %{name} = %{version}-%{release}
  35. %description devel
  36. Development library and header files to create performance monitoring
  37. applications for the perf_events interface.
  38. %package static
  39. Summary: Static library to encode performance events for perf_events based tools
  40. Summary(ja): パフォーマンスイベントをエンコードするための静的ライブラリ
  41. Group: Development/Libraries
  42. Requires: %{name}-devel = %{version}-%{release}
  43. %description static
  44. Static version of the libpfm library for performance monitoring
  45. applications for the perf_events interface.
  46. %if %{with python}
  47. %package python
  48. Summary: Python bindings for libpfm and perf_event_open system call
  49. Group: Development/Libraries
  50. Requires: %{name} = %{version}-%{release}
  51. %description python
  52. Python bindings for libpfm4 and perf_event_open system call.
  53. %endif
  54. %prep
  55. %setup -q
  56. %patch12 -p1
  57. %patch13 -p1
  58. %build
  59. %if %{with python}
  60. %global python_config CONFIG_PFMLIB_NOPYTHON=n
  61. %else
  62. %global python_config CONFIG_PFMLIB_NOPYTHON=y
  63. %endif
  64. make %{python_config} %{?_smp_mflags}
  65. %install
  66. rm -rf $RPM_BUILD_ROOT
  67. %if %{with python}
  68. %global python_config CONFIG_PFMLIB_NOPYTHON=n PYTHON_PREFIX=$RPM_BUILD_ROOT/%{python_prefix}
  69. %else
  70. %global python_config CONFIG_PFMLIB_NOPYTHON=y
  71. %endif
  72. make \
  73. PREFIX=$RPM_BUILD_ROOT%{_prefix} \
  74. LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
  75. %{python_config} \
  76. LDCONFIG=/bin/true \
  77. install
  78. %clean
  79. rm -rf $RPM_BUILD_ROOT
  80. %post -p /sbin/ldconfig
  81. %postun -p /sbin/ldconfig
  82. %files
  83. %doc README
  84. %{_libdir}/lib*.so.*
  85. %files devel
  86. %{_includedir}/*
  87. %{_mandir}/man3/*
  88. %{_libdir}/lib*.so
  89. %files static
  90. %{_libdir}/lib*.a
  91. %if %{with python}
  92. %files python
  93. %{python_sitearch}/*
  94. %endif
  95. %changelog
  96. * Fri Feb 6 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.5.0-6
  97. - initial build for Vine Linux
  98. * Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-5
  99. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  100. * Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 4.5.0-4
  101. - Replace python-setuptools-devel BR with python-setuptools
  102. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-3
  103. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  104. * Fri May 23 2014 William Cohen <wcohen@redhat.com> 4.5.0-2
  105. - Add cortex a53 support.
  106. * Fri May 23 2014 William Cohen <wcohen@redhat.com> 4.5.0-1
  107. - Rebase on libpfm-4.5.0.
  108. * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.0-3
  109. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  110. * Fri Jul 19 2013 William Cohen <wcohen@redhat.com> 4.4.0-2
  111. - Add IBM power 8 support.
  112. * Mon Jun 17 2013 William Cohen <wcohen@redhat.com> 4.4.0-1
  113. - Rebase on libpfm-4.4.0.
  114. * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.0-3
  115. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  116. * Tue Aug 28 2012 William Cohen <wcohen@redhat.com> 4.3.0-2
  117. - Turn off LDCONFIG and remove patch.
  118. * Tue Aug 28 2012 William Cohen <wcohen@redhat.com> 4.3.0-1
  119. - Rebase on libpfm-4.3.0.
  120. * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.0-8
  121. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  122. * Fri Jun 8 2012 William Cohen <wcohen@redhat.com> 4.2.0-7
  123. - Eliminate swig error.
  124. * Thu Jun 7 2012 William Cohen <wcohen@redhat.com> 4.2.0-6
  125. - Eliminate rpm_build_root macro in build section.
  126. - Correct location of shared library files.
  127. * Thu Jun 7 2012 William Cohen <wcohen@redhat.com> 4.2.0-5
  128. - Use siginfo_t for some examples.
  129. * Mon Jun 4 2012 William Cohen <wcohen@redhat.com> 4.2.0-4
  130. - Correct python files.
  131. * Wed Mar 28 2012 William Cohen <wcohen@redhat.com> 4.2.0-3
  132. - Additional spec file fixup for rhbz804666.
  133. * Wed Mar 14 2012 William Cohen <wcohen@redhat.com> 4.2.0-2
  134. - Some spec file fixup.
  135. * Wed Jan 12 2011 Arun Sharma <asharma@fb.com> 4.2.0-0
  136. Initial revision