From 31d8d829c6c037af7d2f548479e7e28039a995e0 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Fri, 29 Mar 2013 16:47:18 +0100 Subject: [PATCH 1/2] add spec file for rpm based systems --- libmbus.spec | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 libmbus.spec diff --git a/libmbus.spec b/libmbus.spec new file mode 100644 index 0000000..c126b4d --- /dev/null +++ b/libmbus.spec @@ -0,0 +1,84 @@ +# +# spec file for package libmbus +# +# Copyright (c) 2010-2013, Raditex Control AB +# All rights reserved. +# +# rSCADA +# http://www.rSCADA.se +# info@rscada.se +# + +Summary: Open source M-bus (Meter-Bus) library +Name: libmbus +Version: 0.8.0 +Release: 1 +Source: http://www.rscada.se/public-dist/%{name}-%{version}.tar.gz +URL: http://www.rscada.se/libmbus/ +License: BSD +Vendor: Raditex Control AB +Packager: Stefan Wahren +Group: Development/Languages/C and C++ +BuildRoot: {_tmppath}/%{name}-%{version}-build +AutoReqProv: on + +%description +libmbus: M-bus Library from Raditex Control (http://www.rscada.se) + +libmbus is an open source library for the M-bus (Meter-Bus) protocol. +The Meter-Bus is a standard for reading out meter data from electricity meters, +heat meters, gas meters, etc. The M-bus standard deals with both the electrical +signals on the M-Bus, and the protocol and data format used in transmissions +on the M-Bus. The role of libmbus is to decode/encode M-bus data, and to handle +the communication with M-Bus devices. + +For more information see http://www.rscada.se/libmbus + +%package devel +License: BSD +Summary: Development libraries and header files for using the M-bus library +Group: Development/Libraries/C and C++ +AutoReqProv: on +Requires: %{name} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to compile and link applications which use the M-bus (Meter-Bus) library. + +%prep -q +%setup -q +# workaround to get it's build +autoreconf + +%build +./configure --prefix=/usr +make + +%install +rm -Rf "%buildroot" +mkdir "%buildroot" +make install DESTDIR="%buildroot" + +%clean +rm -rf "%buildroot" + +%files +%defattr (-,root,root) +%doc COPYING README +%{_bindir}/mbus-serial-* +%{_bindir}/mbus-tcp-* +%{_libdir}/libmbus.so* +# man pages doesn't exist in this version +# %{_mandir}/man1/libmbus.1 +# %{_mandir}/man1/mbus-* + +%files devel +%defattr (-,root,root) +%{_includedir}/mbus +%{_libdir}/libmbus.a +%{_libdir}/libmbus.la +%{_libdir}/pkgconfig/libmbus.pc + +%changelog +* Fri Mar 29 2013 Stefan Wahren - 0.8.0-1 +- Initial package based on the last official release \ No newline at end of file From 450ac7b9f4b1ddfe128b5334cf1855b0967153a3 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Thu, 4 Apr 2013 21:20:37 +0200 Subject: [PATCH 2/2] fix build error with automake 1.11 and should work with automake 1.12 too --- configure.ac | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index acdd120..fd8497c 100644 --- a/configure.ac +++ b/configure.ac @@ -15,9 +15,8 @@ AC_CONFIG_AUX_DIR([libltdl/config]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AM_PROG_LIBTOOL -#fix for automake 1.12 -m4_pattern_allow([AM_PROG_AR]) -AM_PROG_AR +# fix for automake 1.11 & 1.12 +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) LDFLAGS="$LDFLAGS -version-info 0:8:0"