summaryrefslogtreecommitdiffstats
path: root/openjpeg2-static.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-04-03 12:20:43 +0200
committerRemi Collet <remi@remirepo.net>2019-04-03 12:20:43 +0200
commitabac16440e7dd7e9874c9f81547ba25c757268b0 (patch)
treeabb2310036ed11521fff57f4b37b29b490f9161b /openjpeg2-static.spec
parentc5b81e81a14554c7a808f5344bcd6aafa972d322 (diff)
Update to 2.3.1 from Fedora
Diffstat (limited to 'openjpeg2-static.spec')
-rw-r--r--openjpeg2-static.spec39
1 files changed, 24 insertions, 15 deletions
diff --git a/openjpeg2-static.spec b/openjpeg2-static.spec
index 7639e74..e8266b4 100644
--- a/openjpeg2-static.spec
+++ b/openjpeg2-static.spec
@@ -7,7 +7,7 @@
#global optional_components 1
Name: openjpeg2-static
-Version: 2.3.0
+Version: 2.3.1
Release: 1%{?dist}
Summary: C-Library for JPEG 2000
@@ -22,8 +22,14 @@ Source1: data.tar.xz
# Remove bundled libraries
Patch0: openjpeg2_remove-thirdparty.patch
+# Rename tool names to avoid conflicts with openjpeg-1.x
+Patch1: openjpeg2_opj2.patch
+
BuildRequires: cmake
+# The library itself is C only, but there is some optional C++ stuff, hence the project is not marked as C-only in cmake and hence cmake looks for a c++ compiler
+BuildRequires: gcc-c++
+BuildRequires: make
BuildRequires: zlib-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
@@ -48,7 +54,9 @@ This package contains
%package devel
Summary: Development files for OpenJPEG 2
-#Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+# OpenJPEGTargets.cmake refers to the tools
+Requires: %{name}-tools%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for developing
@@ -196,7 +204,9 @@ OpenJPEG2 JP3D module command line tools
%prep
-%autosetup -p1 -n openjpeg-%{version} %{?runcheck:-a 1}
+%setup -qn openjpeg-%{version}
+%patch0 -p1
+%patch1 -p1
# Remove all third party libraries just to be sure
rm -rf thirdparty
@@ -206,13 +216,13 @@ rm -rf thirdparty
mkdir %{_target_platform}
pushd %{_target_platform}
-export CFLAGS="%{optflags} -fPIC"
-
# TODO: Consider
# -DBUILD_JPIP_SERVER=ON -DBUILD_JAVA=ON
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENJPEG_INSTALL_LIB_DIR=%{_lib} \
%{?optional_components:-DBUILD_MJ2=ON -DBUILD_JPWL=ON -DBUILD_JPIP=ON -DBUILD_JP3D=ON} \
-DBUILD_DOC=ON \
+ -DBUILD_STATIC_LIBS=ON \
+ -DBUILD_SHARED_LIBS=OFF \
%{?runcheck:-DBUILD_TESTING:BOOL=ON -DOPJ_DATA_ROOT=$PWD/../data} \
..
popd
@@ -223,13 +233,6 @@ popd
%install
%make_install -C %{_target_platform}
-# KEEP ONLY the static library
-rm -f %{buildroot}%{_libdir}/libopenjp2.so
-
-# Rename to avoid conflicts with openjpeg-1.x
-for file in %{buildroot}%{_bindir}/opj_*; do
- mv $file ${file/opj_/opj2_}
-done
mv %{buildroot}%{_mandir}/man1/opj_compress.1 %{buildroot}%{_mandir}/man1/opj2_compress.1
mv %{buildroot}%{_mandir}/man1/opj_decompress.1 %{buildroot}%{_mandir}/man1/opj2_decompress.1
mv %{buildroot}%{_mandir}/man1/opj_dump.1 %{buildroot}%{_mandir}/man1/opj2_dump.1
@@ -248,9 +251,10 @@ chmod +x %{buildroot}%{_bindir}/opj2_jpip_viewer
%endif
-%post -p /sbin/ldconfig
-
+%if 0%{?fedora} < 28 && 0%{?rhel} < 8
+%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+%endif
%check
@@ -263,7 +267,6 @@ make test -C %{_target_platform}
%{!?_licensedir:%global license %doc}
%license LICENSE
%doc AUTHORS.md NEWS.md README.md THANKS.md
-%{_libdir}/libopenjp2.so.*
%{_mandir}/man3/libopenjp2.3*
%files devel
@@ -332,6 +335,12 @@ make test -C %{_target_platform}
%changelog
+* Wed Apr 3 2019 Remi Collet <remi@remirepo.net> - 2.3.1-1
+- Update to 2.3.1 from Fedora
+
+* Tue Apr 02 2019 Sandro Mani <manisandro@gmail.com> - 2.3.1-1
+- Update to 2.3.1
+
* Fri Oct 6 2017 Remi Collet <remi@remirepo.net> - 2.3.0-1
- Update to 2.3.0 from Fedora