Selaa lähdekoodia

Fix #224496 reported by Todd Denniston.
It is easier to install on rpm based systems with a spec file.

I don't want to update the file to each beta until the 2.0 release so
I already use the 2.0 name in the spec file.

Stéphane Raimbault 17 vuotta sitten
vanhempi
commit
cd93c23637
2 muutettua tiedostoa jossa 89 lisäystä ja 2 poistoa
  1. 10 2
      NEWS
  2. 79 0
      libmodbus.spec

+ 10 - 2
NEWS

@@ -1,4 +1,5 @@
-libmodbus 1.9.x
+libmodbus 2.0.0 (to be released)
+================================
 - Slave API
 - Slave API
   https://blueprints.launchpad.net/libmodbus/+spec/slave-api
   https://blueprints.launchpad.net/libmodbus/+spec/slave-api
 - Waf build support
 - Waf build support
@@ -14,8 +15,8 @@ libmodbus 1.9.x
 - Better error management
 - Better error management
 - Declare more functions with the static keyword
 - Declare more functions with the static keyword
 - Enhance an integer division
 - Enhance an integer division
+- The GNU licences are in version 3
 - Many cleanups
 - Many cleanups
-
 - Fix #159443 reported by Stefan Bisanz
 - Fix #159443 reported by Stefan Bisanz
   Index of incoming data in force multiple coils function
   Index of incoming data in force multiple coils function
 - Fix #161989 reported by Konstantinos Togias
 - Fix #161989 reported by Konstantinos Togias
@@ -29,18 +30,23 @@ libmodbus 1.9.x
   With TCP, automatic reconnect on error may not be desired.
   With TCP, automatic reconnect on error may not be desired.
 - Fix #224485 reported by Todd Denniston
 - Fix #224485 reported by Todd Denniston
   libmodbus does not link with c++ code.
   libmodbus does not link with c++ code.
+- Fix #224496 reported by Todd Denniston
+  It is easier to install on rpm based systems with a spec file.
 
 
 libmodbus 1.2.4 (2008-03-14)
 libmodbus 1.2.4 (2008-03-14)
+============================
 - Fix #191039 reported by Todd Denniston
 - Fix #191039 reported by Todd Denniston
   modbus.h is not installed at prefix.
   modbus.h is not installed at prefix.
 
 
 libmodbus 1.2.3 (2008-02-03)
 libmodbus 1.2.3 (2008-02-03)
+============================
 - Fix #188189 reported by Chris Hellyar
 - Fix #188189 reported by Chris Hellyar
   Compute_response_size() no entry for read_input_status()
   Compute_response_size() no entry for read_input_status()
 - Fix #181887 reported by Jesus Hernandez Tapia.
 - Fix #181887 reported by Jesus Hernandez Tapia.
   Slave address in build_request_packet_tcp() is hardcoded as 0xFF.
   Slave address in build_request_packet_tcp() is hardcoded as 0xFF.
 
 
 libmodbus 1.2.2 (2007-11-12)
 libmodbus 1.2.2 (2007-11-12)
+============================
 - Fix #161989 reported by Konstantinos Togias
 - Fix #161989 reported by Konstantinos Togias
   Serial device paths more than 10 chars long (eg. /dev/ttyUSB0) don't
   Serial device paths more than 10 chars long (eg. /dev/ttyUSB0) don't
   fit to modbus_param_t -> device char[11] var.
   fit to modbus_param_t -> device char[11] var.
@@ -48,6 +54,7 @@ libmodbus 1.2.2 (2007-11-12)
   trunk for a real enhancement).
   trunk for a real enhancement).
 
 
 libmodbus 1.2.1 (2007-11-02)
 libmodbus 1.2.1 (2007-11-02)
+============================
 - Fix #159443 reported by Stefan Bisanz
 - Fix #159443 reported by Stefan Bisanz
   Index of incoming data in force multiple coils function
   Index of incoming data in force multiple coils function
 - Deleted useless code in check_crc16()
 - Deleted useless code in check_crc16()
@@ -55,5 +62,6 @@ libmodbus 1.2.1 (2007-11-02)
 - Changed author's email to Stéphane Raimbault
 - Changed author's email to Stéphane Raimbault
 
 
 libmodbus 1.2.0 (2007-05-10)
 libmodbus 1.2.0 (2007-05-10)
+============================
 - FIX Compilation GCC-4.0
 - FIX Compilation GCC-4.0
 - Project name in autogen.sh
 - Project name in autogen.sh

+ 79 - 0
libmodbus.spec

@@ -0,0 +1,79 @@
+Summary: A Modbus library in C, which supports RTU communication over a serial line or a TCP link. 
+Name: libmodbus
+Version: 2.0.0
+Release: 1
+License: LGPL V3+
+Packager: Some random Internet user
+URL: https://launchpad.net/libmodbus/
+Group: Applications/System          
+Provides: libmodbus=2.0.0
+Requires: ,/bin/sh
+
+Source0: libmodbus-2.0.0.tar.bz2
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: autoconf, automake
+
+%description
+A Modbus library for Linux (and OSX) wrote in C and which supports 
+RTU communication over a serial line or a TCP link. Clean and fast!
+Supports controling an RTU and being an RTU.
+
+%prep
+%setup -q
+
+autoreconf
+
+%build
+%configure 
+
+make
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p -m755 $RPM_BUILD_ROOT/
+make install DESTDIR=$RPM_BUILD_ROOT
+mkdir -p -m755 $RPM_BUILD_ROOT/usr/share/libmodbus/
+ls -lRh $RPM_BUILD_ROOT/
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%attr(0755,root,root) %dir %{_libdir}
+%attr(0755,root,root) %dir %{_libdir}/pkgconfig
+%attr(0755,root,root) %dir %{_includedir}
+%attr(0755,root,root) %dir %{_includedir}/modbus/
+%dir %{_libdir}/libmodbus.so.2
+%dir %{_libdir}/libmodbus.so
+%attr(0755,root,root) %{_libdir}/libmodbus.so.2.0.0
+%attr(0755,root,root) %{_libdir}/libmodbus.la
+%attr(0644,root,root) %{_libdir}/pkgconfig/modbus.pc
+%attr(0644,root,root) %{_includedir}/modbus/modbus.h
+%doc AUTHORS ChangeLog INSTALL NEWS COPYING* README
+
+
+%changelog
+* Fri May 2 2008 Stéphane Raimbault <stephane.raimbault@gmail.com> - 2.0.0-1
+- integrate extern_for_cpp in upstream.
+- update the license to version LGPL v3.
+
+* Tue Apr 30 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.9.0-2
+- get the license corrected in the spec file.
+- add a URL for where to find libmodbus.
+- tweak the summary and description.
+
+* Tue Apr 29 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.9.0-1
+- upgrade to latest upstream (pre-release)
+- port extern_for_cpp patch to 1.9.0
+
+* Tue Apr 29 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.2.4-2_tad
+- add a patch to allow compiling with c++ code.
+
+* Mon Apr 28 2008 Todd Denniston <Todd.Denniston@ssa.crane.navy.mil> - 1.2.4-1_tad
+- build spec file.
+- include patch for controling error-treat.