File aurora.spec of Package aurora

#
# spec file for package aurora
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           aurora
Version:        1.9.3
Release:        0
Summary:        CLI for communicating with Aurora solar inverters
License:        GPL-2.0+
Group:          Hardware/Other
Url:            http://www.curtronics.com/Solar/AuroraData.html
Source0:        aurora-1.9.3.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
aurora is a program that communicates with Magnatek, Power One and
ABB Aurora Photovoltaic (solar) Power Inverters written by Curt Blank.
It can retrieve data and statistics from a variety of Aurora Inverters
through either USB or Serial interfaces.

%prep
%setup -q

%build
make %{?_smp_mflags}

%install
# Aurora's `make install` doesn't understand DESTDIR, so %%make_install
# doesn't work, but it would only actually be installing the binary and
# manpage, so may as well just do it by hand here.  The makefile sets
# the aurora binary to mode 4711 (setuid root), but I'm wary of that,
# so using 0755 here.
install -D -m 0755 aurora %{buildroot}%{_bindir}/aurora
install -D -m 0644 docs/man/aurora.1 %{buildroot}%{_mandir}/man1/aurora.1
# `make install` doesn't help with extra docs...
install -d -m 755 %{buildroot}%{_docdir}/aurora/
install -m 0644 LICENSE README RELEASENOTES TODO %{buildroot}%{_docdir}/aurora/

%files
%defattr(-,root,root)
%doc %{_docdir}/aurora
%doc %{_mandir}/man1/aurora.1.gz
%{_bindir}/aurora

%changelog
openSUSE Build Service is sponsored by