%define srcname LibreCAD # comment out if not pre release #define prel rc4 # rel for bumping %define rel 1 %define dxfrw_includedir %(pkg-config --cflags-only-I libdxfrw | sed 's|-I||g') # exclude plugin .so from provides %global __provides_exclude_from %{_libdir}/librecad/plugins/.*\\.so Name: librecad Summary: An generic 2D CAD program Version: 2.2.0 Release: %mkrel %{?prel:0.%prel.}%{rel} Group: Graphics/3D License: GPLv2 URL: https://www.librecad.org/ Source0: https://github.com/LibreCAD/LibreCAD/archive/%{version}%{?prel:-%prel}/%{srcname}-%{version}%{?prel:-%prel}.tar.gz # Originally from Fedora: Patch0: LibreCAD-2.2.0-rc3-use-system-shapelib.patch Patch1: LibreCAD-2.1.1-use-system-libdxfrw.patch BuildRequires: boost-devel BuildRequires: pkgconfig(muparser) BuildRequires: pkgconfig(shapelib) BuildRequires: pkgconfig(libdxfrw) BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Sql) BuildRequires: pkgconfig(Qt5Help) BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: qttools5 Recommends: %{name}-data Recommends: %{name}-parts Recommends: %{name}-doc Recommends: %{name}-plugins %description LibreCAD is a Qt5 application to design 2D cad drawing based on the community edition of QCad. %files %doc README.md %license LICENSE %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_metainfodir}/org.librecad.%{name}.appdata.xml %{_datadir}/mime/packages/*.xml %{_iconsdir}/hicolor/scalable/apps/%{name}.svg %{_mandir}/man1/%{name}.1* %dir %{_datadir}/%{name} %dir %{_libdir}/%{name} #----------------------------------------------------------------------------- %package data Summary: Data platform independent files for %{name} Requires: %{name} BuildArch: noarch %description data LibreCAD is an application for computer aided design (CAD) in two dimensions (2D). This package contains platform independent files for LibreCAD, including fonts, patterns, and interface translations. %files data %{_datadir}/%{name}/qm/ %{_datadir}/%{name}/fonts/ %{_datadir}/%{name}/patterns/ #------------------------------------------------------------------------------ %package parts Summary: Parts collection for %{name} Requires: %{name} BuildArch: noarch %description parts Collection of parts for %{name}, a Qt5 application to design 2D cad drawing based on the community edition of QCad. %files parts %{_datadir}/%{name}/library #------------------------------------------------------------------------------ %package plugins Group: Graphics/3D Summary: Plugins libraries files for %{name} Requires: %{name} %description plugins Contains the plugins files for LibreCAD. %files plugins %{_libdir}/%{name}/plugins/ #------------------------------------------------------------------------------ %package doc Summary: Documentation for %{name} BuildArch: noarch %description doc LibreCAD is an application for computer aided design (CAD) in two dimensions (2D). This package contains documentation for LibreCAD. %files doc %doc README.md %doc %{_datadir}/doc/%{name}/html/ %dir %{_datadir}/doc/%{name} #------------------------------------------------------------------------------ %prep %setup -qn %{srcname}-%{version}%{?prel:-%prel} %autopatch -p1 echo 'MUPARSER_DIR = %{_prefix}' >> settings_linux.pro echo 'BOOST_DIR = %{_includedir}' >> settings_linux.pro echo 'BOOST_LIBDIR = %{_libdir}' >> settings_linux.pro sed -i 's|$${DXFRW_INCLUDEDIR}|%{dxfrw_includedir}|g' librecad/src/src.pro # drop bundled libs and use system ones rm -rf plugins/importshp/shapelib rm -rf libraries/libdxfrw rm -rf libraries/muparser # fix version info sed -i -e 's/^LC_VERSION=\".*\"/LC_VERSION=\"%{version}%{?prel:-%prel}\"/' librecad/src/src.pro %build export PATH=%_qt5_bindir:$PATH %qmake_qt5 librecad.pro %make_build %install # Let's create the directory structure mkdir -p %{buildroot}%{_datadir}/%{name}/{fonts,patterns,qm,library/misc,library/templates,doc} mkdir -p %{buildroot}%{_datadir}/doc/%{name}/html/{classref/html/,img,imgs} mkdir -p %{buildroot}%{_datadir}/applications/ mkdir -p %{buildroot}%{_libdir}/%{name}/plugins # Now install all files install -Dm 0755 unix/%{name} %{buildroot}%{_bindir}/%{name} install -Dm 0644 desktop/media/icons/%{name}_icon.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}.svg install -m 0644 unix/resources/patterns/*.dxf %{buildroot}%{_datadir}/%{name}/patterns/ install -m 0644 unix/resources/fonts/* %{buildroot}%{_datadir}/%{name}/fonts/ install -m 0644 unix/resources/library/misc/* %{buildroot}%{_datadir}/%{name}/library/misc/ install -m 0644 unix/resources/library/templates/* %{buildroot}%{_datadir}/%{name}/library/templates/ install -m 0644 unix/resources/qm/*.qm %{buildroot}%{_datadir}/%{name}/qm/ install -m 0755 unix/resources/plugins/* %{buildroot}%{_libdir}/%{name}/plugins/ # Install documentation files install -m 0644 librecad/support/doc/*.html %{buildroot}%{_datadir}/doc/%{name}/html/ # appdata install -Dpm 0644 desktop/org.librecad.librecad.appdata.xml %{buildroot}%{_metainfodir}/org.librecad.librecad.appdata.xml # manpage install -Dpm 0644 desktop/librecad.1 %{buildroot}%{_mandir}/man1/%{name}.1 # Create the desktop file mkdir -p %{buildroot}%{_datadir}/applications/ desktop-file-install \ --dir %{buildroot}%{_datadir}/applications \ --add-category="Qt" \ --remove-mime-type="image/vnd.dxf" \ --add-mime-type="image/vnd.dxf" \ desktop/librecad.desktop install -m 0644 -D desktop/librecad.sharedmimeinfo %{buildroot}%{_datadir}/mime/packages/%{name}.xml %changelog * Wed Feb 01 2023 daviddavid <daviddavid> 2.2.0-1.mga9 + Revision: 1937283 - new version: 2.2.0 (mga#31480) - install upstream manpage - install desktop icon svg * Wed Jun 08 2022 ns80 <ns80> 2.2.0-0.rc4.1.mga9 + Revision: 1863556 - new version 2.2.0-rc4 (mga#30521) * Sun Apr 24 2022 wally <wally> 2.2.0-0.rc3.2.mga9 + Revision: 1852982 - fix version info in About popup window etc. * Sat Apr 23 2022 ns80 <ns80> 2.2.0-0.rc3.1.mga9 + Revision: 1852968 - update patches for CVE-2021-4534[12] (mga#29996) - new version 2.2.0 RC3 (mga#29996) - rebuild for new libdxfrw (mga#29996) * Tue Apr 05 2022 umeabot <umeabot> 2.1.3-15.mga9 + Revision: 1844183 - Mageia 9 Mass Rebuild * Wed Feb 23 2022 ns80 <ns80> 2.1.3-14.mga9 + Revision: 1783540 - add patch add-boost-tuple-include-to-fix-build - add patches from Debian for CVE-2021-4534[12] (mga#29996) * Fri Mar 19 2021 daviddavid <daviddavid> 2.1.3-13.mga9 + Revision: 1704571 - fix permissions on all data files, no need to be executable (mga#28614) - move appdata file to metainfodir path * Tue Dec 22 2020 martinw <martinw> 2.1.3-12.mga8 + Revision: 1662842 - rebuild to regenerate missing subpackages * Thu Dec 17 2020 umeabot <umeabot> 2.1.3-11.mga8 + Revision: 1658954 - Rebuild for new Qt5 * Sun Aug 30 2020 wally <wally> 2.1.3-10.mga8 + Revision: 1620107 - really exclude plugin .so from provides * Sun Aug 30 2020 wally <wally> 2.1.3-9.mga8 + Revision: 1620102 - rebuild for new libdxfrw - filter out plugin .so from provides * Sun Jul 26 2020 daviddavid <daviddavid> 2.1.3-8.mga8 + Revision: 1609039 - add upstream patch to fix build with Qt 5.15 * Sat Feb 15 2020 umeabot <umeabot> 2.1.3-7.mga8 + Revision: 1524788 - Mageia 8 Mass Rebuild * Sun Mar 31 2019 umeabot <umeabot> 2.1.3-6.mga7 + Revision: 1383201 - Qt5 Rebuild * Sun Sep 23 2018 umeabot <umeabot> 2.1.3-5.mga7 + Revision: 1299124 - Mageia 7 Mass Rebuild * Sun Jun 24 2018 daviddavid <daviddavid> 2.1.3-4.mga7 + Revision: 1239381 - add patch to fix build with new Qt5 >= 5.11.0 * Tue Oct 10 2017 daviddavid <daviddavid> 2.1.3-3.mga7 + Revision: 1170704 - rebuild for new shapelib 1.4.1 * Mon Aug 07 2017 daviddavid <daviddavid> 2.1.3-2.mga7 + Revision: 1138646 - remove no more available BR qt5clucene-devel - fix owner of data dir and lib dir * Sun Jan 08 2017 wally <wally> 2.1.3-1.mga6 + Revision: 1080620 - new version 2.1.3 - drop upstreamed patches * Thu Aug 18 2016 wally <wally> 2.1.1-2.mga6 + Revision: 1046840 - new version 2.1.1 - sync patches with Fedora * Sat May 14 2016 wally <wally> 2.0.10-1.mga6 + Revision: 1015394 - new version 2.0.10 * Sat Mar 05 2016 wally <wally> 2.0.9-1.mga6 + Revision: 986047 - new version 2.0.9 + umeabot <umeabot> - Mageia 6 Mass Rebuild * Sun Oct 25 2015 wally <wally> 2.0.8-3.mga6 + Revision: 895425 - rebuild to fix segfault with new libdxfrw * Sun Aug 23 2015 wally <wally> 2.0.8-2.mga6 + Revision: 868299 - add patch originally from Fedora to build with system libdxfrw * Sun Aug 23 2015 wally <wally> 2.0.8-1.mga6 + Revision: 868272 - new version 2.0.8 - drop upstreamed patches - switch to Qt5 * Wed Jan 07 2015 alexl <alexl> 2.0.5-5.mga5 + Revision: 808981 - added GenericName in desktop file * Wed Oct 15 2014 umeabot <umeabot> 2.0.5-4.mga5 + Revision: 742786 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 2.0.5-3.mga5 + Revision: 681752 - Mageia 5 Mass Rebuild + tv <tv> - s/uggests:/Recommends:/ * Sun Sep 14 2014 alexl <alexl> 2.0.5-2.mga5 + Revision: 675476 - translated desktop file (i18n-desktop.patch) * Thu Aug 28 2014 wally <wally> 2.0.5-1.mga5 + Revision: 669090 - new version 2.0.5 - install appdata file * Sat Jun 07 2014 wally <wally> 2.0.4-2.mga5 + Revision: 634303 - rediff shapelib patch after latest shapelib changes * Sat Jun 07 2014 wally <wally> 2.0.4-1.mga5 + Revision: 634270 - new version 2.0.4 - add patch from Fedora to use system shapelib * Fri Jun 06 2014 wally <wally> 2.0.3-2.mga5 + Revision: 634200 - rebuild for new muparser * Sat May 17 2014 sander85 <sander85> 2.0.3-1.mga5 + Revision: 623185 - New version: 2.0.3 * Thu Mar 06 2014 akien <akien> 2.0.2-1.mga5 + Revision: 600481 - New version 2.0.2 * Sat Oct 19 2013 umeabot <umeabot> 2.0.0-0.rc1.2.mga4 + Revision: 531547 - Mageia 4 Mass Rebuild * Mon Aug 05 2013 fwang <fwang> 2.0.0-0.rc1.1.mga4 + Revision: 463943 - update file list - update file list - update file list - update pixmap file location - fix build within moc - update settings switch - br boost - new version 2.0.0rc1 * Sat Jan 12 2013 umeabot <umeabot> 1.0.2-3.mga3 + Revision: 358088 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Nov 30 2012 ovitters <ovitters> 1.0.2-2.mga3 + Revision: 323446 - fix rpm group * Sat Jun 16 2012 fwang <fwang> 1.0.2-1.mga3 + Revision: 260984 - br muparser - new version 1.0.2 - lcms 2 is not needed * Fri Jan 20 2012 schultz <schultz> 1.0.0-1.mga2 + Revision: 198733 - fix plugins subpackge filelist - Update to 1 final - fix file list - fix install * Sat Oct 29 2011 fwang <fwang> 1.0.0-0.rc4.1.mga2 + Revision: 159715 - new version 1.0 rc4 * Sat Oct 01 2011 fwang <fwang> 1.0.0-0.rc3.1.mga2 + Revision: 150703 - updated to rc3 * Sun Sep 25 2011 mikala <mikala> 1.0.0-0.rc2.1.mga2 + Revision: 147585 - Fix .desktop creation - remove rm -rf %%buildroot from %%install (not needed anymore) - Remove %%defattr() & %%clean section - fix Release tag + schultz <schultz> - Use pkgconfig Fix some doc issues - Fix file confict - README moved to doc package Add plugin package - remove rs_debug.patch - Remove beta5 tarball - Remove rs_debug patch, not needed anymore Add rs_ellipse patch - fixes build Update to RC2 * Mon May 02 2011 mikala <mikala> 1.0.0-0.beta5.mga1 + Revision: 94283 - imported package librecad