From 880b535b2998662b9603590eefac620abcfe6d2b50795e1a25bbb1e89892e402 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 6 Jul 2016 18:33:14 +0000 Subject: [PATCH] - 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 --- laszip.changes | 9 +++++++++ laszip.spec | 37 ++++++++++++------------------------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/laszip.changes b/laszip.changes index fd9ad18..1d4e5a3 100644 --- a/laszip.changes +++ b/laszip.changes @@ -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 diff --git a/laszip.spec b/laszip.spec index 7cab61f..16fc221 100644 --- a/laszip.spec +++ b/laszip.spec @@ -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 @@ -44,7 +40,7 @@ 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} +Summary: Test for %{name} Group: Development/Libraries/C and C++ %description test @@ -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