]>
Commit | Line | Data |
---|---|---|
ec6a9b9f JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
4e93dcd2 | 6 | Summary: Linux HPI driver for AudioScience audio adapters |
ea455e79 | 7 | Summary(pl.UTF-8): Linuksowy sterownik HPI do kart dźwiękowych AudioScience |
4e93dcd2 | 8 | Name: hpklinux |
2f028997 | 9 | Version: 4.20.43 |
c296b464 | 10 | Release: 1 |
4e93dcd2 JB |
11 | License: GPL v2 |
12 | Group: Applications/Sound | |
13 | #Source0Download: http://www.audioscience.com/internet/download/linux_drivers.htm | |
2f028997 MK |
14 | Source0: http://www.audioscience.com/internet/download/drivers/released/v4/20/43/%{name}_%{version}.tar.gz |
15 | # Source0-md5: b039b650d7c424d311ec0889a293ec86 | |
ec6a9b9f | 16 | Patch0: %{name}-opt.patch |
4e93dcd2 | 17 | URL: http://www.audioscience.com/internet/download/linux_drivers.htm |
f4e08a1b | 18 | BuildRequires: autoconf >= 2.50 |
4e93dcd2 | 19 | BuildRequires: automake |
f4e08a1b | 20 | BuildRequires: libtool >= 2:1.5 |
ec6a9b9f JB |
21 | BuildRequires: rpm-pythonprov |
22 | BuildRequires: rpmbuild(macros) >= 1.714 | |
23 | %if %{with python2} | |
24 | BuildRequires: python-modules >= 1:2.7 | |
25 | BuildRequires: python-setuptools | |
26 | %endif | |
27 | %if %{with python3} | |
28 | BuildRequires: python3-modules >= 1:3.4 | |
29 | BuildRequires: python3-setuptools | |
30 | %endif | |
4e93dcd2 JB |
31 | Requires: %{name}-libs = %{version}-%{release} |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | Linux HPI driver for AudioScience audio adapters. | |
36 | ||
37 | This package contains userspace utilities. | |
38 | ||
ff7c2598 JR |
39 | %description -l pl.UTF-8 |
40 | Linuksowy sterownik HPI do kart dźwiękowych AudioScience. | |
4e93dcd2 | 41 | |
ff7c2598 | 42 | Ten pakiet zawiera narzędzia przestrzeni użytkownika. |
4e93dcd2 JB |
43 | |
44 | %package libs | |
45 | Summary: HPI library for AudioScience audio adapters | |
ea455e79 | 46 | Summary(pl.UTF-8): Biblioteka HPI do kart dźwiękowych AudioScience |
4e93dcd2 JB |
47 | Group: Libraries |
48 | ||
49 | %description libs | |
50 | HPI library for AudioScience audio adapters. | |
51 | ||
ff7c2598 JR |
52 | %description libs -l pl.UTF-8 |
53 | Biblioteka HPI do kart dźwiękowych AudioScience. | |
4e93dcd2 JB |
54 | |
55 | %package devel | |
56 | Summary: Header files for HPI library | |
ea455e79 | 57 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki HPI |
4e93dcd2 JB |
58 | Group: Development/Libraries |
59 | Requires: %{name}-libs = %{version}-%{release} | |
60 | ||
61 | %description devel | |
62 | Header files for HPI library. | |
63 | ||
ff7c2598 JR |
64 | %description devel -l pl.UTF-8 |
65 | Pliki nagłówkowe biblioteki HPI. | |
4e93dcd2 JB |
66 | |
67 | %package static | |
68 | Summary: Static HPI library | |
ea455e79 | 69 | Summary(pl.UTF-8): Statyczna biblioteka HPI |
4e93dcd2 JB |
70 | Group: Development/Libraries |
71 | Requires: %{name}-devel = %{version}-%{release} | |
72 | ||
73 | %description static | |
74 | Static HPI library. | |
75 | ||
ff7c2598 | 76 | %description static -l pl.UTF-8 |
4e93dcd2 JB |
77 | Statyczna biblioteka HPI. |
78 | ||
ec6a9b9f JB |
79 | %package -n python-hpi |
80 | Summary: Python Linux HPI library | |
81 | Summary(pl.UTF-8): Biblioteka Linux HPI dla Pythona | |
82 | Group: Libraries/Python | |
83 | Requires: %{name}-libs = %{version}-%{release} | |
84 | ||
85 | %description -n python-hpi | |
86 | Python Linux HPI library. | |
87 | ||
88 | %description -n python-hpi -l pl.UTF-8 | |
89 | Biblioteka Linux HPI dla Pythona. | |
90 | ||
91 | %package -n python3-hpi | |
92 | Summary: Python Linux HPI library | |
93 | Summary(pl.UTF-8): Biblioteka Linux HPI dla Pythona | |
94 | Group: Libraries/Python | |
95 | Requires: %{name}-libs = %{version}-%{release} | |
96 | ||
97 | %description -n python3-hpi | |
98 | Python Linux HPI library. | |
99 | ||
100 | %description -n python3-hpi -l pl.UTF-8 | |
101 | Biblioteka Linux HPI dla Pythona. | |
102 | ||
4e93dcd2 | 103 | %prep |
c296b464 | 104 | %setup -q -n %{name}_%{version} |
f2fbbe0a | 105 | %patch0 -p1 |
4e93dcd2 JB |
106 | |
107 | %build | |
ec6a9b9f JB |
108 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
109 | %{__make} -C hpi-lib \ | |
110 | CC="%{__cc}" | |
111 | ||
112 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
113 | %{__make} -C hpi-cli-apps \ | |
114 | CC="%{__cc}" | |
115 | ||
116 | cd asi-python | |
117 | ||
118 | %if %{with python2} | |
119 | %py_build | |
120 | %endif | |
121 | ||
122 | %if %{with python3} | |
123 | %py3_build | |
124 | %endif | |
4e93dcd2 JB |
125 | |
126 | %install | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
ec6a9b9f JB |
129 | %{__make} -C hpi-lib install \ |
130 | DESTDIR=$RPM_BUILD_ROOT \ | |
131 | include-install-dir=%{_includedir}/asihpi \ | |
132 | lib-install-dir=%{_libdir} | |
133 | ||
134 | %{__make} -C hpi-cli-apps install \ | |
f4e08a1b | 135 | DESTDIR=$RPM_BUILD_ROOT \ |
ec6a9b9f JB |
136 | bin-install-dir=%{_bindir} |
137 | ||
138 | %{__make} -C hpi-drv/firmware \ | |
139 | bin-install-base-path=$RPM_BUILD_ROOT/lib/firmware | |
140 | ||
141 | cd asi-python | |
142 | ||
143 | %if %{with python2} | |
144 | %py_install | |
145 | ||
146 | %py_postclean | |
147 | # package only py3 variant | |
148 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/*.py | |
149 | %endif | |
150 | ||
151 | %if %{with python3} | |
152 | %py3_install | |
153 | %endif | |
4e93dcd2 JB |
154 | |
155 | %clean | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
158 | %post libs -p /sbin/ldconfig | |
159 | %postun libs -p /sbin/ldconfig | |
160 | ||
161 | %files | |
162 | %defattr(644,root,root,755) | |
ec6a9b9f | 163 | %doc README.md |
aadde4ba | 164 | %attr(755,root,root) %{_bindir}/asi_firmware_updater |
4e93dcd2 | 165 | %attr(755,root,root) %{_bindir}/asihpi* |
f4e08a1b | 166 | /lib/firmware/asihpi |
4e93dcd2 JB |
167 | |
168 | %files libs | |
169 | %defattr(644,root,root,755) | |
170 | %attr(755,root,root) %{_libdir}/libhpi.so.*.*.* | |
f4e08a1b | 171 | %attr(755,root,root) %ghost %{_libdir}/libhpi.so.10 |
aadde4ba | 172 | %attr(755,root,root) %{_libdir}/libhpimux.so.*.*.* |
f4e08a1b | 173 | %attr(755,root,root) %ghost %{_libdir}/libhpimux.so.10 |
aadde4ba | 174 | %attr(755,root,root) %{_libdir}/libhpiudp.so.*.*.* |
f4e08a1b | 175 | %attr(755,root,root) %ghost %{_libdir}/libhpiudp.so.10 |
4e93dcd2 JB |
176 | |
177 | %files devel | |
178 | %defattr(644,root,root,755) | |
179 | %attr(755,root,root) %{_libdir}/libhpi.so | |
aadde4ba JB |
180 | %attr(755,root,root) %{_libdir}/libhpimux.so |
181 | %attr(755,root,root) %{_libdir}/libhpiudp.so | |
4e93dcd2 JB |
182 | %{_includedir}/asihpi |
183 | ||
184 | %files static | |
185 | %defattr(644,root,root,755) | |
186 | %{_libdir}/libhpi.a | |
aadde4ba JB |
187 | %{_libdir}/libhpimux.a |
188 | %{_libdir}/libhpiudp.a | |
ec6a9b9f JB |
189 | |
190 | %if %{with python2} | |
191 | %files -n python-hpi | |
192 | %defattr(644,root,root,755) | |
193 | %{py_sitescriptdir}/audioscience | |
194 | %{py_sitescriptdir}/hpi-2.0-py*.egg-info | |
195 | %endif | |
196 | ||
197 | %if %{with python3} | |
198 | %files -n python3-hpi | |
199 | %defattr(644,root,root,755) | |
200 | %attr(755,root,root) %{_bindir}/dab_data.py | |
201 | %attr(755,root,root) %{_bindir}/dabtest.py | |
202 | %attr(755,root,root) %{_bindir}/hpicontrol.py | |
203 | %attr(755,root,root) %{_bindir}/hpimixer.py | |
204 | %attr(755,root,root) %{_bindir}/hpisave.py | |
205 | %{py3_sitescriptdir}/audioscience | |
206 | %{py3_sitescriptdir}/hpi-2.0-py*.egg-info | |
207 | %endif |