]>
Commit | Line | Data |
---|---|---|
baf016ef | 1 | # |
2 | # Conditional build: | |
111a634a | 3 | %bcond_without tests # do not perform "make test" |
baf016ef | 4 | # |
647465fa | 5 | Summary: JBIG-KIT lossless image compression library |
053d9dc3 | 6 | Summary(pl.UTF-8): JBIG-KIT - biblioteka do bezstratnej kompresji obrazków |
647465fa | 7 | Name: jbigkit |
116fa7a2 | 8 | Version: 2.1 |
b3754bd0 | 9 | Release: 3 |
1df3b09a | 10 | License: GPL v2+ |
647465fa | 11 | Group: Libraries |
dd691f73 | 12 | Source0: https://www.cl.cam.ac.uk/~mgk25/jbigkit/download/%{name}-%{version}.tar.gz |
116fa7a2 | 13 | # Source0-md5: ebcf09bed9f14d7fa188d3bd57349522 |
1df3b09a | 14 | Source1: %{name}.pl.po |
647465fa | 15 | Patch0: %{name}-shared.patch |
dd691f73 | 16 | URL: https://www.cl.cam.ac.uk/~mgk25/jbigkit/ |
85270f7c | 17 | BuildRequires: gettext-tools |
1df3b09a | 18 | BuildRequires: libtool >= 2:1.5 |
647465fa JB |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
22 | JBIG-KIT implements a highly effective data compression algorithm for | |
23 | bi-level high-resolution images such as fax pages or scanned | |
24 | documents. | |
25 | ||
20eb3979 JR |
26 | %description -l pl.UTF-8 |
27 | JBIG-KIT zawiera implementację wydajnego algorytmu kompresji dla | |
28 | 2-kolorowych obrazków wysokiej rozdzielczości, takich jak faksy albo | |
647465fa JB |
29 | skanowane dokumenty. |
30 | ||
31 | %package devel | |
32 | Summary: JBIG-KIT - development part | |
053d9dc3 | 33 | Summary(pl.UTF-8): JBIG-KIT - plik nagłówkowy |
647465fa | 34 | Group: Development/Libraries |
93515a94 | 35 | Requires: %{name} = %{version}-%{release} |
647465fa JB |
36 | |
37 | %description devel | |
38 | Header file needed to build programs using JBIG library. | |
39 | ||
20eb3979 JR |
40 | %description devel -l pl.UTF-8 |
41 | Plik nagłówkowy potrzebny do kompilacji programów korzystających z | |
647465fa JB |
42 | biblioteki JBIG. |
43 | ||
44 | %package static | |
45 | Summary: JBIG-KIT - static library | |
053d9dc3 | 46 | Summary(pl.UTF-8): JBIG-KIT - biblioteka statyczna |
647465fa | 47 | Group: Development/Libraries |
93515a94 | 48 | Requires: %{name}-devel = %{version}-%{release} |
647465fa JB |
49 | |
50 | %description static | |
51 | Static JBIG library. | |
52 | ||
20eb3979 | 53 | %description static -l pl.UTF-8 |
647465fa JB |
54 | Statyczna biblioteka JBIG. |
55 | ||
56 | %package progs | |
57 | Summary: JBIG-KIT - conversion utilities | |
053d9dc3 | 58 | Summary(pl.UTF-8): JBIG-KIT - programy do konwersji |
647465fa | 59 | Group: Applications/Graphics |
93515a94 | 60 | Requires: %{name} = %{version}-%{release} |
647465fa JB |
61 | |
62 | %description progs | |
63 | Package contains utilities to convert between JBIG and PBM images. | |
64 | ||
20eb3979 JR |
65 | %description progs -l pl.UTF-8 |
66 | Narzędzia do konwersji plików między formatami JBIG i PBM. | |
647465fa JB |
67 | |
68 | %prep | |
116fa7a2 | 69 | %setup -q |
647465fa | 70 | %patch0 -p1 |
1df3b09a JB |
71 | |
72 | cp %{SOURCE1} libjbig/po/pl.po | |
647465fa JB |
73 | |
74 | %build | |
f5fd6a8d | 75 | %{__make} -j1 \ |
1df3b09a | 76 | CC="%{__cc}" \ |
f5fd6a8d | 77 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
1df3b09a | 78 | LDFLAGS="%{rpmldflags}" \ |
19c4d4ee | 79 | prefix=%{_prefix} \ |
1df3b09a JB |
80 | libdir=%{_libdir} |
81 | ||
82 | for l in libjbig/po/*.po ; do | |
83 | msgfmt -c -v -o "${l%.po}.mo" "$l" | |
84 | done | |
647465fa | 85 | |
c6590638 | 86 | %{?with_tests:%{__make} -j1 test} |
baf016ef | 87 | |
647465fa JB |
88 | %install |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
f5fd6a8d AM |
91 | install -d $RPM_BUILD_ROOT%{_libdir} |
92 | ||
93 | %{__make} -j1 install \ | |
1df3b09a | 94 | DESTDIR=$RPM_BUILD_ROOT \ |
19c4d4ee | 95 | prefix=%{_prefix} \ |
1df3b09a JB |
96 | libdir=%{_libdir} |
97 | ||
98 | for l in libjbig/po/*.mo ; do | |
99 | install -D "$l" "$RPM_BUILD_ROOT%{_datadir}/locale/$(basename $l .mo)/LC_MESSAGES/jbig.mo" | |
100 | done | |
101 | ||
102 | %find_lang jbig | |
647465fa | 103 | |
647465fa JB |
104 | %clean |
105 | rm -rf $RPM_BUILD_ROOT | |
106 | ||
b40c2b1d JB |
107 | %post -p /sbin/ldconfig |
108 | %postun -p /sbin/ldconfig | |
109 | ||
1df3b09a | 110 | %files -f jbig.lang |
647465fa | 111 | %defattr(644,root,root,755) |
db0dd284 JB |
112 | # INSTALL is about "installing and using" jbigkit |
113 | %doc ANNOUNCE CHANGES INSTALL TODO | |
1df3b09a JB |
114 | %attr(755,root,root) %{_libdir}/libjbig.so.*.*.* |
115 | %attr(755,root,root) %ghost %{_libdir}/libjbig.so.2 | |
116 | %attr(755,root,root) %{_libdir}/libjbig85.so.*.*.* | |
117 | %attr(755,root,root) %ghost %{_libdir}/libjbig85.so.2 | |
647465fa JB |
118 | |
119 | %files devel | |
120 | %defattr(644,root,root,755) | |
1df3b09a JB |
121 | %doc libjbig/{jbig,jbig85}.txt |
122 | %attr(755,root,root) %{_libdir}/libjbig.so | |
123 | %attr(755,root,root) %{_libdir}/libjbig85.so | |
124 | %{_libdir}/libjbig.la | |
125 | %{_libdir}/libjbig85.la | |
126 | %{_includedir}/jbig.h | |
127 | %{_includedir}/jbig85.h | |
ad26cf1c | 128 | %{_includedir}/jbig_ar.h |
647465fa JB |
129 | |
130 | %files static | |
131 | %defattr(644,root,root,755) | |
1df3b09a JB |
132 | %{_libdir}/libjbig.a |
133 | %{_libdir}/libjbig85.a | |
647465fa JB |
134 | |
135 | %files progs | |
136 | %defattr(644,root,root,755) | |
1df3b09a JB |
137 | %attr(755,root,root) %{_bindir}/jbgtopbm |
138 | %attr(755,root,root) %{_bindir}/pbmtojbg | |
139 | %{_mandir}/man1/jbgtopbm.1* | |
140 | %{_mandir}/man1/pbmtojbg.1* |