File cam_board.spec of Package cam_board

#
# spec file for package cam_board
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           cam_board
Version:        0~git20210315.3366b8a
Release:        0
Summary:        Turn web cam into a black / white board
License:        GPL-3.0-only
URL:            https://github.com/kacpertopol/cam_board
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  python3
Requires:       python3-numpy
Requires:       python3-opencv
BuildArch:      noarch

%description
Point your laptop web cam at a piece of paper and the program will stretch
the writable area over the whole screen.

%prep
%autosetup
# fix shebang
sed -i "s|^#\!.*|#\!$(which python3)|" cam_board

%build
# nothing to do here

%install
install -dm755 %{buildroot}%{_bindir}
install -Dm755 cam_board %{buildroot}%{_datadir}/%{name}/%{name}
cp -r to_print/ %{buildroot}%{_datadir}/%{name}
install -m 644 -D aruco_cam_config %{buildroot}%{_datadir}/%{name}/aruco_cam_config
pushd %{buildroot}%{_bindir}
  ln -s %{_datadir}/%{name}/%{name} %{name}
popd

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by