File dxflib.spec of Package dxflib
#
# spec file for package dxflib
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: dxflib
%define lname libdxflib1
Version: 3.7.5
Release: 0
Summary: Parser library for the Drawing Exchange Format (DXF)
License: GPL-2.0+
Group: Development/Libraries/C and C++
Url: http://qcad.org/en/dxflib-downloads
Source: http://qcad.org/archives/dxflib/%name-%version-src.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: libqt4-devel
#BuildRequires: libtool
%description
dxflib is a C++ library mainly for parsing and writing DXF files.
%package -n %lname
Summary: Parser library for the Drawing Exchange Format (DXF)
Group: System/Libraries
%description -n %lname
dxflib is a C++ library mainly for parsing and writing DXF files.
QCAD/LibreCAD uses dxflib to import DXF files.
%package devel
Summary: Development files for dxflib, a DXF parsing library
Group: Development/Libraries/C and C++
Requires: %lname = %version
%description devel
dxflib is a C++ library mainly for parsing and writing DXF files.
This package contains the development library symlink and header
files.
%prep
%setup -qn %name-%version-src
sed -i 's|staticlib|sharedlib|' dxflib.pro
%build
qmake dxflib.pro QMAKE_CFLAGS="%optflags" QMAKE_CXXFLAGS="%optflags"
make %{?_smp_mflags};
%install
# `make install` does not do anything.
b="%buildroot"
mkdir -p "$b/%_libdir" "$b/%_includedir/%name"
cp -a libdxflib.so* "$b/%_libdir/"
install -m 644 src/*.h "$b/%_includedir/%name/"
rm -f "$b/%_libdir"/*.la
%check
make check %{?_smp_mflags};
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root)
%doc gpl-2.0greater.txt
%_libdir/libdxflib.so.*
%files devel
%defattr(-,root,root)
%_includedir/%name/
%_libdir/libdxflib.so
%changelog