File fritzing.spec of Package fritzing

#
# spec file for package fritzing
#
# Copyright (c) 2015 SUSE LINUX Products 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:           fritzing
Version:        0.9.2b
Release:        0
Summary:        Intuitive EDA platform featuring from prototype to product
License:        GPL-3.0+
Group:          Productivity/Scientific/Electronics
Url:            http://fritzing.org/
Source0:        https://github.com/fritzing/fritzing-app/archive/%{version}.tar.gz
#PATCH-FIX-UPSTREAM fritzing-restore-qt5.1-compatibility.patch -- this patch restores compatibility with Qt5.1
Patch0:         fritzing-restore-qt5.1-compatibility.patch
BuildRequires:  boost-devel
BuildRequires:  desktop-file-utils
BuildRequires:  zlib-devel
BuildRequires:  fdupes
BuildRequires:  libqt5-qtbase-devel
%if 0%{?suse_version} < 1320
BuildRequires:  libQt5SerialPort-devel
BuildRequires:  libQt5Svg-devel
Requires:       libqt5-sql-sqlite
%else
BuildRequires:  libqt5-qtserialport-devel
BuildRequires:  libqt5-qtsvg-devel
Requires:       libQt5Sql5-sqlite
%endif
Requires:       fritzing-parts = %{version}

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Fritzing is an open-source initiative to support designers, artists,
researchers and hobbyists to take the step from physical prototyping
to actual product. It is in the spirit of Processing and Arduino which
allows users to document their Arduino and other electronic-based
prototypes, and to create a PCB layout for manufacturing.

%prep
%setup -q -n %{name}-app-%{version}
%patch0 -p2
sed -i 's/\r$//' LICENSE.CC-BY-SA
chmod -x LICENSE* readme.md Fritzing.1

%build
qmake-qt5
make %{?_smp_mflags}

%install
make INSTALL_ROOT=%{buildroot} install
install -d %{buildroot}%{_datadir}/pixmaps/
mv %{buildroot}%{_datadir}/icons/fritzing.png %{buildroot}%{_datadir}/pixmaps/
desktop-file-install --dir=%{buildroot}%{_datadir}/applications fritzing.desktop
find %{buildroot}%{_datadir}/%{name}/ -type f -exec chmod -x {} \;
rm -rf %{buildroot}%{_datadir}/%{name}/parts
%fdupes %{buildroot}%{_datadir}/%{name}/sketches

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc readme.md LICENSE.GPL2 LICENSE.GPL3 LICENSE.CC-BY-SA
%{_bindir}/Fritzing
%{_datadir}/%{name}/
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/fritzing.desktop
%{_mandir}/man1/Fritzing.*

%changelog
openSUSE Build Service is sponsored by