%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
%define unstable 1
Name: piklab
Version: 0.16.1
Release: 17%{?dist}
Summary: Development environment for applications based on PIC & dsPIC microcontrollers
Summary(fr):IDE pour applications à base de microcontrôleurs PIC et de dsPIC
Group: Development/Tools
License: GPLv2+
URL: http://piklab.sourceforge.net
Source: http://switch.dl.sourceforge.net/piklab/%{name}-%{version}.tar.bz2
Source1: %{name}-026-microchip.rules
Source5: %{name}-README.Fedora
Source6: %{name}-LISEZMOI.Fedora
Patch0: %{name}-%{version}-desktop-fr.patch
Patch1: %{name}-0.15.12-use-fedora-docdir.patch
Patch2: %{name}-%{version}-fix-compilation-with-kde4-r2952.patch
Patch3: %{name}-%{version}-fix-kate-part-path-r2936.patch
%if 0%{?rhel}
Patch4: %{name}-%{version}-api-kde4.3.patch
Patch5: %{name}-%{version}-flag-no-access-control.patch
%endif
Patch6: %{name}-%{version}-fr.po.patch
Patch10: %{name}-%{version}-report-error-executable-not-found.rev2928.patch
Patch11: %{name}-%{version}-dont-power-target.rev2930.patch
Patch12: %{name}-%{version}-retry-icd2-serial-10-times.rev2931.patch
Patch13: %{name}-%{version}-fix-crash.rev2940.patch
Patch14: %{name}-%{version}-fix-hang-with-stop-command-in-clp.rev2944.patch
Patch15: %{name}-%{version}-new-sdcc-syntax.rev2953.patch
Patch16: %{name}-%{version}-misc-fixes.rev2956.patch
Patch17: %{name}-%{version}-sdcc-pic18f-generator.patch
Patch18: %{name}-%{version}-source-object-to-linker-in-default-directory.patch
Patch19: %{name}-%{version}-fix-unresizable-widget.rev2961.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils, kdelibs4-devel, libusb-devel, readline-devel
BuildRequires: cmake
# Needed for FC6
BuildRequires: ncurses-devel, gettext
Requires: electronics-menu
%if 0%{?fedora}
Requires: kate-part, kde-runtime, oxygen-icon-theme
%endif
%description
Piklab is a graphic development environment for PIC and dsPIC microcontrollers.
It interfaces with various toolchains for compiling and assembling and it
supports several Microchip and direct programmers.
WARNING: Administrator have to see the README.Fedora file located
in the %{_pkgdocdir} directory
to complete full feature installation.
%description -l fr
Piklab est un environnement de développement graphique pour les
microcontrôleurs PIC et dsPIC. Il s'interface avec diverses chaînes d'outils
pour la compilation et l'assemblage et gère plusieurs programmateurs y compris
ceux de Microchip.
ATTENTION : l'installateur du paquetage doit lire le fichier LISEZMOI.Fedora,
situé dans le répertoire %{_pkgdocdir}, afin de voir
comment finir l'installation.
%prep
%setup -q
%patch0 -p0 -b .desktop-fr
%patch1 -p0 -b .use-fedora-docdir
%patch2 -p0 -b .fix-compilation-with-kde4
%patch3 -p0 -b .fix-kate-part-path
%if 0%{?rhel}
%patch4 -p0 -b .compilation-kde4.3
%patch5 -p0 -b .no-access-control-compilation-flag
%endif
%patch6 -p0 -b .french
%patch10 -p0 -b .report-error
%patch11 -p0 -b .dont-power-target
%patch12 -p0 -b .retry-icd2-serial
%patch13 -p0 -b .fix-crash
%patch14 -p0 -b .fix-hang
%patch15 -p0 -b .new-sdcc-syntax
%patch16 -p0 -b .misc-fixes
%patch17 -p0 -b .sdcc-generator
%patch18 -p0 -b .source-object-to-linker
%patch19 -p0 -b .unresizable-widget
%{__install} -pm 644 %{SOURCE5} README.Fedora
%{__install} -pm 644 %{SOURCE6} LISEZMOI.Fedora
%build
%cmake_kde4
%{__make} %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} install
desktop-file-install \
%if (0%{?fedora} && 0%{?fedora} < 19) || ( 0%{?rhel} && 0%{?rhel} < 7)
--vendor=fedora \
%endif
--dir %{buildroot}%{_datadir}/applications \
--remove-category "Development" \
--remove-category "IDE" \
--delete-original \
%{buildroot}/usr/share/applications/kde4/piklab.desktop
%{__install} -d %{buildroot}%{_udevrulesdir}
%{__install} -pm 644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/26-microchip.rules
# Fix absolute symlink
%{__rm} -f %{buildroot}%{_docdir}/HTML/*/%{name}/common
BKP_PWD=`pwd`
cd %{buildroot}%{_docdir}/HTML/en/%{name}/
ln -s ../common .
cd $BKP_PWD
%find_lang %{name} --with-kde
%clean
%{__rm} -rf %{buildroot}
%post
touch --no-create %{_datadir}/icons/hicolor || :
update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :
touch --no-create %{_datadir}/mime/packages &> /dev/null || :
update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%{udev_rules_update}
%postun
if [ $1 -eq 0 ]
then
touch --no-create %{_datadir}/icons/hicolor || :
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
touch --no-create %{_datadir}/mime/packages &> /dev/null || :
update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
fi
update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :
%{udev_rules_update}
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%{udev_rules_update}
%files -f %{name}.lang
%defattr(-, root, root)
%doc Changelog COPYING README TODO README.Fedora LISEZMOI.Fedora
%{_bindir}/*
%if (0%{?fedora} && 0%{?fedora} < 19) || ( 0%{?rhel} && 0%{?rhel} < 7)
%{_datadir}/applications/fedora-%{name}.desktop
%else
%{_datadir}/applications/%{name}.desktop
%endif
%{_kde4_appsdir}/%{name}/
%{_kde4_appsdir}/katepart/syntax/*
%attr(644, -, -) %{_datadir}/mime/packages/*
%{_datadir}/icons/hicolor/*/*/*
%{_mandir}/man1/*
%{_udevrulesdir}/26-microchip.rules
%changelog
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.16.1-14
- Rebuild for readline 7.x
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.16.1-11
- Rebuilt for GCC 5 C++11 ABI change
* Mon Aug 18 2014 Rex Dieter <rdieter@fedoraproject.org> 0.16.1-10
- update mime scriptlets
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri Dec 13 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.16.1-7
- Fix path to docs in %%description when doc dir is unversioned (#994041).
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Mar 26 2013 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.16.1-5
- Patch for french localization
- Patch to fix an unresizable widget in the CONFIG word generator
- Patch to fix linker failure when sources are not in the defaut directory
- Improve pic18f sdcc generator
- New udev rules (Fixes #922267)
* Wed Mar 6 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.16.1-4
- Remove vendor prefix from desktop files in F19+ https://fedorahosted.org/fesco/ticket/1077
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Sep 20 2012 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.16.1-2
- Report an error when executable is not found (rev2928)
- Don't power target with ICD2 if device nominal VDD is not 5V (rev2930)
- Retry 10 times when setting serial port mode for ICD2 (rev2931-2932)
- Fix crash when changind watched variable value (rev2940)
- Fix hang with stop command in interactive command line programmer (rev2944)
- Fix sdcc generator for latest sdcc (since 3.1.0) (rev2953)
- Miscellaneous fixes (rev2956)
* Fri Sep 14 2012 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.16.1-1
- Added OS conditional build
- Patch to use kde4.3 api instead of newest (Kevin Kofler is a guru!)
* Thu Sep 13 2012 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.16.1-0
- New upstream version (KDE4 port)
- Updated patch 0
- Removed patch 1 (no more x-desktop)
- Remove patches 3, 4 and 5 (fixed upstream)
- Added patch to fix build with KDE4 (r2952)
- Added patch to fix kate-part files path (r2936)
- Used kde4_appsdir macro
- Fixed file permissions
- Added some required runtime dependencies
- Thanks to Branko, Kevin Kofler and Rex Dieter
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Mar 15 2012 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.15.12-1
- New upstream version
- Fix gcc47 failure
- Add PolicyKit support
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.10-8
- Rebuilt for c++ ABI breakage
* Wed Feb 1 2012 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.15.10-7
- Remove stupid previous idea
* Mon Jan 30 2012 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.15.10-6
- Add new defaut sdcc 3.0.0 switch (BZ#750096)
- Change default sdcc unix name to match the sdcc Fedora package
* Tue Jan 17 2012 Ralf Corsépius <corsepiu@fedoraproject.org> - 0.15.10-5
- Add piklab-0.15.10-gcc47.patch (Fix FTBFS with GCC 4.7).
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.10-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Jan 31 2011 Kevin Kofler <Kevin@tigcc.ticalc.org> 0.5.10-2
- Fix FTBFS with GCC 4.6
* Sat Jan 29 2011 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.15.10-1
- New upstream version
- Fix rules (BZ #594932), patch from David Dillow
* Sat May 22 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.15.8-3
- Change name of likeback icons to fix BZ #594932
* Thu May 20 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.15.8-2
- Fix makefile http://fedoraproject.org/wiki/UnderstandingDSOLinkChange
* Tue May 4 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.15.8-1
- New upstream version
- Remove patch10 that are no more needed
- piklab use now cmake
- Patch to add icd2 programmer support for 18F88X, 12F609/615, 16F610
- Patch to remove doc installation also installed in docdir
* Mon Mar 15 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.15.7-2
- Add a patch to fix a bug that didn't allow to find gpsim
* Wed Mar 10 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.15.7-1
- New upstream version
- Remove patches 2 & 3 that are no more needed
* Sun Feb 7 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 0.15.3-5
- Fix typo: this is Piklab, not Pikdev
- New desktop-fr patch
- Update and apply patch2
- Add update-mime-database in scriptlets
- Update gtk-update-icon-cache use in scriptlets
- Add %%posttrans scriptlet
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Mon Nov 10 2008 Thibault North <tnorth [AT] fedoraproject DOT org> - 0.15.3-2
- Fix %%patch3
* Sat Jun 07 2008 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.15.3-1
- New upstream release
- compiling with Qt 3.3
* Fri Jun 06 2008 Aanjhan Ranganathan <aanjhan [AT] tuxmaniac[DOT]com> 0.15.0-2
- Fixed build issues with Fedora 9
- Changed build dep from kdelibs-devel to kdelibs3-devel
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.15.0-2
- Autorebuild for GCC 4.3
* Mon Oct 22 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.15.0-1
- New upstream version
- Update %%patch2
* Sun Sep 02 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.14.5-2
- fixing desktop file
* Fri Aug 17 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.14.5-1
- New upstream version
- %%patch0 is no more needed
- Update %%patch2
- Add man pages
- New Licence GPLv2+
* Sat Jul 21 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.14.2-4
- Remove QT from Categories
* Sat Jul 21 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.14.2-3
- Update Source1 to change the usb udev rules. Fix #249029
* Sun Apr 15 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.14.2-2
- Add patch to complete french translation
* Sat Apr 14 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 0.14.2-1
- New upstream release
* Mon Mar 12 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.14.1-1
- New upstream version
- %%patch2 is no more needed
* Fri Mar 9 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.14.0-2
- Update {LISEZMOI,README}.Fedora files to tell administrator to modify
PATH in /etc/profile for users to be able to use SDCC Compiler
* Wed Mar 7 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.14.0-1
- New upstream version
- Update %%patch2
* Mon Feb 26 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.13.3-2.fc6.1
- Really add patch
* Mon Feb 26 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.13.3-2
- Add patch to complete french translation
* Mon Feb 12 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.13.3-1
- New upstream version
* Wed Nov 15 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.12.2-3
- Fix EVR.
* Tue Nov 14 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.12.2-1
- New upstream version
* Mon Oct 16 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.12.1-1
- New upstream version
* Mon Oct 2 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.12.0-3
- Upstream rebuilt tarball :-(
* Mon Oct 2 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.12.0-2
- Add BR gettext since there is now translation
* Mon Oct 2 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.12.0-1
- New upstream version
- Remove patch1 that is no more needed
* Fri Sep 29 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.11.3-5
- Fix typo in pickit2.perms
* Fri Sep 29 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.11.3-4
- Fix typo for installing pickit2.perms
- Add Application category in desktop file
- Fix symlink: english is the only language where common directory is in
LANG directory while for other, common is in LANG/docs directory
* Fri Sep 29 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.11.3-3
- Add doc about how to complete full feature installation
- Fix typo on security pathname
- Short summary
- Add BR ncurses-devel for FC6
* Thu Sep 28 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.11.3-2
- Remove duplicate BR
- Fix files permissions
- Improve download URL
- Don't mis space and tab
* Wed Sep 27 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.11.3-1
- Initial Fedora package
- Fedorize the Mandriva spec file from Nicolas Hadacek