openjpeg2/openjpeg2.spec
Marcus Meissner e3defde9b6 Accepting request 233094 from home:frispete:python
- version 2.0.1
  - New Features:
    * Digital Cinema profiles have been fixed and updated
    * New option to disable MCT if needed
    * extended RAW support: it is now possible to input raw images
      with subsampled color components (422, 420, etc)
  - API/ABI modifications: (see abi_compat_report_2.0.1.html in dev-utils/scripts)
    * No changes, API/ABI fully compatible with 2.0.0
    
  - Misc:
    * OpenJPEG is now officialy conformant with JPEG 2000 Part-1
      and will soon become official reference software at the 
      JPEG committee.
    * Huge amount of bug fixes. See CHANGES for details.
- adjust library name

OBS-URL: https://build.opensuse.org/request/show/233094
OBS-URL: https://build.opensuse.org/package/show/graphics/openjpeg2?expand=0&rev=13
2014-05-09 14:20:36 +00:00

144 lines
4.2 KiB
RPMSpec

#
# spec file for package openjpeg2
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define library_name libopenjp2-7
Name: openjpeg2
Version: 2.0.1
Release: 0
Summary: Opensource JPEG 2000 Codec Implementation
License: BSD-2-Clause
Group: Productivity/Graphics/Other
Url: http://www.openjpeg.org/
Source0: openjpeg-%{version}.tar.gz
Source1: baselibs.conf
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libtiff-4)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The OpenJPEG library is an open-source JPEG 2000 codec written in C language.
It has been developed in order to promote the use of JPEG 2000, the new
still-image compression standard from the Joint Photographic Experts Group
(JPEG).
This package provides the codec executables.
%package -n %{library_name}
Summary: Opensource JPEG 2000 Codec Implementation
Group: System/Libraries
%description -n %{library_name}
The OpenJPEG library is an open-source JPEG 2000 codec written in C language.
It has been developed in order to promote the use of JPEG 2000, the new
still-image compression standard from the Joint Photographic Experts Group
(JPEG).
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/Other
Requires: %{library_name} = %{version}
Recommends: %{name} = %{version}
%description devel
The OpenJPEG library is an open-source JPEG 2000 codec written in C language.
It has been developed in order to promote the use of JPEG 2000, the new
still-image compression standard from the Joint Photographic Experts Group
(JPEG).
This package provides the development files for %{name}.
%prep
%setup -q -n openjpeg-%{version}
# do not embed timestamps into html documentation
sed -i 's|^HTML_TIMESTAMP[ =].*$|HTML_TIMESTAMP = NO|' doc/Doxyfile.dox.cmake.in
# ensure no bundled libraries are used
for d in thirdparty/*; do
[ -d "$d" ] && rm -rf "$d"
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" \
..
make %{?_smp_mflags} VERBOSE=1
make %{?_smp_mflags} VERBOSE=1 doc
cat << END > libopenjp2.pc
Name: openjpeg
Description: Opensource JPEG 2000 Codec Implementation
URL: %{url}
Version: %{version}
Libs: -L%{_libdir} -lopenjp2
Libs.private: -lm
Cflags: -I%{_includedir}/openjpeg-2.0
END
%fdupes -s doc/html/
%install
%make_install -C build
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
install -m 644 build/libopenjp2.pc %{buildroot}%{_libdir}/pkgconfig/
rm -rf %{buildroot}%{_datadir}/doc
%post -n %{library_name} -p /sbin/ldconfig
%postun -n %{library_name} -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc AUTHORS CHANGES NEWS LICENSE README THANKS
%{_bindir}/opj_*
%{_mandir}/man1/opj_*.1%{ext_man}
%files -n %{library_name}
%defattr(-,root,root,-)
%{_libdir}/libopenjp2.so.*
%files devel
%defattr(-,root,root,-)
%doc build/doc/html/
%{_includedir}/openjpeg-2.0/
%{_libdir}/libopenjp2.so
%{_libdir}/pkgconfig/libopenjp2.pc
%{_libdir}/openjpeg-2.0/
%{_mandir}/man3/libopenjp2.3%{ext_man}
%changelog