summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-10-04 18:15:26 +0200
committerRemi Collet <remi@remirepo.net>2017-10-04 18:15:26 +0200
commitb5f50048962c80b2b486e16dbb1d936cfd8850c6 (patch)
treeb85b944d466c05e803a3057e3da24d775e0f0856
parent797aab3e2e4f2c8489f97a00b1d2fef2f12608d5 (diff)
build the static library
-rw-r--r--.gitignore8
-rw-r--r--Makefile4
-rw-r--r--openjpeg2-static.spec (renamed from openjpeg2.spec)19
3 files changed, 26 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..91b0fd5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../common/Makefile
+
diff --git a/openjpeg2.spec b/openjpeg2-static.spec
index 653ae87..72d85aa 100644
--- a/openjpeg2.spec
+++ b/openjpeg2-static.spec
@@ -1,9 +1,12 @@
+# remirepo spec file from fedora
+# adapted to produce static library
+
# Conformance tests disabled by default since it requires 1 GB of test data
#global runcheck 1
#global optional_components 1
-Name: openjpeg2
+Name: openjpeg2-static
Version: 2.2.0
Release: 3%{?dist}
Summary: C-Library for JPEG 2000
@@ -55,7 +58,7 @@ This package contains
%package devel
Summary: Development files for OpenJPEG 2
-Requires: %{name}%{?_isa} = %{version}-%{release}
+#Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for developing
@@ -212,6 +215,9 @@ rm -rf thirdparty
%build
mkdir %{_target_platform}
pushd %{_target_platform}
+
+export CFLAGS=-fPIC
+
# TODO: Consider
# -DBUILD_JPIP_SERVER=ON -DBUILD_JAVA=ON
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENJPEG_INSTALL_LIB_DIR=%{_lib} \
@@ -227,8 +233,8 @@ popd
%install
%make_install -C %{_target_platform}
-# Remove static library
-rm -f %{buildroot}%{_libdir}/libopenjp2.a
+# 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
@@ -275,7 +281,7 @@ make test -C %{_target_platform}
%{_includedir}/openjpeg-2.2/openjpeg.h
%{_includedir}/openjpeg-2.2/opj_config.h
%{_includedir}/openjpeg-2.2/opj_stdint.h
-%{_libdir}/libopenjp2.so
+%{_libdir}/libopenjp2.a
%{_libdir}/openjpeg-2.2/
%{_libdir}/pkgconfig/libopenjp2.pc
@@ -336,6 +342,9 @@ make test -C %{_target_platform}
%changelog
+* Wed Oct 4 2017 Remi Collet <remi@remirepo.net> - 2.2.0-3
+- build the static library
+
* Thu Aug 31 2017 Sandro Mani <manisandro@gmail.com> - 2.2.0-3
- Backport more security fixes, including for CVE-2017-14041 and CVE-2017-14040