%global debug_package %{nil}

Summary:        open source library for the M-bus (Meter-Bus) protocol
Name:           libmbus
Version:        0.9.0
Release:        1%{?dist}
License:        BSD
Group:          Development/Libraries
URL:            https://github.com/rscada/libmbus
Source0:        https://github.com/rscada/libmbus/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildRequires:  libtool-ltdl-devel
BuildRequires:  libtool
BuildRequires:  gcc

%description
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.

%package        devel
Summary:	libmbus library development files
Requires:	%{name} = %{version}-%{release}

%description	devel
%{summary}.

%prep
%autosetup

%build
autoheader
aclocal
libtoolize --ltdl --copy --force
automake --add-missing --copy
autoconf
%configure
%make_build

%clean
rm -rf $RPM_BUILD_ROOT

%install
%make_install 
rm -f 
%files
%defattr(-,root,root)
%attr(755,root,root) %{_bindir}/*
%{_libdir}/%{name}.so*
%{_datadir}/doc/%{name}-%{version}/*
%{_mandir}/man?/*

%files devel
%{_libdir}/pkgconfig/%{name}*
%{_libdir}/%{name}.a
%{_libdir}/%{name}.la
%{_includedir}/mbus/*

%changelog
* Wed Dec 30 2020 Greg Wildman <greg@techno.co.za> - 0.9.0-1
- Initial spec.