Add patches from rallaz
OBS-URL: https://build.opensuse.org/package/show/graphics/librecad?expand=0&rev=6
This commit is contained in:
@@ -27,30 +27,94 @@ Provides: qcad
|
||||
Obsoletes: qcad <= 2.0.5
|
||||
|
||||
#Git-Clone: git://github.com/LibreCAD/LibreCAD
|
||||
Source: librecad-%version.tar.xz
|
||||
#Git-Web: https://github.com/LibreCAD/LibreCAD/tags
|
||||
#DL-URL: https://github.com/LibreCAD/LibreCAD/tarball/v1.0.2
|
||||
Source: %name-%version.tar.xz
|
||||
Source2: %name-rpmlintrc
|
||||
Patch1: librecad-dxflib25.diff
|
||||
Patch2: librecad-no-date.diff
|
||||
Source3: librecad.mime.desktop
|
||||
Patch1: librecad-no-date.diff
|
||||
Patch2: librecad-dxflib25.diff
|
||||
Patch3: librecad-external-dxflib.diff
|
||||
Patch4: librecad-install.diff
|
||||
Patch5: librecad-plugindir.diff
|
||||
BuildRoot: %_tmppath/%name-%version-build
|
||||
BuildRequires: gcc-c++, dxflib-devel, fparser-devel, libqt4-devel, xz
|
||||
BuildRequires: bash, fdupes, gcc-c++, dxflib-devel, muparser-devel
|
||||
BuildRequires: libqt4-devel, libqt4-devel-doc, update-desktop-files, xz
|
||||
Requires(post): shared-mime-info
|
||||
Requires(postun): shared-mime-info
|
||||
Recommends: %name-parts
|
||||
|
||||
%description
|
||||
LibreCAD is a Qt4 application to design 2D CAD drawings.
|
||||
|
||||
%package parts
|
||||
Summary: Parts collection for LibreCAD
|
||||
Requires: %name
|
||||
Group: Productivity/Graphics/CAD
|
||||
BuildArch: noarch
|
||||
|
||||
%description parts
|
||||
Collection of parts for LibreCAD, a Qt4 application to design 2D
|
||||
CAD drawings.
|
||||
|
||||
%prep
|
||||
%setup -qn LibreCAD-LibreCAD-a5c34b2
|
||||
%patch -P 1 -P 2 -p1
|
||||
%patch -P 1 -P 2 -P 3 -P 4 -P 5 -p1
|
||||
|
||||
%build
|
||||
qmake QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags";
|
||||
# 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;
|
||||
|
||||
%install
|
||||
b="%buildroot";
|
||||
mkdir -p "$b/%_bindir";
|
||||
install -pm0755 unix/librecad "$b/%_bindir/";
|
||||
# No make install :(
|
||||
export BUILDDIR="%buildroot/%_datadir/%name";
|
||||
bash scripts/postprocess-unix.sh;
|
||||
|
||||
install -Dpm0755 "unix/%name" "$b/%_bindir/%name";
|
||||
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 "%{S:3}" "$b/%_datadir/mime/image/dxf.desktop";
|
||||
|
||||
#find "$b/%_datadir/%name" -type f -exec chmod a-x "{}" "+";
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%suse_update_desktop_file -r %name Graphics VectorGraphics
|
||||
%suse_update_desktop_file %buildroot/%_datadir/mime/image/dxf.desktop
|
||||
%endif
|
||||
|
||||
%post
|
||||
%_bindir/update-mime-database %_datadir/mime >/dev/null || :
|
||||
|
||||
%postun
|
||||
%_bindir/update-mime-database %_datadir/mime >/dev/null || :
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%_bindir/librecad
|
||||
%_libdir/%name
|
||||
%_mandir/man1/librecad.1*
|
||||
%_datadir/applications/librecad.desktop
|
||||
%_datadir/mime/image/dxf.desktop
|
||||
%_datadir/pixmaps/librecad.png
|
||||
%dir %_datadir/%name
|
||||
%_datadir/%name/fonts
|
||||
%_datadir/%name/patterns
|
||||
%_datadir/%name/qm
|
||||
|
||||
%files parts
|
||||
%defattr(-,root,root)
|
||||
%dir %_datadir/%name
|
||||
%_datadir/%name/library
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user