## Still built with QT4 ## QCAD does not properly work with QT5 because of QT5 bug: ## https://bugreports.qt.io/browse/QTBUG-52988 # Filtering of private libraries %global __provides_exclude_from ^%{_libdir}/%{name}/.*\\.so$ %global __provides_exclude_from ^%{_libdir}/%{name}/.*\\.so.*$ %global __requires_exclude_from ^%{_libdir}/%{name}/.*\\.so$ %global __requires_exclude libqcadcore.so %global __requires_exclude %{__requires_exclude}|libqcadecmaapi.so %global __requires_exclude %{__requires_exclude}|libqcadentity.so %global __requires_exclude %{__requires_exclude}|libqcadoperations.so %global __requires_exclude %{__requires_exclude}|libqcadspatialindex.so # %global _QCAD_DIR %{_libdir}/%{name} %global _QT_PLUGINS %{_qt4_plugindir} Name: qcad Version: 3.16.3.0 Release: 2%{?dist} Summary: Powerful 2D CAD system ## Main license: GPLv3 ## ## 3rd parties licenses: ## dxflib: GPLv2+. # See src/3rdparty/dxflib/gpl-2.0greater.txt ## opennurbs: Public domain (neither copyright nor copyleft apply). # See src/3rdparty/opennurbs/readme.txt ## spatialindexnavel: MIT # See src/3rdparty/spatialindexnavel/COPYING ## stemmer: BSD 2-Clause License # See src/3rdparty/stemmer/bsd-2.txt ## Hershey fonts are released under the terms described in fonts/hershey.readme. ## Other fonts in directory 'fonts' are released as public domain (all copyright ## is waived). License: GPLv3 and GPLv2+ and MIT and BSD and Public Domain and CC-BY and Hershey Source0: https://github.com/qcad/qcad/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: %{name}.desktop Source2: %{name}.appdata.xml URL: http://www.ribbonsoft.com/en/ #BuildRequires: qt5-qtbase-devel, qt5-rpm-macros #BuildRequires: qt5-qtwebkit-devel #BuildRequires: qt5-quazip-devel BuildRequires: qt-devel BuildRequires: qtwebkit-devel BuildRequires: quazip-devel BuildRequires: gcc-c++ BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libXrender-devel BuildRequires: libSM-devel BuildRequires: freetype-devel BuildRequires: fontconfig-devel BuildRequires: openssl-devel BuildRequires: dbus-devel BuildRequires: mesa-libGLU-devel BuildRequires: spatialindex-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib Requires: hicolor-icon-theme #Requires: qt5-designer Requires: wise2 Requires: qgnomeplatform Requires: quazip%{?_isa} Provides: bundled(qtscriptgenerator) = 4.8.7 Provides: bundled(dxflib) = 1.0.0 Provides: bundled(opennurbs) = 201004095 Provides: bundled(stemmer) = 1.0.0 ## Unbundle spatialindex and quazip libraries Patch0: %{name}-qt4-unbundle_libraries.patch %description QCAD is an application for computer aided drafting (CAD) in two dimensions (2D). With QCAD you can create technical drawings such as plans for buildings, interiors, mechanical parts or schematics and diagrams. QCAD was designed with modularity, extensibility and portability in mind. But what people notice most often about QCAD is its intuitive user interface. QCAD is an easy to use but powerful 2D CAD system for everyone. You don't need any CAD experience to get started with QCAD immediately. %prep %setup -q %patch0 -p1 rm -rf src/3rdparty/spatialindexnavel/include/spatialindex rm -f src/3rdparty/quazip/src/*.h %build %{_qt4_qmake} %{name}.pro \ QMAKE_CFLAGS_RELEASE="%{_qt4_optflags} -I%{_includedir}/quazip" \ QMAKE_CXXFLAGS_RELEASE="%{_qt4_optflags} -I%{_includedir}/quazip" \ QMAKE_LFLAGS="%{_qt4_ldflags} -Wl,--as-needed" %make_build %install mkdir -p %{buildroot}%{_QCAD_DIR}/ts mkdir -p %{buildroot}%{_datadir}/pixmaps mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps mkdir -p %{buildroot}%{_QT_PLUGINS}/codecs mkdir -p %{buildroot}%{_QT_PLUGINS}/script mkdir -p %{buildroot}%{_QT_PLUGINS}/designer mkdir -p %{buildroot}%{_QT_PLUGINS}/imageformats mkdir -p %{buildroot}%{_QT_PLUGINS}/sqldrivers mkdir -p %{buildroot}%{_QCAD_DIR}/plugins/codecs mkdir -p %{buildroot}%{_QCAD_DIR}/plugins/designer mkdir -p %{buildroot}%{_QCAD_DIR}/plugins/imageformats mkdir -p %{buildroot}%{_QCAD_DIR}/plugins/sqldrivers mkdir -p %{buildroot}%{_QCAD_DIR}/plugins/script cp -a fonts %{buildroot}%{_QCAD_DIR} cp -a patterns %{buildroot}%{_QCAD_DIR} cp -a themes %{buildroot}%{_QCAD_DIR} cp -a libraries %{buildroot}%{_QCAD_DIR} cp -a scripts %{buildroot}%{_QCAD_DIR} cp -a plugins %{buildroot}%{_QCAD_DIR} install -pm 644 ts/qcad*.qm %{buildroot}%{_QCAD_DIR}/ts ln -sf %{_QT_PLUGINS}/codecs/libqcncodecs.so %{buildroot}%{_QCAD_DIR}/plugins/codecs/libqcncodecs.so ln -sf %{_QT_PLUGINS}/codecs/libqjpcodecs.so %{buildroot}%{_QCAD_DIR}/plugins/codecs/libqjpcodecs.so ln -sf %{_QT_PLUGINS}/codecs/libqkrcodecs.so %{buildroot}%{_QCAD_DIR}/plugins/codecs/libqkrcodecs.so ln -sf %{_QT_PLUGINS}/codecs/libqtwcodecs.so %{buildroot}%{_QCAD_DIR}/plugins/codecs/libqtwcodecs.so ln -sf %{_QT_PLUGINS}/designer/libqwebview.so %{buildroot}%{_QCAD_DIR}/plugins/designer/libqwebview.so ln -sf %{_QT_PLUGINS}/imageformats/libqgif.so %{buildroot}%{_QCAD_DIR}/plugins/imageformats/libqgif.so ln -sf %{_QT_PLUGINS}/imageformats/libqico.so %{buildroot}%{_QCAD_DIR}/plugins/imageformats/libqico.so ln -sf %{_QT_PLUGINS}/imageformats/libqjpeg.so %{buildroot}%{_QCAD_DIR}/plugins/imageformats/libqjpeg.so ln -sf %{_QT_PLUGINS}/imageformats/libqsvg.so %{buildroot}%{_QCAD_DIR}/plugins/imageformats/libqsvg.so ln -sf %{_QT_PLUGINS}/imageformats/libqtga.so %{buildroot}%{_QCAD_DIR}/plugins/imageformats/libqtga.so ln -sf %{_QT_PLUGINS}/imageformats/libqtiff.so %{buildroot}%{_QCAD_DIR}/plugins/imageformats/libqtiff.so ln -sf %{_QT_PLUGINS}/sqldrivers/libqsqlite.so %{buildroot}%{_QCAD_DIR}/plugins/sqldrivers/libqsqlite.so install -pm 644 scripts/qcad_icon.png %{buildroot}%{_datadir}/pixmaps/%{name}.png install -pm 755 release/*.so %{buildroot}%{_QCAD_DIR} install -pm 755 release/mainwindow_prototype %{buildroot}%{_QCAD_DIR} install -pm 755 release/%{name}-bin %{buildroot}%{_QCAD_DIR} install -pm 644 readme.txt %{buildroot}%{_QCAD_DIR} install -pm 644 qcad.1 %{buildroot}%{_mandir}/man1 install -pm 644 scripts/%{name}_icon.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg find %{buildroot}%{_QCAD_DIR} -name ".gitignore" -delete find %{buildroot}%{_QCAD_DIR} -name "readme.txt" -delete find %{buildroot}%{_QCAD_DIR} -name "Makefile" -delete ##Resize IceCat icon pushd %{buildroot}%{_QCAD_DIR} for i in `find . -type f \( -name "*.so*" \)`; do chmod -c 755 $i done popd cat > %{buildroot}%{_bindir}/%{name} </dev/null || : %postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %doc README.md %license LICENSE.txt gpl-3.0.txt cc-by-3.0.txt fonts/hershey.readme %license src/3rdparty/dxflib/gpl-2.0greater.txt %license src/3rdparty/spatialindexnavel/COPYING %license src/3rdparty/stemmer/bsd-2.txt %license src/3rdparty/opennurbs/readme.txt %{_bindir}/%{name} %{_QCAD_DIR}/ %{_datadir}/applications/%{name}.desktop %if 0%{?fedora} %{_datadir}/appdata/%{name}.appdata.xml %endif %{_datadir}/pixmaps/%{name}.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_mandir}/man1/* %changelog * Sun Jan 08 2017 Antonio Trande - 3.16.3.0-2 - Add quazip as Requires package * Wed Dec 28 2016 Antonio Trande - 3.16.3.0-1 - Update to 3.16.3.0 * Tue Dec 20 2016 Antonio Trande - 3.16.2.0-2 - Main directory moved under libdir directory - Filtering of private libraries * Tue Dec 20 2016 Antonio Trande - 3.16.2.0-1 - Return to QT4 (see comment) - Update to 3.16.2.0 * Mon Dec 19 2016 Antonio Trande - 3.15.6.1-3 - Unbundle quazip libraries - Rebuilt with QT5 * Sun Dec 18 2016 Antonio Trande - 3.15.6.1-2 - Unbundle spatialindex libraries * Sun Dec 04 2016 Antonio Trande - 3.15.6.1-1 - Update to 3.15.6.1 * Tue Dec 06 2011 Adam Jackson - 2.0.5.0-14 - Rebuild for new libpng * Tue Feb 08 2011 Fedora Release Engineering - 2.0.5.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sun Jul 4 2010 Alain Portal - 2.0.5.0-12 - Patch to add some missing caracters to the latin1 charset - Patch to to fix a french mispelling - Frenchify desktop and spec files * Sun Jul 26 2009 Fedora Release Engineering - 2.0.5.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Feb 25 2009 Fedora Release Engineering - 2.0.5.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Sep 3 2008 Tom "spot" Callaway - 2.0.5.0-9 - fix license tag * Fri Feb 22 2008 Gerard Milmeister - 2.0.5.0-8 - patch to compile with GCC 4.3 * Mon Feb 18 2008 Fedora Release Engineering - 2.0.5.0-7 - Autorebuild for GCC 4.3 * Wed Jan 23 2008 Gerard Milmeister - 2.0.5.0-6 - added patch to add arc type tangential to menu * Mon Aug 28 2006 Gerard Milmeister - 2.0.5.0-5 - Rebuild for FE6 * Fri Feb 17 2006 Gerard Milmeister - 2.0.5.0-4 - Rebuild for Fedora Extras 5 * Thu Nov 24 2005 Gerard Milmeister - 2.0.5.0-3 - generate and include qm files * Wed Nov 23 2005 Gerard Milmeister - 2.0.5.0 - New Version 2.0.5.0 * Wed May 25 2005 Jeremy Katz - 2.0.4.0-5.fc4 - fix build on 64bit arches (#158650) * Sun May 22 2005 Jeremy Katz - 2.0.4.0-4.fc4 - rebuild on all arches * Tue Apr 5 2005 Michael Schwendt - 2.0.4.0-3.fc4 - Add missing line in qcad-assistant.patch which prevents orphans. * Mon Feb 14 2005 Michael Schwendt - 2.0.4.0-2 - Remove /usr/bin/assistant (-> qt-devel) dependency, replace with patches to open a warning dialog in case of Qt Assistant error conditions. Add a related patch for the English manual which removes references to two missing images. * Sat Feb 12 2005 Gerard Milmeister - 2.0.4.0-1 - Added documentation - Fixed code for calling Qt Assistant: qcad-qass.patch * Mon Nov 15 2004 Gerard Milmeister - 2.0.4.0-0.fdr.2 - Added mime type to desktop file * Fri Oct 1 2004 Gerard Milmeister - 2.0.4.0-0.fdr.1 - New Version 2.0.4.0 * Sat Jun 5 2004 Gerard Milmeister - 2.0.3.3-0.fdr.1 - New Version 2.0.3.3 * Sun Apr 25 2004 Gerard Milmeister - 2.0.3.1-0.fdr.2 - Set QTDIR from qt.sh * Sun Apr 11 2004 Gerard Milmeister - 2.0.3.1-0.fdr.1 - New Version 2.0.3.1 * Sat Feb 28 2004 Gerard Milmeister - 2.0.2.0-0.fdr.1 - New Version 2.0.2.0 * Fri Dec 12 2003 Gerard Milmeister - 2.0.1.3-0.fdr.1 - New Version 2.0.1.3 * Wed Nov 26 2003 Gerard Milmeister - 2.0.1.2-1.fdr.2 - Respect RPM_OPT_FLAGS * Wed Nov 26 2003 Gerard Milmeister - 2.0.1.2-0.fdr.1 - New Version 2.0.1.2 * Tue Oct 21 2003 Gerard Milmeister - 2.0.1.1-1.fdr.1 - First Fedora release