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