]>
Commit | Line | Data |
---|---|---|
16c85d30 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library build | |
4 | # | |
187ae5d2 | 5 | Summary: Cross-platform serial port access library |
16c85d30 | 6 | Summary(pl.UTF-8): Wieloplatformowa biblioteka dostępu do portu szeregowego |
187ae5d2 | 7 | Name: libserialport |
8d6b988b JB |
8 | Version: 0.1.0 |
9 | Release: 2 | |
10 | License: LGPL v3+ | |
187ae5d2 | 11 | Group: Libraries |
187ae5d2 | 12 | Source0: http://sigrok.org/download/source/libserialport/%{name}-%{version}.tar.gz |
8d6b988b | 13 | # Source0-md5: 750fa8dc1baf26b42fb4cadd9327674b |
3acdeabe | 14 | URL: http://sigrok.org/wiki/Libserialport |
8d6b988b JB |
15 | BuildRequires: autoconf >= 2.63 |
16 | BuildRequires: automake >= 1:1.11 | |
187ae5d2 | 17 | BuildRequires: doxygen |
8d6b988b | 18 | BuildRequires: libtool >= 2:2 |
187ae5d2 AM |
19 | BuildRequires: pkgconfig >= 1:0.22 |
20 | BuildRequires: udev-devel | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | Minimal, cross-platform shared library written in C that is intended | |
25 | to take care of the OS-specific details when writing software that | |
26 | uses serial ports. | |
27 | ||
16c85d30 JB |
28 | %description -l pl.UTF-8 |
29 | Minimalna, wieloplatformowa, napisana w C biblioteka współdzielona | |
30 | mająca na celu zadbać o wszystkie specyficzne dla systemu operacyjnego | |
31 | szczegóły przy pisaniu oprogramowania wykorzystującego porty | |
32 | szeregowe. | |
33 | ||
187ae5d2 | 34 | %package devel |
16c85d30 JB |
35 | Summary: Development files for libserialport |
36 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libserialport | |
187ae5d2 AM |
37 | Group: Development/Libraries |
38 | Requires: %{name} = %{version}-%{release} | |
8d6b988b | 39 | Requires: udev-devel |
187ae5d2 AM |
40 | |
41 | %description devel | |
16c85d30 JB |
42 | This package contains the header files for developing applications |
43 | that use libserialport. | |
44 | ||
45 | %description devel -l pl.UTF-8 | |
46 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
47 | wykorzystujących bibliotekę libserialport. | |
48 | ||
49 | %package static | |
50 | Summary: Static libserialport library | |
51 | Summary(pl.UTF-8): Statyczna biblioteka libserialport | |
52 | Group: Development/Libraries | |
53 | Requires: %{name}-devel = %{version}-%{release} | |
54 | ||
55 | %description static | |
56 | Static libserialport library. | |
57 | ||
58 | %description static -l pl.UTF-8 | |
59 | Statyczna biblioteka libserialport. | |
187ae5d2 AM |
60 | |
61 | %prep | |
62 | %setup -q | |
63 | ||
64 | %build | |
65 | %{__libtoolize} | |
66 | %{__aclocal} | |
187ae5d2 AM |
67 | %{__automake} |
68 | %{__autoconf} | |
69 | %configure \ | |
16c85d30 JB |
70 | --disable-silent-rules \ |
71 | %{!?with_static_libs:--disable-static} | |
187ae5d2 AM |
72 | |
73 | %{__make} | |
74 | ||
75 | doxygen Doxyfile | |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | %{__make} install \ | |
80 | DESTDIR=$RPM_BUILD_ROOT | |
81 | ||
8d6b988b JB |
82 | # obsoleted by pkg-config |
83 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libserialport.la | |
84 | ||
187ae5d2 AM |
85 | %clean |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
16c85d30 JB |
88 | %post -p /sbin/ldconfig |
89 | %postun -p /sbin/ldconfig | |
90 | ||
187ae5d2 AM |
91 | %files |
92 | %defattr(644,root,root,755) | |
8d6b988b | 93 | %doc ChangeLog NEWS README |
187ae5d2 AM |
94 | %attr(755,root,root) %{_libdir}/libserialport.so.*.*.* |
95 | %attr(755,root,root) %ghost %{_libdir}/libserialport.so.0 | |
96 | ||
97 | %files devel | |
98 | %defattr(644,root,root,755) | |
99 | %doc doxy/html-api/* | |
187ae5d2 | 100 | %attr(755,root,root) %{_libdir}/libserialport.so |
8727ecf8 | 101 | %{_includedir}/libserialport.h |
187ae5d2 | 102 | %{_pkgconfigdir}/libserialport.pc |
16c85d30 JB |
103 | |
104 | %if %{with static_libs} | |
105 | %files static | |
106 | %defattr(644,root,root,755) | |
107 | %{_libdir}/libserialport.a | |
108 | %endif |