3 %bcond_without gtk # without gtk-loader package (which requires gtk+2-devel)
4 %bcond_without static_libs # don't build static version of library
6 Summary: libwmf - library to convert wmf files
7 Summary(pl): libwmf - biblioteka z funkcjami do konwersji plików wmf
13 Group: Applications/Text
14 Source0: http://dl.sourceforge.net/wvware/%{name}-%{version}.tar.gz
15 # Source0-md5: d1177739bf1ceb07f57421f0cee191e0
16 Patch0: %{name}-fontmap-pld.patch
17 Patch1: %{name}-includes.patch
18 Patch2: %{name}-segv.patch
19 Patch3: %{name}-png12.patch
20 URL: http://wvware.sourceforge.net/
21 BuildRequires: autoconf >= 2.59-9
22 BuildRequires: automake
23 BuildRequires: expat-devel
24 BuildRequires: freetype-devel >= 2.0
25 %{?with_gtk:BuildRequires: gtk+2-devel >= 1:2.10.0}
26 BuildRequires: libjpeg-devel
27 BuildRequires: libpng-devel >= 1.2.12
28 BuildRequires: libtool >= 1:1.4.2-9
29 BuildRequires: xorg-lib-libX11-devel
30 Requires(post): ghostscript-fonts-std
32 Requires: ghostscript-fonts-std
34 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define specflags_ia32 -fomit-frame-pointer
40 libwmf is a library for unix like machines that can convert wmf files
41 into other formats, currently it supports fig, eps, a gd binding to
42 convert to png, and an X one to draw direct to an X window or pixmap.
45 libwmf jest bibliotek± dla systemów uniksowych, która konwertuje pliki
46 wmf na inne formaty. Aktualnie obs³uguje formaty fig i eps, format png
47 poprzez bibliotekê gd oraz - poprzez biblioteki X Window - rysowanie w
48 okienku oraz format xpm.
51 Summary: libwmf - libraries
52 Summary(pl): libwmf - biblioteki
54 Conflicts: libwmf < 2:0.2.8.4
57 This package contains libwmf libraries.
59 %description libs -l pl
60 Ten pakiet zawiera biblioteki libwmf.
63 Summary: libwmf - header files
64 Summary(pl): libwmf - pliki nag³ówkowe
65 Group: Development/Libraries
66 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
67 # libwmflite(.la) has no additional deps
68 # libwmf(.la) needs freetype-devel, expat-devel, libjpeg-devel, libpng-devel, xorg-lib-libX11-devel
71 This package contains libwmf header files.
73 %description devel -l pl
74 Pakiet zawiera pliki nag³ówkowe do biblioteki libwmf.
77 Summary: libwmf - static libraries
78 Summary(pl): libwmf - biblioteki statyczne
79 Group: Development/Libraries
80 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
83 This package contains libwmf static libraries.
85 %description static -l pl
86 Pakiet zawiera statyczn± wersjê biblioteki libwmf.
89 Summary: WMF loader for gdk_pixbuf 2.x library
90 Summary(pl): Modu³ wczytuj±cy WMF dla biblioteki gdk_pixbuf 2.x
92 Requires: %{name} = %{epoch}:%{version}-%{release}
94 %description gtk-loader
95 WMF loader for gdk_pixbuf 2.x library.
97 %description gtk-loader -l pl
98 Modu³ wczytuj±cy WMF dla biblioteki gdk_pixbuf 2.x
114 LDFLAGS="%{rpmldflags} -Wl,--as-needed"
116 %{!?with_static_libs:--disable-static} \
117 --with-sysfontmap=%{_fontsdir}/ghostscript-fonts-std.font \
118 --with-gsfontmap=%{_fontsdir}/Type1/Fontmap \
119 --with-gsfontdir=%{_fontsdir}/Type1
124 rm -rf $RPM_BUILD_ROOT
127 DESTDIR=$RPM_BUILD_ROOT
130 mv -f $RPM_BUILD_ROOT%{_datadir}/doc ./html-doc
132 # no static modules and *.la for GTK+ loaders - shut up check-files
133 rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2*/*/loaders/*.{a,la}
136 rm -rf $RPM_BUILD_ROOT
139 %{_bindir}/libwmf-fontmap > /dev/null
141 %post libs -p /sbin/ldconfig
142 %postun libs -p /sbin/ldconfig
145 %defattr(644,root,root,755)
146 %doc CREDITS ChangeLog README TODO
147 %attr(755,root,root) %{_bindir}/libwmf-fontmap
148 %attr(755,root,root) %{_bindir}/wmf2eps
149 %attr(755,root,root) %{_bindir}/wmf2fig
150 %attr(755,root,root) %{_bindir}/wmf2gd
151 %attr(755,root,root) %{_bindir}/wmf2svg
152 %attr(755,root,root) %{_bindir}/wmf2x
153 %dir %{_datadir}/libwmf
154 %dir %{_datadir}/libwmf/fonts
155 %ghost %{_datadir}/libwmf/fonts/fontmap
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_libdir}/*.so.*.*
162 %defattr(644,root,root,755)
163 %doc html-doc examples
164 %attr(755,root,root) %{_bindir}/libwmf-config
165 %attr(755,root,root) %{_libdir}/*.so
169 %if %{with static_libs}
171 %defattr(644,root,root,755)
177 %defattr(644,root,root,755)
178 %attr(755,root,root) %{_libdir}/gtk-2*/*/loaders/*.so