File piklab.spec of Package piklab

#
# spec file for package piklab

# Copyright (c) 2018 SUSE LINUX 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:           piklab
Version:        0.16.2
Release:        5
License:        GPL-2.0+
Summary:        IDE for PIC microcontrollers
Url:            http://piklab.sourceforge.net/
Group:          Development/Languages/C and C++
Vendor:         openSUSE-Education
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  kdelibs4-core
BuildRequires:  libkde4-devel
BuildRequires:  libkdecore4-devel
BuildRequires:  libqt4-devel
BuildRequires:  libstdc++-devel
BuildRequires:  libusb-devel
BuildRequires:  readline-devel
%kde4_runtime_requires
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Piklab is a graphic development environment for PIC and dsPIC microcontrollers.
It interfaces with various toochains for compiling and assembling and it
supports several Microchip and direct programmers.

%prep
%setup -q

%build
%cmake \
      -DCMAKE_CXX_FLAGS="%{optflags} -Wno-narrowing"

%if 1 == 0
 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
      -DCMAKE_MODULE_PATH=%{_datadir}/cmake/Modules \
      -D -Wno-narrowing
%endif

%__make %{?_smp_mflags}

%install
%cmake_install

%if 0%{?suse_version}
%suse_update_desktop_file %{name}
mkdir -p %{buildroot}%{_udevrulesdir}
cp -vp udev/26-microchip.rules %{buildroot}%{_udevrulesdir}/
%endif
rm -rf %{buildroot}/lib

%find_lang %{name}
%fdupes -s %{buildroot}%{_datadir}

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
%doc %{_datadir}/doc/HTML/*
%doc %{_mandir}/man1/*
%doc %{_datadir}/doc/%{name}/*
%dir %{_datadir}/applications/kde4
%dir %{_datadir}/doc/%{name}
%{_bindir}/*
%{_udevrulesdir}/
%dir %{_datadir}/kde4/apps/katepart
%dir %{_datadir}/kde4/apps/piklab
%dir %{_datadir}/doc/HTML
%{_datadir}/kde4/apps/katepart/*
%{_datadir}/kde4/apps/piklab/*
%{_datadir}/mime/packages/piklab.xml
%{_datadir}/applications/kde4/piklab.desktop
%{_datadir}/icons/hicolor/*x*/apps/*.png
%{_datadir}/icons/hicolor/32x32/mimetypes/piklab_project.png

%Changelog
openSUSE Build Service is sponsored by