SHA256
1
0
forked from pool/laszip
laszip/laszip.spec
Martin Pluskal 8cfb635ed7 Accepting request 285880 from home:pluskalm:branches:Application:Geo
- Cleanup specfile:
  * remove dependency on make
  * remove dependency on own lib (at it is generated automatically)
  * do not use excessive %defines as this is not necessary
  * move test to separate package
  * remove %check section as it is not checking anything, just 
    building test.
- Use autoreconf to prevent random build failures

OBS-URL: https://build.opensuse.org/request/show/285880
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/laszip?expand=0&rev=2
2015-02-13 20:58:58 +00:00

138 lines
4.7 KiB
RPMSpec

#
# spec file for package laszip
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014 Ioda-Net Sàrl, Charmoille, Switzerland. Bruno Friedmann (tigerfoot)
#
# 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: laszip
Version: 2.2.0
Release: 0
Summary: Compression library supporting ASPRS LAS format data
License: LGPL-2.1+
Group: Development/Libraries/C and C++
Url: http://www.laszip.org/
Source0: https://github.com/LASzip/LASzip/releases/download/v%{version}/laszip-src-%{version}.tar.bz2
#Upstream issue pull request Update COPYING #10 on 2014-08-21
Source2: lgpl-2.1.txt
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A free product of rapidlasso GmbH - quickly turns bulky LAS files into
compact LAZ files without information loss. LASzip is a compression library that
was developed by Martin Isenburg for compressing ASPRS LAS format data in his
LAStools. It has been provided as an LGPL-licensed stand-alone software library
to allow other softwares that handle LAS data to read and write LASzip-compressed
data. The BSD-licensed libLAS and the LGPL-licensed LASlib can take advantage of
LASzip to read and write compressed data.
%package test
Summary: Test for %{name}
Group: Development/Libraries/C and C++
%description test
A free product of rapidlasso GmbH - quickly turns bulky LAS files into
compact LAZ files without information loss. LASzip is a compression library that
was developed by Martin Isenburg for compressing ASPRS LAS format data in his
LAStools. It has been provided as an LGPL-licensed stand-alone software library
to allow other softwares that handle LAS data to read and write LASzip-compressed
data. The BSD-licensed libLAS and the LGPL-licensed LASlib can take advantage of
LASzip to read and write compressed data.
This package contain only the laszippertest tool
%package -n lib%{name}6
Summary: Library files for %{name}
Group: System/Libraries
%description -n lib%{name}6
A free product of rapidlasso GmbH - quickly turns bulky LAS files into
compact LAZ files without information loss. LASzip is a compression library that
was developed by Martin Isenburg for compressing ASPRS LAS format data in his
LAStools. It has been provided as an LGPL-licensed stand-alone software library
to allow other softwares that handle LAS data to read and write LASzip-compressed
data. The BSD-licensed libLAS and the LGPL-licensed LASlib can take advantage of
LASzip to read and write compressed data.
This package contain only the dynamic build.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: lib%{name}6 = %{version}
Requires: gcc-c++
%description devel
Headers and development files for %{name} needed to develop
softwares that handle LAS data to read and write LASzip-compressed
data.
%prep
%setup -q -n laszip-src-%{version}
sed -i 's/-O3 -DNDEBUG//g' ./configure
sed -i 's/-O3 -DNDEBUG//g' ./configure.ac
cp -f %{SOURCE2} COPYING
%build
autoreconf -fi
%configure
# Make things more secure, but only on new version
%if 0%{?suse_version} >= 1310
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
export CFLAGS="%{optflags} -fPIE -pie"
export CXXFLAGS="%{optflags} -fPIE -pie"
%endif
make %{?_smp_mflags}
make %{?_smp_mflags} check
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
#Cleanup No .a in package
rm -f %{buildroot}%{_libdir}/lib%{name}.a
rm -f %{buildroot}%{_libdir}/lib%{name}.la
%post -n lib%{name}6 -p /sbin/ldconfig
%postun -n lib%{name}6 -p /sbin/ldconfig
%files devel
%defattr(-,root,root)
%doc ChangeLog AUTHORS COPYING
%{_includedir}/lasunzipper.hpp
%{_includedir}/laszip.hpp
%{_includedir}/laszipexport.hpp
%{_includedir}/laszipper.hpp
%{_libdir}/lib%{name}.so
%files test
%defattr(-,root,root)
%doc ChangeLog AUTHORS COPYING
%{_bindir}/laszippertest
%files -n lib%{name}6
%defattr(-,root,root)
%doc ChangeLog AUTHORS COPYING
%{_libdir}/lib%{name}.so.*
%changelog