]> git.pld-linux.org Git - packages/libpfm.git/blob - libpfm.spec
f37e57da490f46822899efc44211ca6b839b9a03
[packages/libpfm.git] / libpfm.spec
1 #
2 # Conditional build:
3 %bcond_without  python  # Python modules (any)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6 #
7 %if %{without python}
8 %undefine       with_python2
9 %undefine       with_python3
10 %endif
11 Summary:        Library to encode performance events for use by perf tool
12 Summary(pl.UTF-8):      Biblioteka do kodowania zdarzeń związanych z wydajnością do użycia przez narzędzie perf
13 Name:           libpfm
14 Version:        4.11.0
15 Release:        2
16 License:        MIT
17 Group:          Libraries
18 Source0:        http://downloads.sourceforge.net/perfmon2/%{name}-%{version}.tar.gz
19 # Source0-md5:  4811c1d99b95752b4ba53b89a9389ec3
20 URL:            http://perfmon2.sourceforge.net/
21 %{?with_python2:BuildRequires:  python-devel >= 2}
22 %{?with_python3:BuildRequires:  python3-devel >= 1:3.2}
23 %{?with_python:BuildRequires:   swig-python >= 2}
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 libpfm4 is a library to help encode events for use with operating
28 system kernels performance monitoring interfaces. The current version
29 provides support for the perf_events interface available in upstream
30 Linux kernels since v2.6.31.
31
32 %description -l pl.UTF-8
33 libpfm4 to biblioteka pomagająca kodować zdarzenia do wykorzystania
34 przez interfejsy jądra systemu do monitorowania wydajności. Obecna
35 wersja zapewnia obsługę interfejsu perf_events dostępnego w jądrach
36 Linuksa od wersji 2.6.31.
37
38 %package devel
39 Summary:        Header files for libpfm 4 library
40 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libpfm 4
41 Group:          Development/Libraries
42 Requires:       %{name} = %{version}-%{release}
43
44 %description devel
45 Header files for libpfm 4 library.
46
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki libpfm 4.
49
50 %package static
51 Summary:        Static libpfm 4 library
52 Summary(pl.UTF-8):      Statyczna biblioteka libpfm 4
53 Group:          Development/Libraries
54 Requires:       %{name}-devel = %{version}-%{release}
55
56 %description static
57 Static libpfm 4 library.
58
59 %description static -l pl.UTF-8
60 Statyczna biblioteka libpfm 4.
61
62 %package -n python-perfmon
63 Summary:        Python 2 bindings for libpfm and perf_event_open system call
64 Summary(pl.UTF-8):      Wiązania Pythona 2 do libpfm i wywołania systemowego perf_event_open
65 Group:          Libraries/Python
66 Requires:       %{name} = %{version}-%{release}
67
68 %description -n python-perfmon
69 Python 2 bindings for libpfm and perf_event_open system call.
70
71 %description -n python-perfmon -l pl.UTF-8
72 Wiązania Pythona 2 do libpfm i wywołania systemowego perf_event_open.
73
74 %package -n python3-perfmon
75 Summary:        Python 3 bindings for libpfm and perf_event_open system call
76 Summary(pl.UTF-8):      Wiązania Pythona 3 do libpfm i wywołania systemowego perf_event_open
77 Group:          Libraries/Python
78 Requires:       %{name} = %{version}-%{release}
79
80 %description -n python3-perfmon
81 Python 3 bindings for libpfm and perf_event_open system call.
82
83 %description -n python3-perfmon -l pl.UTF-8
84 Wiązania Pythona 3 do libpfm i wywołania systemowego perf_event_open.
85
86 %prep
87 %setup -q
88
89 %build
90 %{__make} \
91         CC="%{__cc}" \
92         OPTIM="%{rpmcflags} %{rpmcppflags}" \
93         LDFLAGS="%{rpmldflags}" \
94         CONFIG_PFMLIB_NOPYTHON=y
95
96 cd python
97 %if %{with python2}
98 %py_build
99 %endif
100
101 %if %{with python3}
102 %py3_build
103 %endif
104
105 %install
106 rm -rf $RPM_BUILD_ROOT
107
108 %{__make} install \
109         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
110         LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
111         CONFIG_PFMLIB_NOPYTHON=y \
112         LDCONFIG=/bin/true
113
114 cd python
115 %if %{with python2}
116 %py_install
117
118 %py_postclean
119 %endif
120
121 %if %{with python3}
122 %py3_install
123 %endif
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %post   -p /sbin/ldconfig
129 %postun -p /sbin/ldconfig
130
131 %files
132 %defattr(644,root,root,755)
133 %doc COPYING README
134 %attr(755,root,root) %{_libdir}/libpfm.so.*.*.*
135 %attr(755,root,root) %ghost %{_libdir}/libpfm.so.4
136
137 %files devel
138 %defattr(644,root,root,755)
139 %attr(755,root,root) %{_libdir}/libpfm.so
140 %{_includedir}/perfmon
141 %{_mandir}/man3/libpfm*.3*
142 %{_mandir}/man3/pfm_*.3*
143
144 %files static
145 %defattr(644,root,root,755)
146 %{_libdir}/libpfm.a
147
148 %if %{with python2}
149 %files -n python-perfmon
150 %defattr(644,root,root,755)
151 %dir %{py_sitedir}/perfmon
152 %attr(755,root,root) %{py_sitedir}/perfmon/_perfmon_int.so
153 %{py_sitedir}/perfmon/*.py[co]
154 %{py_sitedir}/perfmon-4.0-py*.egg-info
155 %endif
156
157 %if %{with python3}
158 %files -n python3-perfmon
159 %defattr(644,root,root,755)
160 %dir %{py3_sitedir}/perfmon
161 %attr(755,root,root) %{py3_sitedir}/perfmon/_perfmon_int.cpython-*.so
162 %{py3_sitedir}/perfmon/*.py
163 %{py3_sitedir}/perfmon/__pycache__
164 %{py3_sitedir}/perfmon-4.0-py*.egg-info
165 %endif
This page took 0.052254 seconds and 2 git commands to generate.