Accepting request 233287 from home:adra:branches:graphics
Update to new upstream release 2.0.2, Updated License, Updated build requirements, Rebased/Removed/Replaced/Added some patches OBS-URL: https://build.opensuse.org/request/show/233287 OBS-URL: https://build.opensuse.org/package/show/graphics/librecad?expand=0&rev=12
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package librecad
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,34 +16,42 @@
|
||||
#
|
||||
|
||||
|
||||
%global dxfrw_includedir %(pkg-config --cflags-only-I libdxfrw0 | sed 's|-I||g')
|
||||
|
||||
Name: librecad
|
||||
Version: 1.0.3
|
||||
Version: 2.0.2
|
||||
Release: 0
|
||||
Summary: Computer-aided design (CAD) software package for 2D design and drafting
|
||||
License: GPL-2.0
|
||||
License: GPL-2.0 and (Apache-2.0 or SUSE-GPL-3.0+-with-font-exception)
|
||||
Group: Productivity/Graphics/CAD
|
||||
Url: http://librecad.org/
|
||||
|
||||
#Git-Clone: git://github.com/LibreCAD/LibreCAD
|
||||
#Git-Web: http://github.com/LibreCAD/LibreCAD/tags
|
||||
#DL-URL: http://github.com/LibreCAD/LibreCAD/archive/v1.0.3/librecad-1.0.3.tar.gz
|
||||
Source: %name-%version.tar.gz
|
||||
#DL-URL: https://github.com/LibreCAD/LibreCAD/archive/2.0.3.tar.gz
|
||||
Source0: LibreCAD-%version.tar.gz
|
||||
Source1: ttf2lff.1
|
||||
Source2: %name-rpmlintrc
|
||||
Patch1: librecad-no-date.diff
|
||||
Patch2: librecad-dxflib25.diff
|
||||
Patch3: librecad-external-dxflib.diff
|
||||
Patch4: librecad-install.diff
|
||||
Patch5: librecad-plugindir.diff
|
||||
BuildRequires: bash
|
||||
BuildRequires: dxflib-devel
|
||||
# PATCH-FIX-OPENSUSE librecad-no-date.diff -- Remove build time references so build-compare can do its work
|
||||
Patch0: librecad-no-date.diff
|
||||
# PATCH-FIX-UPSTREAM librecad-use-system-libdxfrw.patch asterios.dramis@gmail.com -- Use system libdxfrw (patch taken from Fedora)
|
||||
Patch1: librecad-use-system-libdxfrw.patch
|
||||
# PATCH-FIX-OPENSUSE librecad-install.patch -- Fix install (patch taken from Fedora)
|
||||
Patch2: librecad-install.patch
|
||||
# PATCH-FIX-OPENSUSE librecad-plugindir.patch -- Look in the right spot for plugins (patch taken from Fedora)
|
||||
Patch3: librecad-plugindir.patch
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libdxfrw-devel
|
||||
BuildRequires: libqt4-devel
|
||||
BuildRequires: libqt4-devel-doc
|
||||
BuildRequires: muparser-devel
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: wqy-microhei-fonts
|
||||
Requires(post): desktop-file-utils
|
||||
Requires(post): shared-mime-info
|
||||
Requires(postun): desktop-file-utils
|
||||
Requires(postun): shared-mime-info
|
||||
Recommends: %name-parts
|
||||
# old qcad had a newer version, so we provide all versions here.
|
||||
Provides: qcad
|
||||
@@ -66,31 +74,41 @@ CAD drawings.
|
||||
|
||||
%prep
|
||||
%setup -qn LibreCAD-%version
|
||||
%patch -P 1 -P 2 -P 3 -P 4 -P 5 -p1
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
# Fix paths
|
||||
sed -i 's|##LIBDIR##|%{_libdir}|g' librecad/src/lib/engine/rs_system.cpp
|
||||
sed -i 's|$${DXFRW_INCLUDEDIR}|%{dxfrw_includedir}|g' librecad/src/src.pro
|
||||
|
||||
# Make sure bundled libraries are not used
|
||||
rm -rf libraries/libdxfrw
|
||||
|
||||
%build
|
||||
# qmake seems to have an extra expansion step, so we need one more escape step.
|
||||
f="%optflags -DCONFIG_LIBDIR=\\\\\\\"%_libdir\\\\\\\"";
|
||||
qmake CONFIG+="release" QMAKE_CFLAGS+="$f" QMAKE_CXXFLAGS+="$f";
|
||||
make %{?_smp_mflags};
|
||||
pushd plugins/;
|
||||
qmake CONFIG+="release" QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags";
|
||||
make %{?_smp_mflags};
|
||||
popd;
|
||||
qmake librecad.pro CONFIG+="release" QMAKE_CFLAGS+="%{optflags}" QMAKE_CXXFLAGS+="%{optflags}"
|
||||
make %{?_smp_mflags}
|
||||
rm -f unix/resources/fonts/wqy-unicode.lff
|
||||
mkdir -p unix/resources/fonts
|
||||
./unix/ttf2lff -L "Apache-2.0 or SUSE-GPL-3.0+-with-font-exception" /usr/share/fonts/truetype/wqy-microhei.ttc unix/resources/fonts/wqy-unicode.lff
|
||||
|
||||
%install
|
||||
b="%buildroot";
|
||||
# No make install :(
|
||||
export BUILDDIR="%buildroot/%_datadir/%name";
|
||||
bash scripts/postprocess-unix.sh;
|
||||
sh scripts/postprocess-unix.sh;
|
||||
|
||||
install -Dpm0755 "unix/%name" "$b/%_bindir/%name";
|
||||
install -Dpm0644 desktop/%name.1 "$b/%_mandir/man1/%name.1";
|
||||
install -Dpm0755 "unix/ttf2lff" "$b/%_bindir/ttf2lff"
|
||||
install -Dpm0644 "desktop/%name.1" "$b/%_mandir/man1/%name.1";
|
||||
p="$b/%_libdir/%name/plugins";
|
||||
mkdir -p "$p";
|
||||
install -Dpm0755 unix/resources/plugins/* "$p/";
|
||||
install -Dpm0644 "desktop/%name.desktop" "$b/%_datadir/applications/%name.desktop";
|
||||
install -Dpm0644 "res/main/%name.png" "$b/%_datadir/pixmaps/%name.png";
|
||||
install -Dpm0644 "librecad/res/main/%name.png" "$b/%_datadir/pixmaps/%name.png";
|
||||
install -Dpm0644 "desktop/%name.sharedmimeinfo" "$b/%_datadir/mime/packages/%name.xml"
|
||||
install -Dpm0644 %SOURCE1 "$b/%_mandir/man1/ttf2lff.1"
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%suse_update_desktop_file -G "CAD Program" -r %name Graphics 2DGraphics VectorGraphics
|
||||
@@ -101,18 +119,23 @@ perl -pi -e "s|image/vnd.dxf|image/vnd.dxf;|" %buildroot%_datadir/applications/l
|
||||
%fdupes -s %buildroot
|
||||
|
||||
%post
|
||||
%mime_database_post
|
||||
%desktop_database_post
|
||||
|
||||
%postun
|
||||
%mime_database_postun
|
||||
%desktop_database_postun
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc gpl-2.0.txt
|
||||
%doc LICENSE* README.md gpl-2.0*
|
||||
%_bindir/librecad
|
||||
%_bindir/ttf2lff
|
||||
%_libdir/%name
|
||||
%_mandir/man1/librecad.1*
|
||||
%_mandir/man1/ttf2lff.1*
|
||||
%_datadir/applications/librecad.desktop
|
||||
%_datadir/mime/packages/%name.xml
|
||||
%_datadir/pixmaps/librecad.png
|
||||
%dir %_datadir/%name
|
||||
%_datadir/%name/fonts
|
||||
|
Reference in New Issue
Block a user