From eb4b9666c49fddd535ca1ba06a44d3da7071f0f3899ebecc7511eee84f656566 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 20 Apr 2016 12:24:08 +0000 Subject: [PATCH] feed through sanitizers OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/jemalloc?expand=0&rev=36 --- jemalloc.spec | 67 ++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/jemalloc.spec b/jemalloc.spec index 322307a..1c2bd30 100644 --- a/jemalloc.spec +++ b/jemalloc.spec @@ -26,15 +26,15 @@ Group: Development/Libraries/C and C++ Url: http://canonware.com/jemalloc/ #Git-Clone: git://canonware.com/jemalloc -Source: http://www.canonware.com/download/jemalloc/jemalloc-%{version}.tar.bz2 -Patch0: disable_oom_test.patch +Source: http://www.canonware.com/download/jemalloc/jemalloc-%version.tar.bz2 +Patch1: disable_oom_test.patch BuildRequires: docbook-xsl-stylesheets BuildRequires: libxslt +BuildRequires: pkg-config %if 0%{?suse_version} == 1110 BuildRequires: gcc48 %endif -BuildRequires: pkgconfig -Requires: %lname = %{version} +Requires: %lname = %version BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -52,7 +52,7 @@ This distribution is the stand-alone "portable" version of jemalloc. %package devel Summary: Development files for jemalloc Group: Development/Libraries/C and C++ -Requires: %lname = %{version} +Requires: %lname = %version %description devel Headers for jemalloc, general-purpose scalable concurrent malloc(3) @@ -61,7 +61,7 @@ implementation. %package devel-static Summary: Static libraries for jemalloc Group: Development/Libraries/C and C++ -Requires: %{name}-devel = %{version} +Requires: %name-devel = %version %description devel-static Static libraries of jemalloc, general-purpose scalable concurrent @@ -69,18 +69,18 @@ malloc(3) implementation. %prep %setup -q -%patch0 -p1 +%patch -P 1 -p1 %build -export EXTRA_CFLAGS="%{optflags} -std=gnu99" +export EXTRA_CFLAGS="%optflags -std=gnu99" %if 0%{?suse_version} == 1110 -if [ -f /usr/bin/gcc-4.6 ]; then +if [ -f "%_bindir/gcc-4.6" ]; then export CC=gcc-4.6 fi -if [ -f /usr/bin/gcc-4.7 ]; then +if [ -f "%_bindir/gcc-4.7" ]; then export CC=gcc-4.7 fi -if [ -f /usr/bin/gcc-4.8 ]; then +if [ -f "%_bindir/gcc-4.8" ]; then export CC=gcc-4.8 fi %endif @@ -89,46 +89,43 @@ fi make %{?_smp_mflags} %install -b=%{buildroot}; +b="%buildroot" make install DESTDIR="$b" - -chmod -x "%{buildroot}/%{_libdir}"/*.a - -if [ "%_docdir" != "%{_datadir}/doc" ]; then +chmod -x "%buildroot/%_libdir"/*.a +if [ "%_docdir" != "%_datadir/doc" ]; then # stupid Makefile does not allow to set it - mkdir -p "$b/%_docdir"; - mv "$b/%{_datadir}/doc/jemalloc" "$b/%_docdir/%{name}"; -fi; + mkdir -p "$b/%_docdir" + mv "$b/%_datadir/doc/jemalloc" "$b/%_docdir/%name" +fi %check -export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH="$PWD/lib:$LD_LIBRARY_PATH" make check +%post -n %lname -p /sbin/ldconfig +%postun -n %lname -p /sbin/ldconfig + %files %defattr(-,root,root) -%{_bindir}/jemalloc.sh -%{_bindir}/jemalloc-config -%{_bindir}/jeprof -%{_mandir}/man*/* -%_docdir/%{name} +%_bindir/jemalloc.sh +%_bindir/jemalloc-config +%_bindir/jeprof +%_mandir/man*/* +%_docdir/%name -%files -n %{lname} +%files -n %lname %defattr(-,root,root) %doc ChangeLog COPYING README -%{_libdir}/libjemalloc.so.2* +%_libdir/libjemalloc.so.2* %files devel %defattr(-,root,root,-) -%{_includedir}/jemalloc -%{_libdir}/libjemalloc.so -%{_libdir}/pkgconfig/jemalloc.pc +%_includedir/jemalloc +%_libdir/libjemalloc.so +%_libdir/pkgconfig/jemalloc.pc %files devel-static %defattr(-,root,root,-) -%{_libdir}/libjemalloc*.a - -%post -n %lname -p /sbin/ldconfig - -%postun -n %lname -p /sbin/ldconfig +%_libdir/libjemalloc*.a %changelog