From 0a2f545e1f0c36dd9c5faf6a45ca9f1d83a1ffe8950cb00ef21ae87039639594 Mon Sep 17 00:00:00 2001 From: Hans-Peter Jansen Date: Fri, 4 Sep 2015 13:50:53 +0000 Subject: [PATCH] Accepting request 329105 from home:pluskalm:branches:graphics - Use cmake macro - Remove baselibs.conf (it was broken anyways for months) - Cleanup spec file with spec-cleaner OBS-URL: https://build.opensuse.org/request/show/329105 OBS-URL: https://build.opensuse.org/package/show/graphics/openjpeg2?expand=0&rev=19 --- baselibs.conf | 5 ----- openjpeg2.changes | 7 +++++++ openjpeg2.spec | 48 ++++++++++++++++++----------------------------- 3 files changed, 25 insertions(+), 35 deletions(-) delete mode 100644 baselibs.conf diff --git a/baselibs.conf b/baselibs.conf deleted file mode 100644 index 0aae9f8..0000000 --- a/baselibs.conf +++ /dev/null @@ -1,5 +0,0 @@ -libopenjp2-6 -openjpeg-devel - requires -openjpeg2- - requires "libopenjp2-6- = " - diff --git a/openjpeg2.changes b/openjpeg2.changes index 5d273e2..c4cd1bc 100644 --- a/openjpeg2.changes +++ b/openjpeg2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Sep 4 11:54:30 UTC 2015 - mpluskal@suse.com + +- Use cmake macro +- Remove baselibs.conf (it was broken anyways for months) +- Cleanup spec file with spec-cleaner + ------------------------------------------------------------------- Sat May 31 07:12:54 UTC 2014 - coolo@suse.com diff --git a/openjpeg2.spec b/openjpeg2.spec index f526451..81240e2 100644 --- a/openjpeg2.spec +++ b/openjpeg2.spec @@ -1,7 +1,7 @@ # # spec file for package openjpeg2 # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# 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 @@ -17,9 +17,8 @@ %define library_name libopenjp2-7 - -Name: openjpeg2 %define base_version 2.1 +Name: openjpeg2 Version: %{base_version}.0 Release: 0 Summary: Opensource JPEG 2000 Codec Implementation @@ -27,11 +26,9 @@ License: BSD-2-Clause Group: Productivity/Graphics/Other Url: http://www.openjpeg.org/ Source0: http://sourceforge.net/projects/openjpeg.mirror/files/%{version}/openjpeg-%{version}.tar.gz -Source1: baselibs.conf BuildRequires: cmake > 2.8.2 BuildRequires: doxygen BuildRequires: fdupes -BuildRequires: gcc BuildRequires: pkgconfig(lcms2) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libtiff-4) @@ -79,41 +76,32 @@ for d in thirdparty/*; do done %build -export CFLAGS="%{optflags}" -export CXXFLAGS="%{optflags}" -mkdir build -cd build -cmake \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DBUILD_CODEC:BOOL=ON \ - -DBUILD_JPIP:BOOL=OFF \ - -DBUILD_JPWL:BOOL=OFF \ - -DBUILD_MJ2:BOOL=OFF \ - -DBUILD_TESTING:BOOL=OFF \ - -DBUILD_DOC:BOOL=ON \ - -DBUILD_THIRDPARTY:BOOL=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH="%{_prefix}" \ - -DOPENJPEG_INSTALL_LIB_DIR:PATH="%{_lib}" \ - -DCMAKE_BUILD_TYPE:STRING="Release" \ - .. +%cmake \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DBUILD_CODEC:BOOL=ON \ + -DBUILD_JPIP:BOOL=OFF \ + -DBUILD_JPWL:BOOL=OFF \ + -DBUILD_MJ2:BOOL=OFF \ + -DBUILD_TESTING:BOOL=OFF \ + -DBUILD_DOC:BOOL=ON \ + -DBUILD_THIRDPARTY:BOOL=OFF \ + -DOPENJPEG_INSTALL_LIB_DIR:PATH="%{_lib}" +make %{?_smp_mflags} all doc -make %{?_smp_mflags} VERBOSE=1 -make %{?_smp_mflags} VERBOSE=1 doc +cat << END > libopenjp2.pc -cat << END > libopenjp2.pc -Name: openjpeg +Name: openjpeg +Version: %{version} +Url: %{url} Description: Opensource JPEG 2000 Codec Implementation -URL: %{url} -Version: %{version} Libs: -L%{_libdir} -lopenjp2 Libs.private: -lm Cflags: -I%{_includedir}/openjpeg-%{base_version} END - %fdupes -s doc/html/ %install -%make_install -C build +%cmake_install mkdir -p %{buildroot}%{_libdir}/pkgconfig/ install -m 644 build/libopenjp2.pc %{buildroot}%{_libdir}/pkgconfig/ rm -rf %{buildroot}%{_datadir}/doc