]>
Commit | Line | Data |
---|---|---|
1db75207 | 1 | # |
2 | # Conditional build: | |
eb3efda5 | 3 | %bcond_without static_libs # static library |
1db75207 | 4 | # |
eb3efda5 JB |
5 | Summary: libmodbus - free software library to send/receive data according to the Modbus protocol |
6 | Summary(pl.UTF-8): libmodbus - darmowa biblioteka do wysyłania/odbierania danych zgodnie z protokołem Modbus | |
1db75207 | 7 | Name: libmodbus |
eb3efda5 | 8 | # 3.0.x is stable, 3.1.x devel |
e6de84e3 BS |
9 | # This development version is very stable and will be marked as stable very soon |
10 | # according to https://www.libmodbus.org/download | |
11 | Version: 3.1.7 | |
12 | Release: 1 | |
1db75207 | 13 | License: LGPL v2.1+ |
14 | Group: Libraries | |
eb3efda5 | 15 | Source0: http://libmodbus.org/releases/%{name}-%{version}.tar.gz |
e6de84e3 | 16 | # Source0-md5: 8b4299d49643a0edb57d40df4c8170c0 |
1db75207 | 17 | URL: http://www.libmodbus.org/ |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | libmodbus is a free software library to send/receive data according to | |
22 | the Modbus protocol. This library is written in C and supports RTU | |
23 | (serial) and TCP (Ethernet) communications. | |
24 | ||
25 | %description -l pl.UTF-8 | |
26 | libmodman to darmowa biblioteka do wysyłania/odbierania danych zgodnie | |
eb3efda5 JB |
27 | z protokołem Modbus. Jest napisana w C i wspiera komunikację RTU |
28 | (porty szeregowe) i TCP (sieć Ethernet) | |
1db75207 | 29 | |
30 | %package devel | |
31 | Summary: Header files for libmodbus library | |
32 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libmodbus | |
33 | Group: Development/Libraries | |
34 | Requires: %{name} = %{version}-%{release} | |
1db75207 | 35 | |
36 | %description devel | |
37 | Header files for libmodbus library. | |
38 | ||
39 | %description devel -l pl.UTF-8 | |
40 | Pliki nagłówkowe biblioteki libmodbus. | |
41 | ||
eb3efda5 JB |
42 | %package static |
43 | Summary: Static libmodbus library | |
44 | Summary(pl.UTF-8): Statyczna biblioteka libmodbus | |
45 | Group: Development/Libraries | |
46 | Requires: %{name}-devel = %{version}-%{release} | |
47 | ||
48 | %description static | |
49 | Static libmodbus library. | |
50 | ||
51 | %description static -l pl.UTF-8 | |
52 | Statyczna biblioteka libmodbus. | |
53 | ||
1db75207 | 54 | %prep |
55 | %setup -q | |
56 | ||
57 | %build | |
1db75207 | 58 | %{__libtoolize} |
59 | %{__aclocal} | |
1db75207 | 60 | %{__autoconf} |
eb3efda5 | 61 | %{__autoheader} |
1db75207 | 62 | %{__automake} |
eb3efda5 JB |
63 | %configure \ |
64 | --disable-silent-rules \ | |
65 | %{?with_static_libs:--enable-static} | |
1db75207 | 66 | |
67 | %{__make} | |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %{__make} install \ | |
73 | DESTDIR=$RPM_BUILD_ROOT | |
74 | ||
eb3efda5 JB |
75 | # obsoleted by pkg-config |
76 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libmodbus.la | |
77 | ||
e6de84e3 BS |
78 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
79 | ||
1db75207 | 80 | %clean |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %post -p /sbin/ldconfig | |
84 | %postun -p /sbin/ldconfig | |
85 | ||
86 | %files | |
87 | %defattr(644,root,root,755) | |
e6de84e3 | 88 | %doc AUTHORS MIGRATION NEWS README.md |
1db75207 | 89 | %attr(755,root,root) %{_libdir}/libmodbus.so.*.*.* |
90 | %attr(755,root,root) %ghost %{_libdir}/libmodbus.so.5 | |
1db75207 | 91 | |
92 | %files devel | |
93 | %defattr(644,root,root,755) | |
94 | %attr(755,root,root) %{_libdir}/libmodbus.so | |
eb3efda5 | 95 | %{_includedir}/modbus |
1db75207 | 96 | %{_pkgconfigdir}/libmodbus.pc |
eb3efda5 JB |
97 | %{_mandir}/man3/modbus_*.3* |
98 | %{_mandir}/man7/libmodbus.7* | |
99 | ||
100 | %if %{with static_libs} | |
101 | %files static | |
102 | %defattr(644,root,root,755) | |
103 | %{_libdir}/libmodbus.a | |
104 | %endif |