]>
Commit | Line | Data |
---|---|---|
08b26dc7 | 1 | Summary: A library for decoding RAW images |
21d5447a | 2 | Summary(pl.UTF-8): Biblioteka dekodująca obrazy w formacie RAW |
08b26dc7 | 3 | Name: libopenraw |
40dddec8 JB |
4 | Version: 0.2.3 |
5 | Release: 1 | |
6f2f45d1 | 6 | License: LGPL v2.1+ |
21d5447a | 7 | Group: Libraries |
eb6179ee | 8 | Source0: https://libopenraw.freedesktop.org/download/%{name}-%{version}.tar.xz |
40dddec8 | 9 | # Source0-md5: 6081f678f8c06216dfb10af24bbfc85f |
75d9a064 JB |
10 | # cd libopenraw-%{version} |
11 | # cargo vendor --manifest-path lib/mp4/Cargo.toml --sync lib/mp4/mp4parse_capi/Cargo.toml --sync lib/mp4/mp4parse/Cargo.toml --no-delete --versioned-dirs | |
12 | # cd .. | |
13 | # tar cJf libopenraw-%{version}-vendor.tar.xz libopenraw-%{version}/vendor libopenraw-%{version}/lib/mp4/Cargo.lock libopenraw-%{version}/lib/mp4/mp4parse_capi/Cargo.lock libopenraw-%{version}/lib/mp4/mp4parse/Cargo.lock | |
14 | Source1: %{name}-%{version}-vendor.tar.xz | |
15 | # Source1-md5: 1d51cd2d97ab62335d92f82c21a54f35 | |
40dddec8 JB |
16 | Patch0: %{name}-pc.patch |
17 | Patch1: %{name}-link.patch | |
59709f9e | 18 | Patch2: %{name}-cargo.patch |
4c9f1cf8 | 19 | URL: https://libopenraw.freedesktop.org/ |
76d02d11 MB |
20 | BuildRequires: autoconf >= 2.50 |
21 | BuildRequires: automake | |
14de13dc | 22 | BuildRequires: boost-devel >= 1.35.0 |
40dddec8 | 23 | BuildRequires: cargo |
e312fd68 | 24 | BuildRequires: gdk-pixbuf2-devel >= 2.0.0 |
cceb564d | 25 | BuildRequires: glib2-devel >= 2.0.0 |
c2c2b2ca | 26 | BuildRequires: libjpeg-devel |
3c89413c | 27 | BuildRequires: libstdc++-devel >= 6:4.8 |
40dddec8 | 28 | BuildRequires: libtool >= 1:1.4.2 |
3c89413c | 29 | # required for testsuite |
bedcd43d | 30 | BuildRequires: libxml2-devel >= 1:2.5.0 |
507265a4 | 31 | BuildRequires: pkgconfig |
40dddec8 JB |
32 | BuildRequires: rust |
33 | ExclusiveArch: %{ix86} %{x8664} x32 aarch64 | |
08b26dc7 | 34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
e5b0e883 | 36 | %if "%{_lib}" != "lib" |
5938903d | 37 | %define libext %(lib="%{_lib}"; echo ${lib#lib}) |
5938903d | 38 | %define pqext -%{libext} |
e5b0e883 | 39 | %else |
5938903d | 40 | %define pqext %{nil} |
e5b0e883 MB |
41 | %endif |
42 | ||
08b26dc7 | 43 | %description |
44 | libopenraw is an ongoing project to provide a free software | |
45 | implementation for camera RAW files decoding. One of the main reason | |
21d5447a JB |
46 | is that dcraw is not suited for easy integration into applications, |
47 | and there is a need for an easy to use API to build free software | |
48 | digital image processing application. | |
08b26dc7 | 49 | |
b865330f | 50 | %description -l pl.UTF-8 |
51 | libopenraw jest projektem dostarczającym wolnodostępną | |
52 | implementację dekodera plików w formacie RAW obsługiwanych przez | |
53 | cyfrowe aparaty fotograficzne. Jednym z głównych powodów powstania | |
21d5447a JB |
54 | tej biblioteki jest to, że dcraw nie jest przystosowany do łatwej |
55 | integracji z aplikacjami, a istnieje potrzeba stworzenia łatwego w | |
56 | użyciu API do budowy wolnodostępnej aplikacji przetwarzania cyfrowych | |
57 | obrazów. | |
b865330f | 58 | |
08b26dc7 | 59 | %package devel |
60 | Summary: Header files for libopenraw library | |
b865330f | 61 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libopenraw |
08b26dc7 | 62 | Group: Development/Libraries |
63 | Requires: %{name} = %{version}-%{release} | |
507265a4 JB |
64 | Requires: libjpeg-devel |
65 | Requires: libstdc++-devel | |
08b26dc7 | 66 | |
67 | %description devel | |
68 | Header files for libopenraw library. | |
69 | ||
70 | %description devel -l pl.UTF-8 | |
71 | Pliki nagłówkowe biblioteki libopenraw. | |
72 | ||
73 | %package static | |
74 | Summary: Static libopenraw library | |
75 | Summary(pl.UTF-8): Statyczna biblioteka libopenraw | |
76 | Group: Development/Libraries | |
77 | Requires: %{name}-devel = %{version}-%{release} | |
78 | ||
79 | %description static | |
80 | Static libopenraw library. | |
81 | ||
82 | %description static -l pl.UTF-8 | |
83 | Statyczna biblioteka libopenraw. | |
84 | ||
bedcd43d JB |
85 | %package gnome |
86 | Summary: Library for decoding RAW images - GTK+/GNOME support | |
87 | Summary(pl.UTF-8): Biblioteka dekodująca obrazy w formacie RAW - obsługa GTK+/GNOME | |
88 | Group: X11/Libraries | |
e312fd68 JB |
89 | Requires(post,postun): /sbin/ldconfig |
90 | Requires(post,postun): gdk-pixbuf2 >= 2.0.0 | |
bedcd43d | 91 | Requires: %{name} = %{version}-%{release} |
e312fd68 | 92 | Requires: gdk-pixbuf2 >= 2.0.0 |
cceb564d | 93 | Requires: glib2 >= 2.0.0 |
bedcd43d JB |
94 | |
95 | %description gnome | |
96 | Library for decoding RAW images - GTK+/GNOME support. | |
97 | ||
98 | %description gnome -l pl.UTF-8 | |
99 | Biblioteka dekodująca obrazy w formacie RAW - obsługa GTK+/GNOME. | |
100 | ||
101 | %package gnome-devel | |
102 | Summary: Header file for libopenrawgnome library | |
103 | Summary(pl.UTF-8): Plik nagłówkowy biblioteki libopenrawgnome | |
104 | Group: X11/Development/Libraries | |
105 | Requires: %{name}-devel = %{version}-%{release} | |
106 | Requires: %{name}-gnome = %{version}-%{release} | |
80ec251f | 107 | Requires: gdk-pixbuf2-devel >= 2.0.0 |
cceb564d | 108 | Requires: glib2-devel >= 2.0.0 |
bedcd43d JB |
109 | |
110 | %description gnome-devel | |
111 | Header file for libopenrawgnome library. | |
112 | ||
113 | %description gnome-devel -l pl.UTF-8 | |
114 | Plik nagłówkowy biblioteki libopenrawgnome. | |
115 | ||
116 | %package gnome-static | |
117 | Summary: Static libopenrawgnome library | |
118 | Summary(pl.UTF-8): Statyczna biblioteka libopenrawgnome | |
119 | Group: X11/Development/Libraries | |
120 | Requires: %{name}-gnome-devel = %{version}-%{release} | |
121 | ||
122 | %description gnome-static | |
123 | Static libopenrawgnome library. | |
124 | ||
125 | %description gnome-static -l pl.UTF-8 | |
126 | Statyczna biblioteka libopenrawgnome. | |
127 | ||
08b26dc7 | 128 | %prep |
75d9a064 | 129 | %setup -q -b1 |
40dddec8 JB |
130 | %patch0 -p1 |
131 | %patch1 -p1 | |
59709f9e | 132 | %patch2 -p1 |
08b26dc7 | 133 | |
75d9a064 JB |
134 | install -d .cargo |
135 | cat >.cargo/config <<EOF | |
136 | [source.crates-io] | |
137 | replace-with = 'vendored-sources' | |
138 | ||
139 | [source.vendored-sources] | |
140 | directory = '$PWD/vendor' | |
141 | EOF | |
142 | ||
08b26dc7 | 143 | %build |
75d9a064 JB |
144 | export CARGO_HOME="$(pwd)/.cargo" |
145 | ||
40dddec8 | 146 | %{__libtoolize} |
76d02d11 MB |
147 | %{__aclocal} -I m4 |
148 | %{__autoconf} | |
149 | %{__autoheader} | |
150 | %{__automake} | |
4c9f1cf8 JB |
151 | %configure \ |
152 | --disable-silent-rules | |
40dddec8 | 153 | |
59709f9e JB |
154 | %{__make} \ |
155 | %ifarch x32 | |
156 | CARGO_RELEASE_ARGS="--release --target x86_64-unknown-linux-gnux32" \ | |
157 | CARGO_TARGET_SUBDIR=x86_64-unknown-linux-gnux32/release | |
158 | %endif | |
08b26dc7 | 159 | |
160 | %install | |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | ||
e312fd68 | 163 | %{__make} install \ |
59709f9e JB |
164 | DESTDIR=$RPM_BUILD_ROOT \ |
165 | %ifarch x32 | |
166 | CARGO_RELEASE_ARGS="--release --target x86_64-unknown-linux-gnux32" \ | |
167 | CARGO_TARGET_SUBDIR=x86_64-unknown-linux-gnux32/release | |
168 | %endif | |
08b26dc7 | 169 | |
7a4330e1 JB |
170 | # obsoleted by pkg-config |
171 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libopenraw*.la | |
172 | # dynamic modules | |
e312fd68 | 173 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/*/loaders/*.{a,la} |
e5b0e883 | 174 | |
08b26dc7 | 175 | %clean |
176 | rm -rf $RPM_BUILD_ROOT | |
177 | ||
e312fd68 JB |
178 | %post -p /sbin/ldconfig |
179 | %postun -p /sbin/ldconfig | |
180 | ||
181 | %post gnome | |
e5b0e883 MB |
182 | /sbin/ldconfig |
183 | umask 022 | |
76d02d11 | 184 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache |
e5b0e883 | 185 | |
e312fd68 | 186 | %postun gnome |
e5b0e883 MB |
187 | /sbin/ldconfig |
188 | umask 022 | |
189 | if [ -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ]; then | |
76d02d11 | 190 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache |
e5b0e883 | 191 | fi |
08b26dc7 | 192 | |
193 | %files | |
194 | %defattr(644,root,root,755) | |
195 | %doc AUTHORS ChangeLog NEWS README TODO | |
bedcd43d | 196 | %attr(755,root,root) %{_libdir}/libopenraw.so.*.*.* |
40dddec8 | 197 | %attr(755,root,root) %ghost %{_libdir}/libopenraw.so.8 |
08b26dc7 | 198 | |
199 | %files devel | |
200 | %defattr(644,root,root,755) | |
bedcd43d | 201 | %attr(755,root,root) %{_libdir}/libopenraw.so |
40dddec8 JB |
202 | %dir %{_includedir}/libopenraw-0.2 |
203 | %{_includedir}/libopenraw-0.2/libopenraw | |
204 | %{_pkgconfigdir}/libopenraw-0.2.pc | |
08b26dc7 | 205 | |
206 | %files static | |
207 | %defattr(644,root,root,755) | |
bedcd43d JB |
208 | %{_libdir}/libopenraw.a |
209 | ||
210 | %files gnome | |
211 | %defattr(644,root,root,755) | |
212 | %attr(755,root,root) %{_libdir}/libopenrawgnome.so.*.*.* | |
40dddec8 | 213 | %attr(755,root,root) %ghost %{_libdir}/libopenrawgnome.so.8 |
e312fd68 | 214 | %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/*/loaders/libopenraw_pixbuf.so |
bedcd43d JB |
215 | |
216 | %files gnome-devel | |
217 | %defattr(644,root,root,755) | |
218 | %attr(755,root,root) %{_libdir}/libopenrawgnome.so | |
40dddec8 JB |
219 | %{_includedir}/libopenraw-0.2/libopenraw-gnome |
220 | %{_pkgconfigdir}/libopenraw-gnome-0.2.pc | |
bedcd43d JB |
221 | |
222 | %files gnome-static | |
223 | %defattr(644,root,root,755) | |
224 | %{_libdir}/libopenrawgnome.a |