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