]>
Commit | Line | Data |
---|---|---|
f6a7732d JB |
1 | # |
2 | # Conditional build: | |
569465c4 JB |
3 | %bcond_without python # Python bindings (any) |
4 | %bcond_without python2 # CPython 2.x bindings | |
5 | %bcond_without python3 # CPython 3.x bindings | |
f6a7732d | 6 | # |
569465c4 JB |
7 | %if %{without python} |
8 | %undefine with_python2 | |
9 | %undefine with_python3 | |
10 | %endif | |
11 | # see m4/${libname}.m4 />= for required version of particular library | |
12 | %define libcdata_ver 20190112 | |
13 | %define libcerror_ver 20120425 | |
14 | %define libcfile_ver 20160409 | |
15 | %define libclocale_ver 20120425 | |
16 | %define libcnotify_ver 20120425 | |
17 | %define libcthreads_ver 20160404 | |
18 | %define libuna_ver 20181006 | |
f6a7732d JB |
19 | Summary: Library to access and read storage media (SM) devices |
20 | Summary(pl.UTF-8): Biblioteka służąca do dostępu i odczytu urządzeń nośników pamięci (SM) | |
21 | Name: libsmdev | |
569465c4 JB |
22 | Version: 20190315 |
23 | Release: 1 | |
f6a7732d JB |
24 | License: LGPL v3+ |
25 | Group: Libraries | |
569465c4 JB |
26 | #Source0Download: https://github.com/libyal/libsmdev/releases |
27 | Source0: https://github.com/libyal/libsmdev/releases/download/%{version}/%{name}-alpha-%{version}.tar.gz | |
28 | # Source0-md5: d4438396d387f4074335846674a48508 | |
f6a7732d JB |
29 | URL: https://github.com/libyal/libsmdev/ |
30 | BuildRequires: autoconf >= 2.59 | |
31 | BuildRequires: automake >= 1.6 | |
32 | BuildRequires: gettext-tools >= 0.18.1 | |
569465c4 JB |
33 | BuildRequires: libcdata-devel >= %{libcdata_ver} |
34 | BuildRequires: libcerror-devel >= %{libcerror_ver} | |
35 | BuildRequires: libcfile-devel >= %{libcfile_ver} | |
36 | BuildRequires: libclocale-devel >= %{libclocale_ver} | |
37 | BuildRequires: libcnotify-devel >= %{libcnotify_ver} | |
38 | BuildRequires: libcthreads-devel >= %{libcthreads_ver} | |
39 | BuildRequires: libuna-devel >= %{libuna_ver} | |
f6a7732d JB |
40 | BuildRequires: libtool |
41 | BuildRequires: pkgconfig | |
569465c4 JB |
42 | %{?with_python2:BuildRequires: python-devel >= 1:2.5} |
43 | %{?with_python3:BuildRequires: python3-devel >= 1:3.2} | |
44 | Requires: libcdata >= %{libcdata_ver} | |
45 | Requires: libcerror >= %{libcerror_ver} | |
46 | Requires: libcfile >= %{libcfile_ver} | |
47 | Requires: libclocale >= %{libclocale_ver} | |
48 | Requires: libcnotify >= %{libcnotify_ver} | |
49 | Requires: libcthreads >= %{libcthreads_ver} | |
50 | Requires: libuna >= %{libuna_ver} | |
f6a7732d JB |
51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
52 | ||
53 | %description | |
54 | libsmdev is a library to access and read storage media (SM) devices. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | libsmdev to biblioteka służąca do dostępu i odczytu urządzeń nośników | |
58 | pamięci (SM - Storage Media) | |
59 | ||
60 | %package devel | |
61 | Summary: Header files for libsmdev library | |
62 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libsmdev | |
63 | Group: Development/Libraries | |
64 | Requires: %{name} = %{version}-%{release} | |
569465c4 JB |
65 | Requires: libcdata-devel >= %{libcdata_ver} |
66 | Requires: libcerror-devel >= %{libcerror_ver} | |
67 | Requires: libcfile-devel >= %{libcfile_ver} | |
68 | Requires: libclocale-devel >= %{libclocale_ver} | |
69 | Requires: libcnotify-devel >= %{libcnotify_ver} | |
70 | Requires: libcthreads-devel >= %{libcthreads_ver} | |
71 | Requires: libuna-devel >= %{libuna_ver} | |
f6a7732d JB |
72 | |
73 | %description devel | |
74 | Header files for libsmdev library. | |
75 | ||
76 | %description devel -l pl.UTF-8 | |
77 | Pliki nagłówkowe biblioteki libsmdev. | |
78 | ||
79 | %package static | |
80 | Summary: Static libsmdev library | |
81 | Summary(pl.UTF-8): Statyczna biblioteka libsmdev | |
82 | Group: Development/Libraries | |
83 | Requires: %{name}-devel = %{version}-%{release} | |
84 | ||
85 | %description static | |
86 | Static libsmdev library. | |
87 | ||
88 | %description static -l pl.UTF-8 | |
89 | Statyczna biblioteka libsmdev. | |
90 | ||
91 | %package -n python-pysmdev | |
569465c4 JB |
92 | Summary: Python 2 bindings for libsmdev library |
93 | Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki libsmdev | |
f6a7732d JB |
94 | Group: Libraries/Python |
95 | Requires: %{name} = %{version}-%{release} | |
96 | ||
97 | %description -n python-pysmdev | |
569465c4 | 98 | Python 2 bindings for libsmdev library. |
f6a7732d JB |
99 | |
100 | %description -n python-pysmdev -l pl.UTF-8 | |
569465c4 JB |
101 | Wiązania Pythona 2 do biblioteki libsmdev. |
102 | ||
103 | %package -n python3-pysmdev | |
104 | Summary: Python 3 bindings for libsmdev library | |
105 | Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki libsmdev | |
106 | Group: Libraries/Python | |
107 | Requires: %{name} = %{version}-%{release} | |
108 | ||
109 | %description -n python3-pysmdev | |
110 | Python 3 bindings for libsmdev library. | |
111 | ||
112 | %description -n python3-pysmdev -l pl.UTF-8 | |
113 | Wiązania Pythona 3 do biblioteki libsmdev. | |
f6a7732d JB |
114 | |
115 | %prep | |
116 | %setup -q | |
f6a7732d JB |
117 | |
118 | %build | |
119 | %{__gettextize} | |
f6a7732d JB |
120 | %{__libtoolize} |
121 | %{__aclocal} -I m4 | |
122 | %{__autoconf} | |
123 | %{__autoheader} | |
124 | %{__automake} | |
125 | %configure \ | |
569465c4 JB |
126 | %{?with_python2:--enable-python2} \ |
127 | %{?with_python3:--enable-python3} | |
f6a7732d JB |
128 | %{__make} |
129 | ||
130 | %install | |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
133 | %{__make} install \ | |
134 | DESTDIR=$RPM_BUILD_ROOT | |
135 | ||
136 | # obsoleted by pkg-config | |
137 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsmdev.la | |
138 | ||
569465c4 | 139 | %if %{with python2} |
f6a7732d JB |
140 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pysmdev.{la,a} |
141 | %endif | |
569465c4 JB |
142 | %if %{with python3} |
143 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/pysmdev.{la,a} | |
144 | %endif | |
f6a7732d JB |
145 | |
146 | %clean | |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
149 | %post -p /sbin/ldconfig | |
150 | %postun -p /sbin/ldconfig | |
151 | ||
152 | %files | |
153 | %defattr(644,root,root,755) | |
154 | %doc AUTHORS ChangeLog README | |
155 | %attr(755,root,root) %{_bindir}/smdevinfo | |
156 | %attr(755,root,root) %{_libdir}/libsmdev.so.*.*.* | |
157 | %attr(755,root,root) %ghost %{_libdir}/libsmdev.so.1 | |
158 | %{_mandir}/man1/smdevinfo.1* | |
159 | ||
160 | %files devel | |
161 | %defattr(644,root,root,755) | |
162 | %attr(755,root,root) %{_libdir}/libsmdev.so | |
163 | %{_includedir}/libsmdev | |
164 | %{_includedir}/libsmdev.h | |
165 | %{_pkgconfigdir}/libsmdev.pc | |
166 | %{_mandir}/man3/libsmdev.3* | |
167 | ||
168 | %files static | |
169 | %defattr(644,root,root,755) | |
170 | %{_libdir}/libsmdev.a | |
171 | ||
569465c4 | 172 | %if %{with python2} |
f6a7732d JB |
173 | %files -n python-pysmdev |
174 | %defattr(644,root,root,755) | |
175 | %attr(755,root,root) %{py_sitedir}/pysmdev.so | |
176 | %endif | |
569465c4 JB |
177 | |
178 | %if %{with python3} | |
179 | %files -n python3-pysmdev | |
180 | %defattr(644,root,root,755) | |
181 | %attr(755,root,root) %{py3_sitedir}/pysmdev.so | |
182 | %endif |