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