fritzing/fritzing.spec
andrea florio 17b359fbd7 Accepting request 77690 from home:Heinervdm:branches:Education
* Remove an unused include, now fritzing can be compiled with Qt 4.6.
* Fritzing can now be build for Debian 6.0, Ubuntu 10.04, SLE-11-SP1, RHEL6, CentOS-6, Mandriva2010.1
* Added translations to the packages
* Fixed runtimedependencies (libqsqlite.so and libqjped.so)
* Put all LICENSE files in the packages

OBS-URL: https://build.opensuse.org/request/show/77690
OBS-URL: https://build.opensuse.org/package/show/Education/fritzing?expand=0&rev=5
2011-08-03 11:50:55 +00:00

91 lines
2.9 KiB
RPMSpec

#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define snap 2011.07.11
Name: fritzing
Version: 0.6.2b
Release: 0
License: GPLv3+
Summary: Intuitive EDA platform featuring from prototype to product
Url: http://fritzing.org/
Group: Applications/Engineering
Source0: http://fritzing.org/download/%{version}/source-tarball/%{name}.%{snap}.source.tar.bz2
Source1: fritzing.desktop
Source2: fritzing.1
# Fedora-specific patch to relocate shared data for system-wide install;
# will require a more thorough approach from the Fritzing team eventually.
Patch0: fritzing-fix-app-folder.patch
Patch1: remove-unused-qt47-includes.patch
Requires: libqt4-sql-sqlite libqt4-x11
BuildRequires: desktop-file-utils
BuildRequires: libqt4-devel
%if 0%{?centos_version} || 0%{?rhel_version}
BuildRequires: qt4-devel gcc-c++
%endif
%if 0%{?fedora}
BuildRequires: qt gcc-c++ libstdc++-devel
%endif
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}.%{snap}.source
sed -i 's/\r//' README.txt
%patch0 -p1
%patch1 -p1
%build
%if 0%{?mandriva_version} || 0%{?centos_version}
export PATH=/usr/lib/qt4/bin:/usr/lib64/qt4/bin:$PATH
export QTDIR=%{_prefix}/lib/qt4/
%endif
%if 0%{?fedora} || 0%{?rhel_version}
qmake-qt4
%else
qmake
%endif
make %{?_smp_mflags}
%install
%if 0%{?mandriva_version} || 0%{?sles_version}
%{__make} install
%else
%make_install
%endif
install -D -m 0755 Fritzing %{buildroot}%{_bindir}/fritzing
install -d %{buildroot}%{_datadir}/%{name}
cp -pr sketches %{buildroot}%{_datadir}/%{name}
cp -pr parts %{buildroot}%{_datadir}/%{name}
cp -pr bins %{buildroot}%{_datadir}/%{name}
cp -pr translations %{buildroot}%{_datadir}/%{name}
rm %{buildroot}%{_datadir}/%{name}/translations/*.ts
find %{buildroot}%{_datadir}/%{name}/translations -name "*.qm" -size -128c -delete
find %{buildroot}%{_datadir}/%{name} -type f -exec chmod 644 {} \;
find %{buildroot}%{_datadir}/%{name} -type d -exec chmod 755 {} \;
install -D -m 0644 resources/images/fritzing_icon.png %{buildroot}%{_datadir}/pixmaps/fritzing.png
install -D -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/fritzing.1
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README.txt LICENSE.GPL2 LICENSE.GPL3 LICENSE.CC-BY-SA
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man1/%{name}.*
%changelog