Commit 51495a9ab5aff87cdad66d56f252aded4ebb4248
1 parent
716dcac9
New spec file for RPM packaging
Showing
4 changed files
with
152 additions
and
97 deletions
.gitignore
configure.ac
libmodbus.spec deleted
| 1 | -Summary: A Modbus library written in C | ||
| 2 | -Name: libmodbus | ||
| 3 | -Version: 2.9.5 | ||
| 4 | -Release: 1%{?dist%} | ||
| 5 | -License: LGPL V2.1+ | ||
| 6 | -Packager: Stéphane Raimbault | ||
| 7 | -URL: http://www.libmodbus.org | ||
| 8 | -Group: Applications/System | ||
| 9 | -Provides: libmodbus=2.9.5 | ||
| 10 | -Requires: ,/bin/sh | ||
| 11 | - | ||
| 12 | -Source0: libmodbus-2.9.5.tar.gz | ||
| 13 | - | ||
| 14 | -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
| 15 | -BuildRequires: autoconf, automake | ||
| 16 | - | ||
| 17 | -%description | ||
| 18 | -The library is written in C and designed to run on Linux, Mac OS X, FreeBSD and | ||
| 19 | -QNX and Windows. | ||
| 20 | - | ||
| 21 | -%prep | ||
| 22 | -%setup -q | ||
| 23 | - | ||
| 24 | -autoreconf | ||
| 25 | - | ||
| 26 | -%build | ||
| 27 | -%configure | ||
| 28 | - | ||
| 29 | -make %{?_smp_mflags} | ||
| 30 | - | ||
| 31 | - | ||
| 32 | -%install | ||
| 33 | -rm -rf %{buildroot} | ||
| 34 | -mkdir -p -m755 %{buildroot}/ | ||
| 35 | -make install DESTDIR=%{buildroot} | ||
| 36 | -mkdir -p -m755 %{buildroot}/usr/share/libmodbus/ | ||
| 37 | -ls -lRh %{buildroot}/ | ||
| 38 | - | ||
| 39 | - | ||
| 40 | -%clean | ||
| 41 | -rm -rf %{buildroot} | ||
| 42 | - | ||
| 43 | - | ||
| 44 | -%files | ||
| 45 | -%defattr(-,root,root) | ||
| 46 | -%attr(0755,root,root) %dir %{_libdir} | ||
| 47 | -%attr(0755,root,root) %dir %{_libdir}/pkgconfig | ||
| 48 | -%attr(0755,root,root) %dir %{_includedir} | ||
| 49 | -%attr(0755,root,root) %dir %{_includedir}/modbus/ | ||
| 50 | -%dir %{_libdir}/libmodbus.so.5 | ||
| 51 | -%dir %{_libdir}/libmodbus.so | ||
| 52 | -%attr(0755,root,root) %{_libdir}/libmodbus.so.5.0.0 | ||
| 53 | -%attr(0755,root,root) %{_libdir}/libmodbus.la | ||
| 54 | -%attr(0644,root,root) %{_libdir}/pkgconfig/libmodbus.pc | ||
| 55 | -%attr(0644,root,root) %{_includedir}/modbus/modbus.h | ||
| 56 | -%attr(0644,root,root) %{_includedir}/modbus/modbus-rtu.h | ||
| 57 | -%attr(0644,root,root) %{_includedir}/modbus/modbus-tcp.h | ||
| 58 | -%attr(0644,root,root) %{_includedir}/modbus/modbus-version.h | ||
| 59 | -%doc AUTHORS MIGRATION NEWS COPYING* README.rst | ||
| 60 | - | ||
| 61 | - | ||
| 62 | -%changelog | ||
| 63 | -* Sun yyy XX 2011 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.9.5-1 | ||
| 64 | -- new upstream release | ||
| 65 | -- revert the license to LGPL v2.1+ | ||
| 66 | - | ||
| 67 | -* Sun Jun 5 2011 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.9.4-1 | ||
| 68 | -- new upstream release | ||
| 69 | - | ||
| 70 | -* Mon Jan 10 2011 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.9.3-1 | ||
| 71 | -- new upstream release | ||
| 72 | - | ||
| 73 | -* Mon Oct 5 2010 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.9.2-1 | ||
| 74 | -- new upstream release | ||
| 75 | - | ||
| 76 | -* Fri Jul 2 2008 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.0.1-1 | ||
| 77 | -- new upstream release | ||
| 78 | - | ||
| 79 | -* Fri May 2 2008 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.0.0-1 | ||
| 80 | -- integrate extern_for_cpp in upstream. | ||
| 81 | -- update the license to version LGPL v3. | ||
| 82 | - | ||
| 83 | -* Tue Apr 30 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.9.0-2 | ||
| 84 | -- get the license corrected in the spec file. | ||
| 85 | -- add a URL for where to find libmodbus. | ||
| 86 | -- tweak the summary and description. | ||
| 87 | - | ||
| 88 | -* Tue Apr 29 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.9.0-1 | ||
| 89 | -- upgrade to latest upstream (pre-release) | ||
| 90 | -- port extern_for_cpp patch to 1.9.0 | ||
| 91 | - | ||
| 92 | -* Tue Apr 29 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.2.4-2_tad | ||
| 93 | -- add a patch to allow compiling with c++ code. | ||
| 94 | - | ||
| 95 | -* Mon Apr 28 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.2.4-1_tad | ||
| 96 | -- build spec file. | ||
| 97 | -- include patch for controling error-treat. |
libmodbus.spec.in
0 → 100644
| 1 | +Name: libmodbus | ||
| 2 | +Version: @PACKAGE_VERSION@ | ||
| 3 | +Release: 1%{?dist%} | ||
| 4 | +Summary: A Modbus library written in C | ||
| 5 | + | ||
| 6 | +Group: Applications/System | ||
| 7 | +License: LGPLv2.1+ | ||
| 8 | +URL: http://www.libmodbus.org/ | ||
| 9 | +Source0: https://github.com/downloads/stephane/libmodbus/libmodbus-%{version}.tar.gz | ||
| 10 | + | ||
| 11 | +Packager: Stéphane Raimbault | ||
| 12 | +Provides: libmodbus=%{version} | ||
| 13 | +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
| 14 | +BuildRequires: gcc, autoconf, automake, libtool | ||
| 15 | + | ||
| 16 | +%description | ||
| 17 | +The library is written in C and designed to run on Linux, Mac OS X, FreeBSD and | ||
| 18 | +QNX and Windows. | ||
| 19 | + | ||
| 20 | +This package contains the libmodbus shared library. | ||
| 21 | + | ||
| 22 | +%package devel | ||
| 23 | +Summary: Development files for the libmodbus library | ||
| 24 | +Group: Development/Libraries | ||
| 25 | +Requires: %{name} = %{version}-%{release}, pkgconfig | ||
| 26 | + | ||
| 27 | +%description devel | ||
| 28 | +The library is written in C and designed to run on Linux, Mac OS X, FreeBSD and | ||
| 29 | +QNX and Windows. | ||
| 30 | + | ||
| 31 | +This package contains libmodbus related development libraries and header files. | ||
| 32 | + | ||
| 33 | +%prep | ||
| 34 | +%setup -q | ||
| 35 | + | ||
| 36 | +autoreconf | ||
| 37 | + | ||
| 38 | +%build | ||
| 39 | +%configure | ||
| 40 | +make %{?_smp_mflags} | ||
| 41 | + | ||
| 42 | +%install | ||
| 43 | +[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} | ||
| 44 | +%{__make} check | ||
| 45 | +%makeinstall | ||
| 46 | + | ||
| 47 | +%post | ||
| 48 | +/sbin/ldconfig | ||
| 49 | + | ||
| 50 | +%postun | ||
| 51 | +/sbin/ldconfig | ||
| 52 | + | ||
| 53 | +%clean | ||
| 54 | +[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} | ||
| 55 | + | ||
| 56 | +%files | ||
| 57 | +%defattr(-,root,root) | ||
| 58 | + | ||
| 59 | +%doc AUTHORS MIGRATION NEWS COPYING* README.rst | ||
| 60 | + | ||
| 61 | +%{_libdir}/libmodbus.so.5 | ||
| 62 | +%{_libdir}/libmodbus.so.5.0.0 | ||
| 63 | + | ||
| 64 | +%files devel | ||
| 65 | +%defattr(-,root,root) | ||
| 66 | +%{_includedir}/modbus/modbus.h | ||
| 67 | +%{_includedir}/modbus/modbus-rtu.h | ||
| 68 | +%{_includedir}/modbus/modbus-tcp.h | ||
| 69 | +%{_includedir}/modbus/modbus-version.h | ||
| 70 | +%dir %{_libdir}/libmodbus.so | ||
| 71 | + | ||
| 72 | +%{_libdir}/libmodbus.la | ||
| 73 | +%{_libdir}/pkgconfig/libmodbus.pc | ||
| 74 | +%{_libdir}/libmodbus.so | ||
| 75 | + | ||
| 76 | +%{_mandir}/man7/libmodbus.7.gz | ||
| 77 | +%{_mandir}/man3/modbus_close.3.gz | ||
| 78 | +%{_mandir}/man3/modbus_connect.3.gz | ||
| 79 | +%{_mandir}/man3/modbus_flush.3.gz | ||
| 80 | +%{_mandir}/man3/modbus_free.3.gz | ||
| 81 | +%{_mandir}/man3/modbus_get_byte_timeout.3.gz | ||
| 82 | +%{_mandir}/man3/modbus_get_header_length.3.gz | ||
| 83 | +%{_mandir}/man3/modbus_get_response_timeout.3.gz | ||
| 84 | +%{_mandir}/man3/modbus_get_socket.3.gz | ||
| 85 | +%{_mandir}/man3/modbus_mapping_free.3.gz | ||
| 86 | +%{_mandir}/man3/modbus_mapping_new.3.gz | ||
| 87 | +%{_mandir}/man3/modbus_new_rtu.3.gz | ||
| 88 | +%{_mandir}/man3/modbus_new_tcp_pi.3.gz | ||
| 89 | +%{_mandir}/man3/modbus_new_tcp.3.gz | ||
| 90 | +%{_mandir}/man3/modbus_read_bits.3.gz | ||
| 91 | +%{_mandir}/man3/modbus_read_input_bits.3.gz | ||
| 92 | +%{_mandir}/man3/modbus_read_input_registers.3.gz | ||
| 93 | +%{_mandir}/man3/modbus_read_registers.3.gz | ||
| 94 | +%{_mandir}/man3/modbus_receive_confirmation.3.gz | ||
| 95 | +%{_mandir}/man3/modbus_receive_from.3.gz | ||
| 96 | +%{_mandir}/man3/modbus_receive.3.gz | ||
| 97 | +%{_mandir}/man3/modbus_report_slave_id.3.gz | ||
| 98 | +%{_mandir}/man3/modbus_rtu_get_serial_mode.3.gz | ||
| 99 | +%{_mandir}/man3/modbus_rtu_set_serial_mode.3.gz | ||
| 100 | +%{_mandir}/man3/modbus_send_raw_request.3.gz | ||
| 101 | +%{_mandir}/man3/modbus_set_byte_timeout.3.gz | ||
| 102 | +%{_mandir}/man3/modbus_set_debug.3.gz | ||
| 103 | +%{_mandir}/man3/modbus_set_error_recovery.3.gz | ||
| 104 | +%{_mandir}/man3/modbus_set_response_timeout.3.gz | ||
| 105 | +%{_mandir}/man3/modbus_set_slave.3.gz | ||
| 106 | +%{_mandir}/man3/modbus_set_socket.3.gz | ||
| 107 | +%{_mandir}/man3/modbus_strerror.3.gz | ||
| 108 | +%{_mandir}/man3/modbus_write_and_read_registers.3.gz | ||
| 109 | +%{_mandir}/man3/modbus_write_bits.3.gz | ||
| 110 | +%{_mandir}/man3/modbus_write_bit.3.gz | ||
| 111 | +%{_mandir}/man3/modbus_write_registers.3.gz | ||
| 112 | +%{_mandir}/man3/modbus_write_register.3.gz | ||
| 113 | + | ||
| 114 | +%changelog | ||
| 115 | +* Thu Jul 7 2011 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.9.5-1 | ||
| 116 | +- revert the license to LGPLv2.1+ | ||
| 117 | +- new spec file generated by autoconf | ||
| 118 | +- add documentation, devel package and various changes | ||
| 119 | + | ||
| 120 | +* Sun Jun 5 2011 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.9.4-1 | ||
| 121 | +- new upstream release | ||
| 122 | + | ||
| 123 | +* Mon Jan 10 2011 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.9.3-1 | ||
| 124 | +- new upstream release | ||
| 125 | + | ||
| 126 | +* Mon Oct 5 2010 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.9.2-1 | ||
| 127 | +- new upstream release | ||
| 128 | + | ||
| 129 | +* Fri Jul 2 2008 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.0.1-1 | ||
| 130 | +- new upstream release | ||
| 131 | + | ||
| 132 | +* Fri May 2 2008 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.0.0-1 | ||
| 133 | +- integrate extern_for_cpp in upstream. | ||
| 134 | +- update the license to version LGPL v3. | ||
| 135 | + | ||
| 136 | +* Tue Apr 30 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.9.0-2 | ||
| 137 | +- get the license corrected in the spec file. | ||
| 138 | +- add a URL for where to find libmodbus. | ||
| 139 | +- tweak the summary and description. | ||
| 140 | + | ||
| 141 | +* Tue Apr 29 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.9.0-1 | ||
| 142 | +- upgrade to latest upstream (pre-release) | ||
| 143 | +- port extern_for_cpp patch to 1.9.0 | ||
| 144 | + | ||
| 145 | +* Tue Apr 29 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.2.4-2_tad | ||
| 146 | +- add a patch to allow compiling with c++ code. | ||
| 147 | + | ||
| 148 | +* Mon Apr 28 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.2.4-1_tad | ||
| 149 | +- build spec file. | ||
| 150 | +- include patch for controling error-treat. |