fixed make install for non suse targets (forwarded request 174820 from behrisch) OBS-URL: https://build.opensuse.org/request/show/174837 OBS-URL: https://build.opensuse.org/package/show/graphics/openjpeg2?expand=0&rev=4
110 lines
3.1 KiB
RPMSpec
110 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package openjpeg2
|
|
#
|
|
# Copyright (c) 2012 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 openjpeg 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/
|
|
|
|
# norootforbuild
|
|
|
|
Name: openjpeg2
|
|
Version: 2.0.0
|
|
Release: 1
|
|
Summary: The OpenJPEG library is an open-source JPEG 2000 library
|
|
Group: Development/Libraries/Other
|
|
License: BSD
|
|
URL: http://www.openjpeg.org/
|
|
Source0: openjpeg-%{version}.tar.gz
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: cmake
|
|
BuildRequires: libgeotiff-devel
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: gcc
|
|
BuildRequires: libpng-devel
|
|
BuildRequires: fdupes
|
|
BuildRequires: liblcms2-devel
|
|
|
|
%description
|
|
The main part of the project consists in a JPEG 2000 codec compliant with the Part 1 of the standard (Class-1 Profile-1 compliance)
|
|
|
|
%define library_name libopenjp2-6
|
|
|
|
%package -n libopenjp2-6
|
|
Group: Development/Libraries/Other
|
|
Summary: The OpenJPEG library is an open-source JPEG 2000 library
|
|
License: BSD
|
|
Provides: %{name} = %{version}
|
|
%description -n libopenjp2-6
|
|
The main part of the project consists in a JPEG 2000 codec compliant with the Part 1 of the standard (Class-1 Profile-1 compliance)
|
|
|
|
%package devel
|
|
Summary: Development files for %{name}
|
|
Group: Development/Libraries/Other
|
|
Requires: %{name} = %{version}
|
|
Provides: %{name}-devel = %{version}
|
|
|
|
%description devel
|
|
Development files for the %{name} library. The main part of the project consists in a JPEG 2000 codec compliant with the Part 1 of the standard (Class-1 Profile-1 compliance)
|
|
|
|
|
|
%prep
|
|
%setup -q -n openjpeg-%{version}
|
|
|
|
%build
|
|
cd ..
|
|
mkdir temp
|
|
cd temp
|
|
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 \
|
|
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
|
|
-DCMAKE_INSTALL_LIB_DIR=%{_libdir} \
|
|
-DCMAKE_BUILD_TYPE:STRING="Release" ../openjpeg-%{version}/
|
|
|
|
make VERBOSE=1 %{?_smp_mflags}
|
|
|
|
%install
|
|
cd ../temp
|
|
make DESTDIR=%{buildroot} install
|
|
rm -rf %{buildroot}/usr/lib/debug
|
|
%if "%{_lib}" == "lib64"
|
|
mkdir %{buildroot}/usr/lib64
|
|
mv %{buildroot}/usr/lib/* %{buildroot}/usr/lib64/
|
|
%endif
|
|
%fdupes %{buildroot}
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%files -n libopenjp2-6
|
|
%defattr(-,root,root,-)
|
|
%{_bindir}/*
|
|
%{_libdir}/lib*.so.*
|
|
%{_mandir}/*
|
|
%{_datadir}/*
|
|
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
%{_includedir}/openjpeg-2.0/
|
|
%{_libdir}/lib*.so
|
|
%{_libdir}/openjpeg-2.0/
|
|
|
|
%changelog
|