- Small spec file cleanup:

* move check to proper section
  * simplify buildconditions a bit
  * run spec-cleaner
  * reduce amount of build dependencies

OBS-URL: https://build.opensuse.org/package/show/Application:Geo/laszip?expand=0&rev=4
This commit is contained in:
Martin Pluskal 2016-07-06 18:33:14 +00:00 committed by Git OBS Bridge
parent 052965c778
commit 880b535b29
2 changed files with 21 additions and 25 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Jul 6 18:28:51 UTC 2016 - mpluskal@suse.com
- Small spec file cleanup:
* move check to proper section
* simplify buildconditions a bit
* run spec-cleaner
* reduce amount of build dependencies
-------------------------------------------------------------------
Thu Feb 12 20:37:23 UTC 2015 - mpluskal@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package laszip
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX 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
@ -25,13 +25,9 @@ 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
# 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
@ -77,7 +73,6 @@ This package contain only the dynamic build.
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
@ -86,33 +81,25 @@ data.
%prep
%setup -q -n laszip-src-%{version}
sed -i 's/-O3 -DNDEBUG//g' ./configure
sed -i 's/-O3 -DNDEBUG//g' ./configure.ac
sed -i 's/-O3//g' ./configure
cp -f %{SOURCE2} COPYING
%build
autoreconf -fi
export CFLAGS="%{optflags} -fno-strict-aliasing -fPIE -pie"
export CXXFLAGS="%{optflags} -fno-strict-aliasing -fPIE -pie"
export LDFLAGS="-Wl,--as-needed -Wl,-z,relro,-z,now -pie"
%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}
%make_install
# Do not ship any static libraries or .la files
find %{buildroot} -type f \( -name '*.a' -o -name '*.la' \) -delete -print
#Cleanup No .a in package
rm -f %{buildroot}%{_libdir}/lib%{name}.a
rm -f %{buildroot}%{_libdir}/lib%{name}.la
%check
make %{?_smp_mflags} check
%post -n lib%{name}6 -p /sbin/ldconfig
%postun -n lib%{name}6 -p /sbin/ldconfig
%files devel