]>
Commit | Line | Data |
---|---|---|
0c778aab JB |
1 | # TODO: |
2 | # - update fonts-Type1-urw.spec, revise system fonts usage | |
3 | # - given sysfontmap file doesn't exist since 2007 | |
1df5f0ec JB |
4 | # |
5 | # Conditional build: | |
0c778aab JB |
6 | %bcond_without gtk # gtk-loader package (requires gdk-pixbuf2) |
7 | %bcond_without static_libs # static library | |
7cbac751 | 8 | # |
eb46013d | 9 | Summary: libwmf - library to convert WMF files |
10 | Summary(pl.UTF-8): libwmf - biblioteka z funkcjami do konwersji plików WMF | |
afa7958e | 11 | Name: libwmf |
0c778aab | 12 | Version: 0.2.13 |
14a5e55a | 13 | Release: 2 |
a4db6984 | 14 | Epoch: 2 |
354591b1 | 15 | License: LGPL v2+ |
a4db6984 | 16 | Group: Applications/Text |
d62a6f3b JB |
17 | # original project seems dead |
18 | #Source0: http://downloads.sourceforge.net/wvware/%{name}-%{version}.tar.gz | |
19 | # RedHat supported fork | |
20 | #Source0Download: https://github.com/caolanm/libwmf/releases | |
21 | Source0: https://github.com/caolanm/libwmf/archive/v%{version}/%{name}-%{version}.tar.gz | |
0c778aab | 22 | # Source0-md5: 1c95363fd3c2f7b92bb4f4026aeab8d6 |
c27bd194 | 23 | Patch0: %{name}-fontmap-pld.patch |
75d7a789 JB |
24 | Patch1: %{name}-includes.patch |
25 | Patch2: %{name}-segv.patch | |
0ee65d77 | 26 | Patch3: %{name}-png12.patch |
d62a6f3b | 27 | Patch4: %{name}-ah.patch |
3d37805d | 28 | URL: http://wvware.sourceforge.net/ |
31c15663 | 29 | BuildRequires: autoconf >= 2.59-9 |
8e6ccf36 | 30 | BuildRequires: automake |
505c61b2 JB |
31 | BuildRequires: expat-devel |
32 | BuildRequires: freetype-devel >= 2.0 | |
d62a6f3b | 33 | %{?with_gtk:BuildRequires: gdk-pixbuf2-devel >= 2.1.2} |
505c61b2 | 34 | BuildRequires: libjpeg-devel |
896ba6df | 35 | BuildRequires: libpng-devel >= 2:1.4.0 |
1df5f0ec | 36 | BuildRequires: libtool >= 1:1.4.2-9 |
09da5af6 | 37 | BuildRequires: pkgconfig |
31c15663 JB |
38 | BuildRequires: xorg-lib-libX11-devel |
39 | Requires(post): ghostscript-fonts-std | |
e59882f1 | 40 | Requires(post): sed |
09da5af6 | 41 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
74a90dc1 | 42 | Requires: fonts-Type1-urw |
e59882f1 | 43 | Requires: sed |
5c0e4f51 | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
85ffcc3a | 45 | |
2880e2bc TP |
46 | %define specflags_ia32 -fomit-frame-pointer |
47 | ||
85ffcc3a | 48 | %description |
eb46013d | 49 | libwmf is a library for Unix like machines that can convert WMF files |
21dd8d5b | 50 | into other formats, currently it supports fig, eps, a gd binding to |
c0ff1c08 | 51 | convert to png, and an X one to draw direct to an X Window or pixmap. |
21dd8d5b | 52 | |
8e6b90ae JR |
53 | %description -l pl.UTF-8 |
54 | libwmf jest biblioteką dla systemów uniksowych, która konwertuje pliki | |
eb46013d | 55 | WMF na inne formaty. Aktualnie obsługuje formaty fig i eps, format png |
8e6b90ae | 56 | poprzez bibliotekę gd oraz - poprzez biblioteki X Window - rysowanie w |
5c0e4f51 | 57 | okienku oraz format xpm. |
985cf28f | 58 | |
7e6ce155 JB |
59 | %package libs |
60 | Summary: libwmf - libraries | |
336b114b | 61 | Summary(pl.UTF-8): libwmf - biblioteki |
7e6ce155 | 62 | Group: Libraries |
71787c9b | 63 | Conflicts: libwmf < 2:0.2.8.4 |
7e6ce155 JB |
64 | |
65 | %description libs | |
66 | This package contains libwmf libraries. | |
67 | ||
8e6b90ae | 68 | %description libs -l pl.UTF-8 |
7e6ce155 JB |
69 | Ten pakiet zawiera biblioteki libwmf. |
70 | ||
985cf28f JB |
71 | %package devel |
72 | Summary: libwmf - header files | |
336b114b | 73 | Summary(pl.UTF-8): libwmf - pliki nagłówkowe |
985cf28f | 74 | Group: Development/Libraries |
d5a54140 | 75 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
032176d1 | 76 | # libwmflite(.la) has no additional deps |
31c15663 | 77 | # libwmf(.la) needs freetype-devel, expat-devel, libjpeg-devel, libpng-devel, xorg-lib-libX11-devel |
985cf28f JB |
78 | |
79 | %description devel | |
80 | This package contains libwmf header files. | |
81 | ||
8e6b90ae JR |
82 | %description devel -l pl.UTF-8 |
83 | Pakiet zawiera pliki nagłówkowe do biblioteki libwmf. | |
21dd8d5b | 84 | |
985cf28f JB |
85 | %package static |
86 | Summary: libwmf - static libraries | |
336b114b | 87 | Summary(pl.UTF-8): libwmf - biblioteki statyczne |
985cf28f | 88 | Group: Development/Libraries |
ded81787 | 89 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
985cf28f JB |
90 | |
91 | %description static | |
92 | This package contains libwmf static libraries. | |
93 | ||
8e6b90ae JR |
94 | %description static -l pl.UTF-8 |
95 | Pakiet zawiera statyczną wersję biblioteki libwmf. | |
85ffcc3a | 96 | |
1df5f0ec JB |
97 | %package gtk-loader |
98 | Summary: WMF loader for gdk_pixbuf 2.x library | |
336b114b | 99 | Summary(pl.UTF-8): Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x |
1df5f0ec | 100 | Group: X11/Libraries |
ded81787 | 101 | Requires: %{name} = %{epoch}:%{version}-%{release} |
1df5f0ec JB |
102 | |
103 | %description gtk-loader | |
104 | WMF loader for gdk_pixbuf 2.x library. | |
105 | ||
8e6b90ae JR |
106 | %description gtk-loader -l pl.UTF-8 |
107 | Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x | |
1df5f0ec | 108 | |
85ffcc3a | 109 | %prep |
c27bd194 | 110 | %setup -q |
8e6ccf36 JB |
111 | %patch0 -p1 |
112 | %patch1 -p1 | |
113 | %patch2 -p1 | |
0ee65d77 | 114 | %patch3 -p1 |
30b77d29 | 115 | %patch4 -p1 |
85ffcc3a | 116 | |
117 | %build | |
2d865440 | 118 | %{__libtoolize} |
424cda8a | 119 | %{__aclocal} |
b88dd915 | 120 | %{__autoconf} |
d62a6f3b | 121 | %{__autoheader} |
424cda8a | 122 | %{__automake} |
ce2f27e7 | 123 | %configure \ |
8603d009 | 124 | %{!?with_static_libs:--disable-static} \ |
672aa96d TP |
125 | --with-sysfontmap=%{_fontsdir}/ghostscript-fonts-std.font \ |
126 | --with-gsfontmap=%{_fontsdir}/Type1/Fontmap \ | |
ce2f27e7 | 127 | --with-gsfontdir=%{_fontsdir}/Type1 |
41fa5092 | 128 | |
c59653f2 | 129 | %{__make} |
85ffcc3a | 130 | |
131 | %install | |
afa7958e | 132 | rm -rf $RPM_BUILD_ROOT |
89af0de0 | 133 | |
af419d74 | 134 | %{__make} -j1 install \ |
8603d009 | 135 | DESTDIR=$RPM_BUILD_ROOT |
85ffcc3a | 136 | |
baf033a2 | 137 | # no static modules and *.la for GTK+ loaders - shut up check-files |
2b88747a JP |
138 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/*/loaders/*.la |
139 | %if %{with static_libs} | |
140 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/*/loaders/*.a | |
141 | %endif | |
7cbac751 | 142 | |
85ffcc3a | 143 | %clean |
afa7958e | 144 | rm -rf $RPM_BUILD_ROOT |
85ffcc3a | 145 | |
c27bd194 | 146 | %post |
d5a54140 | 147 | %{_bindir}/libwmf-fontmap > /dev/null |
c27bd194 | 148 | |
d5a54140 ER |
149 | %post libs -p /sbin/ldconfig |
150 | %postun libs -p /sbin/ldconfig | |
985cf28f | 151 | |
85ffcc3a | 152 | %files |
afa7958e | 153 | %defattr(644,root,root,755) |
41fa5092 | 154 | %doc CREDITS ChangeLog README TODO |
c27bd194 JB |
155 | %attr(755,root,root) %{_bindir}/libwmf-fontmap |
156 | %attr(755,root,root) %{_bindir}/wmf2eps | |
157 | %attr(755,root,root) %{_bindir}/wmf2fig | |
158 | %attr(755,root,root) %{_bindir}/wmf2gd | |
c27bd194 JB |
159 | %attr(755,root,root) %{_bindir}/wmf2svg |
160 | %attr(755,root,root) %{_bindir}/wmf2x | |
c27bd194 JB |
161 | %dir %{_datadir}/libwmf |
162 | %dir %{_datadir}/libwmf/fonts | |
163 | %ghost %{_datadir}/libwmf/fonts/fontmap | |
985cf28f | 164 | |
7e6ce155 JB |
165 | %files libs |
166 | %defattr(644,root,root,755) | |
354591b1 JB |
167 | %attr(755,root,root) %{_libdir}/libwmf-0.2.so.*.*.* |
168 | %attr(755,root,root) %ghost %{_libdir}/libwmf-0.2.so.7 | |
169 | %attr(755,root,root) %{_libdir}/libwmflite-0.2.so.*.*.* | |
170 | %attr(755,root,root) %ghost %{_libdir}/libwmflite-0.2.so.7 | |
7e6ce155 | 171 | |
985cf28f JB |
172 | %files devel |
173 | %defattr(644,root,root,755) | |
d62a6f3b | 174 | %doc doc/caolan doc/html/{*.html,*.css,*.gif,*.png} examples |
c27bd194 | 175 | %attr(755,root,root) %{_bindir}/libwmf-config |
354591b1 JB |
176 | %attr(755,root,root) %{_libdir}/libwmf.so |
177 | %attr(755,root,root) %{_libdir}/libwmflite.so | |
178 | %{_libdir}/libwmf.la | |
179 | %{_libdir}/libwmflite.la | |
180 | %{_includedir}/libwmf | |
d62a6f3b | 181 | %{_pkgconfigdir}/libwmf.pc |
985cf28f | 182 | |
8603d009 | 183 | %if %{with static_libs} |
985cf28f JB |
184 | %files static |
185 | %defattr(644,root,root,755) | |
354591b1 JB |
186 | %{_libdir}/libwmf.a |
187 | %{_libdir}/libwmflite.a | |
681a4a3f | 188 | %endif |
1df5f0ec | 189 | |
8603d009 | 190 | %if %{with gtk} |
1df5f0ec JB |
191 | %files gtk-loader |
192 | %defattr(644,root,root,755) | |
d62a6f3b | 193 | %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*/loaders/io-wmf.so |
1df5f0ec | 194 | %endif |