[packages/librecad] initial PLD release; I've been successfully using 2.0.0 branch for 5 months
gotar
gotar at pld-linux.org
Sat Mar 9 13:43:50 CET 2013
commit cc3e0e33eae2ea0e33d13ca6288f97dacecd162e
Author: Tomasz Pala <gotar at pld-linux.org>
Date: Sat Mar 9 13:38:50 2013 +0100
initial PLD release; I've been successfully using 2.0.0 branch for 5 months
librecad.spec | 115 ++++++++++++++++++++++------------------------------------
1 file changed, 44 insertions(+), 71 deletions(-)
---
diff --git a/librecad.spec b/librecad.spec
index 54f3172..f311b26 100644
--- a/librecad.spec
+++ b/librecad.spec
@@ -1,102 +1,75 @@
+Summary: Generic 2D CAD program
Name: librecad
-Version: 1.0.2
-Release: 0.1
+Version: 2.0.0
+Release: 0.beta2
License: GPL v2
+Group: X11/Applications/Graphics
+Source0: https://github.com/LibreCAD/LibreCAD/archive/%{version}beta2.tar.gz
+# Source0-md5: 3bbcb39b5b65d75377f7f882ed834284
URL: http://www.librecad.org/
-Source0: https://github.com/LibreCAD/LibreCAD/archive/v%{version}.tar.gz
-# Source0-md5: 28f324559f221c1e50dacb15741d09ec
-Summary: An generic 2D CAD program
-Group: X11/Applications
BuildRequires: QtCore-devel
BuildRequires: QtGui-devel
BuildRequires: QtHelp-devel
BuildRequires: QtSql-devel
+BuildRequires: QtSvg-devel
+BuildRequires: QtXml-devel
+BuildRequires: boost-devel
BuildRequires: muparser-devel
BuildRequires: qt4-assistant
BuildRequires: qt4-build
BuildRequires: qt4-linguist
+BuildRequires: qt4-qmake
+Requires: shared-mime-info
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-LibreCAD is a Qt4 application to design 2D cad drawing based on the
+LibreCAD is a Qt4 application to design 2D CAD drawing based on the
community edition of QCad.
%prep
-%setup -q -n LibreCAD-%{version}
+%setup -q -n LibreCAD-%{version}beta2
+%{__sed} -e 's|imgs/LibreCADicon|img/librecadlogo|' -i librecad/support/doc/LibreCADdoc.qhcp
+:> librecad/support/doc/about.txt
+%{__sed} -e 's|lrelease|lrelease-qt4|' -i scripts/postprocess-unix.sh
%build
-qmake-qt4
-%{__make}
-
-cd plugins
-qmake-qt4
+qmake-qt4 %{name}.pro \
+ QMAKE_CXXFLAGS_RELEASE="%{rpmcflags}"
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-
-# Let's create the directory structure
-install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{fonts,patterns,qm,library/misc,library/templates,doc}
-install -d $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/html/{classref/html/,img,imgs}
-install -d $RPM_BUILD_ROOT%{_desktopdir}/
-install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
-# Now install all files
-install -Dm 755 unix/%{name} $RPM_BUILD_ROOT/%{_bindir}/%{name}
-install -Dm 644 res/main/%{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
-install -t $RPM_BUILD_ROOT%{_datadir}/%{name}/patterns/ unix/resources/patterns/*.dxf
-install -t $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts/ unix/resources/fonts/*
-install -t $RPM_BUILD_ROOT%{_datadir}/%{name}/library/misc unix/resources/library/misc/*
-install -t $RPM_BUILD_ROOT%{_datadir}/%{name}/library/templates unix/resources/library/templates/*
-install -t $RPM_BUILD_ROOT%{_datadir}/%{name}/qm/ unix/resources/qm/*.qm
-install -t $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/ unix/resources/plugins/*
-# Install documentation files
-install -t $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/html support/doc/*.html
-
-
-# Create the desktop file
-
-cat > $RPM_BUILD_ROOT%{_desktopdir}/%{_real_vendor}-%{name}.desktop <<EOF
-[Desktop Entry]
-Name=LibreCAD
-GenericName=LibreCAD is a general purpose 2D CAD
-Type=Application
-Categories=Graphics;2DGraphics;VectorGraphics;
-Exec=librecad
-Icon=librecad
-
-EOF
-
-%find_lang %{name}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_desktopdir},%{_datadir}/{mime/packages,%{name}},%{_libdir},%{_mandir}/man1,%{_pixmapsdir}}
+
+install unix/{%{name},ttf2lff} $RPM_BUILD_ROOT%{_bindir}
+ln -s ../..%{_libdir}/%{name} $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins
+cp -r unix/resources/plugins $RPM_BUILD_ROOT%{_libdir}/%{name}
+cp -r unix/resources/{doc,qm} $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -a librecad/support/{fonts,library,patterns} $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -a desktop/%{name}.1 tools/ttf2lff/ttf2lff.1 $RPM_BUILD_ROOT%{_mandir}/man1
+cp -a desktop/%{name}.desktop $RPM_BUILD_ROOT%{_desktopdir}
+cp -a librecad/res/main/%{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
+cp -a desktop/%{name}.sharedmimeinfo $RPM_BUILD_ROOT%{_datadir}/mime/packages/%{name}.xml
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+%update_mime_database
+
+%postun
+%update_mime_database
%files
%defattr(644,root,root,755)
+%doc plugins/importshp/shapelib/ChangeLog
%attr(755,root,root) %{_bindir}/%{name}
-%{_desktopdir}/%{_real_vendor}-%{name}.desktop
+%attr(755,root,root) %{_bindir}/ttf2lff
+# TODO: mark qm/*.qm files with %lang() as %%find_lang doesn't handle files outside */share/locale
+%{_datadir}/%{name}
+%dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}/lib*.so
+%{_desktopdir}/%{name}.desktop
%{_pixmapsdir}/%{name}.png
-
-#%files data
-%defattr(644,root,root,755)
-%{_datadir}/%{name}/qm/
-%{_datadir}/%{name}/fonts/ %{_datadir}/%{name}/patterns/
-
-#%files parts
-%defattr(644,root,root,755)
-%{_datadir}/%{name}/library
-
-#%files plugins
-%defattr(644,root,root,755)
-%{_libdir}/%{name}/plugins/
-
-#%files doc
-%defattr(644,root,root,755)
-# README is here to workaround a bug in %doc of rpm. Possible fix by rpm-4.9
-This package contains documentation for LibreCAD.
-%doc README gpl-2.0.txt support/doc/about.txt
-This package contains documentation for LibreCAD.
-%doc %{_datadir}/doc/%{name}/html/
-
-This package contains documentation for LibreCAD.
-
+%{_datadir}/mime/packages/%{name}.xml
+%{_mandir}/man1/*.1*
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/librecad.git/commitdiff/cc3e0e33eae2ea0e33d13ca6288f97dacecd162e
More information about the pld-cvs-commit
mailing list