-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenjpeg2.spec
156 lines (126 loc) · 4.19 KB
/
openjpeg2.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#
# Conditional build:
%bcond_without static_libs # static library
Summary: An open-source JPEG 2000 codec
Summary(pl.UTF-8): Biblioteka kodująca i dekodująca format JPEG 2000
Name: openjpeg2
Version: 2.5.3
Release: 1
License: BSD
Group: Libraries
#Source0Download: https://github.com/uclouvain/openjpeg/releases/
Source0: https://github.com/uclouvain/openjpeg/archive/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 12ae257cb21738c41b5f6ca977d01081
URL: http://www.openjpeg.org/
BuildRequires: cmake >= 3.5
BuildRequires: doxygen
BuildRequires: lcms2-devel >= 2
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: pkgconfig >= 1:0.22
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 1.605
BuildRequires: sed >= 4.0
BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
The OpenJPEG 2 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).
%description -l pl.UTF-8
OpenJPEG 2 to mająca otwarte źródła biblioteka kodująca i dekodująca
format JPEG 2000, napisana w języku C. Powstała w celu promowania
użycia formatu JPEG 2000 - nowego standardu obrazów nieruchomych
stworzonego przez grupę JPEG (Joint Photographic Experts Group).
%package devel
Summary: Header file for OpenJPEG 2 library
Summary(pl.UTF-8): Plik nagłówkowy biblioteki OpenJPEG 2
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
This package contains the header file needed for developing programs
using the OpenJPEG 2 library.
%description devel -l pl.UTF-8
Ten pakiet zawiera plik nagłówkowy potrzebny do tworzenia programów
wykorzystujących bibliotekę OpenJPEG 2.
%package static
Summary: Static OpenJPEG 2 library
Summary(pl.UTF-8): Statyczna biblioteka OpenJPEG 2
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description static
Static OpenJPEG 2 library.
%description static -l pl.UTF-8
Statyczna biblioteka OpenJPEG 2.
%package apidocs
Summary: OpenJPEG 2 API documentation
Summary(pl.UTF-8): Dokumentacja API OpenJPEG 2
Group: Documentation
BuildArch: noarch
%description apidocs
OpenJPEG 2 API documentation.
%description apidocs -l pl.UTF-8
Dokumentacja API OpenJPEG 2.
%package progs
Summary: OpenJPEG 2 codec programs
Summary(pl.UTF-8): Programy kodujące/dekodujące dla biblioteki OpenJPEG 2
Group: Applications/Graphics
Requires: %{name} = %{version}-%{release}
%description progs
OpenJPEG 2 codec programs.
%description progs -l pl.UTF-8
Programy kodujące/dekodujące dla biblioteki OpenJPEG 2.
%prep
%setup -q -n openjpeg-%{version}
%build
%cmake -B build \
-DBUILD_DOC=ON \
%{!?with_static_libs:-DBUILD_STATIC_LIBS=OFF} \
-DOPENJPEG_INSTALL_LIB_DIR=%{_lib}
# not ready for openjpeg 2:
# -DBUILD_JAVA=ON
# -DBUILD_JPWL=ON
# -DBUILD_MJ2=ON
# -DBUILD_VIEWER=ON -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-gtk2-unicode-config
# no BUILD_JPIP here (see openjpip.spec for it)
# no BUILD_JP3D here (see openjp3d.spec for it)
%{__make} -C build
%install
rm -rf $RPM_BUILD_ROOT
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
# packaged as doc
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
%doc AUTHORS.md CHANGELOG.md LICENSE NEWS.md README.md THANKS.md
%attr(755,root,root) %{_libdir}/libopenjp2.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libopenjp2.so.7
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libopenjp2.so
%{_includedir}/openjpeg-2.5
%{_libdir}/cmake/openjpeg-2.5
%{_pkgconfigdir}/libopenjp2.pc
%{_mandir}/man3/libopenjp2.3*
%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libopenjp2.a
%endif
%files apidocs
%defattr(644,root,root,755)
%doc build/doc/html/*
%files progs
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/opj_compress
%attr(755,root,root) %{_bindir}/opj_decompress
%attr(755,root,root) %{_bindir}/opj_dump
%{_mandir}/man1/opj_compress.1*
%{_mandir}/man1/opj_decompress.1*
%{_mandir}/man1/opj_dump.1*