File openprogrammergui.spec of Package openprogrammergui
#
# spec file for package openprogrammergui
#
# Copyright (c) 2012-2025 Wojciech Kazubski, wk@ire.pw.edu.pl
#
# 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: openprogrammergui
Version: 0.12.4
Release: 0
Summary: Control program for open programmer
License: GPL-2.0
%if 0%{?suse_version}
Group: Development/Tools/Other
%endif
%if 0%{?fedora}
Group: Applications/Engineering
%endif
Source0: http://sourceforge.net/projects/openprogrammer/files/OPGUI/opgui_%{version}.tar.gz
Source1: %{name}.desktop
Source2: OP.png
Patch0: openprogrammergui-Makefile.patch
URL: http://openprog.altervista.org/OP_eng.html
Requires: openprogrammer
BuildRequires: gtk3-devel
BuildRequires: dos2unix
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
%if 0%{?fedora}
BuildRequires: desktop-file-utils
%endif
%description
OP: GTK control program for open programmer, an USB programmer for PIC and ATMEL
micros, I2C/SPI/MicroWire memories, and other I2C/SPI devices.
%if 0%{?fedora} >= 23
%define debug_package %{nil}
%endif
%prep
%autosetup -p1 -n opgui-%{version}
%build
%make_build
%install
mkdir -p %{buildroot}
make install DESTDIR=%{buildroot}
dos2unix gpl-2.0.txt
dos2unix readme
#create desktop file
%if 0%{?suse_version}
mkdir -p %{buildroot}%{_datadir}/applications
cp %{SOURCE1} %{buildroot}%{_datadir}/applications
%suse_update_desktop_file -r %{name} Education Engineering
%endif
%if 0%{?fedora}
desktop-file-install \
--vendor= \
--dir %{buildroot}%{_datadir}/applications \
--add-category Qt \
--add-category Education \
%{SOURCE1}
%endif
#create icon
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
cp %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
%check
%files
%doc readme gpl-2.0.txt
%{_bindir}/opgui
%{_datadir}/applications/openprogrammergui.desktop
%{_datadir}/icons/hicolor/32x32/apps/OP.png
%changelog