Accepting request 329158 from graphics

- Use cmake macro
- Remove baselibs.conf (it was broken anyways for months)
- Cleanup spec file with spec-cleaner (forwarded request 329105 from pluskalm)

OBS-URL: https://build.opensuse.org/request/show/329158
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openjpeg2?expand=0&rev=6
This commit is contained in:
Dominique Leuenberger 2015-09-08 15:37:36 +00:00 committed by Git OBS Bridge
commit e87e83f038
3 changed files with 25 additions and 35 deletions

View File

@ -1,5 +0,0 @@
libopenjp2-6
openjpeg-devel
requires -openjpeg2-<targettype>
requires "libopenjp2-6-<targettype> = <version>"

View File

@ -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 Sat May 31 07:12:54 UTC 2014 - coolo@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package openjpeg2 # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,9 +17,8 @@
%define library_name libopenjp2-7 %define library_name libopenjp2-7
Name: openjpeg2
%define base_version 2.1 %define base_version 2.1
Name: openjpeg2
Version: %{base_version}.0 Version: %{base_version}.0
Release: 0 Release: 0
Summary: Opensource JPEG 2000 Codec Implementation Summary: Opensource JPEG 2000 Codec Implementation
@ -27,11 +26,9 @@ License: BSD-2-Clause
Group: Productivity/Graphics/Other Group: Productivity/Graphics/Other
Url: http://www.openjpeg.org/ Url: http://www.openjpeg.org/
Source0: http://sourceforge.net/projects/openjpeg.mirror/files/%{version}/openjpeg-%{version}.tar.gz Source0: http://sourceforge.net/projects/openjpeg.mirror/files/%{version}/openjpeg-%{version}.tar.gz
Source1: baselibs.conf
BuildRequires: cmake > 2.8.2 BuildRequires: cmake > 2.8.2
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: pkgconfig(lcms2) BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libtiff-4) BuildRequires: pkgconfig(libtiff-4)
@ -79,11 +76,7 @@ for d in thirdparty/*; do
done done
%build %build
export CFLAGS="%{optflags}" %cmake \
export CXXFLAGS="%{optflags}"
mkdir build
cd build
cmake \
-DBUILD_SHARED_LIBS:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_CODEC:BOOL=ON \ -DBUILD_CODEC:BOOL=ON \
-DBUILD_JPIP:BOOL=OFF \ -DBUILD_JPIP:BOOL=OFF \
@ -92,28 +85,23 @@ cmake \
-DBUILD_TESTING:BOOL=OFF \ -DBUILD_TESTING:BOOL=OFF \
-DBUILD_DOC:BOOL=ON \ -DBUILD_DOC:BOOL=ON \
-DBUILD_THIRDPARTY:BOOL=OFF \ -DBUILD_THIRDPARTY:BOOL=OFF \
-DCMAKE_INSTALL_PREFIX:PATH="%{_prefix}" \ -DOPENJPEG_INSTALL_LIB_DIR:PATH="%{_lib}"
-DOPENJPEG_INSTALL_LIB_DIR:PATH="%{_lib}" \ make %{?_smp_mflags} all doc
-DCMAKE_BUILD_TYPE:STRING="Release" \
..
make %{?_smp_mflags} VERBOSE=1
make %{?_smp_mflags} VERBOSE=1 doc
cat << END > libopenjp2.pc cat << END > libopenjp2.pc
Name: openjpeg Name: openjpeg
Description: Opensource JPEG 2000 Codec Implementation
URL: %{url}
Version: %{version} Version: %{version}
Url: %{url}
Description: Opensource JPEG 2000 Codec Implementation
Libs: -L%{_libdir} -lopenjp2 Libs: -L%{_libdir} -lopenjp2
Libs.private: -lm Libs.private: -lm
Cflags: -I%{_includedir}/openjpeg-%{base_version} Cflags: -I%{_includedir}/openjpeg-%{base_version}
END END
%fdupes -s doc/html/ %fdupes -s doc/html/
%install %install
%make_install -C build %cmake_install
mkdir -p %{buildroot}%{_libdir}/pkgconfig/ mkdir -p %{buildroot}%{_libdir}/pkgconfig/
install -m 644 build/libopenjp2.pc %{buildroot}%{_libdir}/pkgconfig/ install -m 644 build/libopenjp2.pc %{buildroot}%{_libdir}/pkgconfig/
rm -rf %{buildroot}%{_datadir}/doc rm -rf %{buildroot}%{_datadir}/doc