File fritzing.spec of Package fritzing

# spec file for package fritzing
# Copyright (c) 2014 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

Name:           fritzing
Version:        0.9.0b
Release:        0
Summary:        Intuitive EDA platform featuring from prototype to product
License:        GPL-3.0+
Group:          Productivity/Scientific/Electronics
Requires:       libqt4-sql-sqlite
Requires:       libqt4-x11
BuildRequires:  boost-devel
BuildRequires:  desktop-file-utils
BuildRequires:  libqt4-devel >= 4.7
%if 0%{?suse_version} || 0%{?sles_version}
BuildRequires:  fdupes
%if 0%{?centos_version} || 0%{?rhel_version}
BuildRequires:  gcc-c++
BuildRequires:  qt4-devel
%if 0%{?fedora}
BuildRequires:  gcc-c++
BuildRequires:  libstdc++-devel
BuildRequires:  qt

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

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.

%setup -q -n %{name}-%{version}.source
sed -i 's/\r$//' README.txt
sed -i 's/\r$//' LICENSE.CC-BY-SA

%if 0%{?mandriva_version} || 0%{?centos_version}
export PATH=/usr/lib/qt4/bin:/usr/lib64/qt4/bin:$PATH
export QTDIR=%{_prefix}/lib/qt4/
%if 0%{?fedora} || 0%{?rhel_version}
make %{?_smp_mflags}

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}/parts -name *.svg -exec chmod -x {} \;
find %{buildroot}%{_datadir}/%{name}/parts -name *.fzp -exec chmod -x {} \;
%if 0%{?suse_version} || 0%{?sles_version}
%fdupes %{buildroot}%{_datadir}/%{name}/parts
%fdupes %{buildroot}%{_datadir}/%{name}/sketches

rm -rf %{buildroot}


openSUSE Build Service is sponsored by