]> git.pld-linux.org Git - packages/libwmf.git/blob - libwmf.spec
- rel 9; CVE 2009-1364 fixed
[packages/libwmf.git] / libwmf.spec
1 #
2 # Conditional build:
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 #
6 Summary:        libwmf - library to convert WMF files
7 Summary(pl.UTF-8):      libwmf - biblioteka z funkcjami do konwersji plików WMF
8 Name:           libwmf
9 Version:        0.2.8.4
10 Release:        9
11 Epoch:          2
12 License:        GPL
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 Patch4:         %{name}-0.2.8.4-useafterfree.patch
21 URL:            http://wvware.sourceforge.net/
22 BuildRequires:  autoconf >= 2.59-9
23 BuildRequires:  automake
24 BuildRequires:  expat-devel
25 BuildRequires:  freetype-devel >= 2.0
26 %{?with_gtk:BuildRequires:      gtk+2-devel >= 1:2.10.0}
27 BuildRequires:  libjpeg-devel
28 BuildRequires:  libpng-devel >= 1.2.12
29 BuildRequires:  libtool >= 1:1.4.2-9
30 BuildRequires:  xorg-lib-libX11-devel
31 Requires(post): ghostscript-fonts-std
32 Requires(post): sed
33 Requires:       fonts-Type1-urw
34 Requires:       sed
35 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         specflags_ia32  -fomit-frame-pointer
39
40 %description
41 libwmf is a library for Unix like machines that can convert WMF files
42 into other formats, currently it supports fig, eps, a gd binding to
43 convert to png, and an X one to draw direct to an X Window or pixmap.
44
45 %description -l pl.UTF-8
46 libwmf jest biblioteką dla systemów uniksowych, która konwertuje pliki
47 WMF na inne formaty. Aktualnie obsługuje formaty fig i eps, format png
48 poprzez bibliotekę gd oraz - poprzez biblioteki X Window - rysowanie w
49 okienku oraz format xpm.
50
51 %package libs
52 Summary:        libwmf - libraries
53 Summary(pl.UTF-8):      libwmf - biblioteki
54 Group:          Libraries
55 Conflicts:      libwmf < 2:0.2.8.4
56
57 %description libs
58 This package contains libwmf libraries.
59
60 %description libs -l pl.UTF-8
61 Ten pakiet zawiera biblioteki libwmf.
62
63 %package devel
64 Summary:        libwmf - header files
65 Summary(pl.UTF-8):      libwmf - pliki nagłówkowe
66 Group:          Development/Libraries
67 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
68 # libwmflite(.la) has no additional deps
69 # libwmf(.la) needs freetype-devel, expat-devel, libjpeg-devel, libpng-devel, xorg-lib-libX11-devel
70
71 %description devel
72 This package contains libwmf header files.
73
74 %description devel -l pl.UTF-8
75 Pakiet zawiera pliki nagłówkowe do biblioteki libwmf.
76
77 %package static
78 Summary:        libwmf - static libraries
79 Summary(pl.UTF-8):      libwmf - biblioteki statyczne
80 Group:          Development/Libraries
81 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
82
83 %description static
84 This package contains libwmf static libraries.
85
86 %description static -l pl.UTF-8
87 Pakiet zawiera statyczną wersję biblioteki libwmf.
88
89 %package gtk-loader
90 Summary:        WMF loader for gdk_pixbuf 2.x library
91 Summary(pl.UTF-8):      Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
92 Group:          X11/Libraries
93 Requires:       %{name} = %{epoch}:%{version}-%{release}
94
95 %description gtk-loader
96 WMF loader for gdk_pixbuf 2.x library.
97
98 %description gtk-loader -l pl.UTF-8
99 Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
100
101 %prep
102 %setup -q
103 %patch0 -p1
104 %patch1 -p1
105 %patch2 -p1
106 %patch3 -p1
107 %patch4 -p1
108
109 %build
110 rm configure.in
111 %{__libtoolize}
112 %{__aclocal}
113 %{__autoheader}
114 %{__autoconf}
115 %{__automake}
116 LDFLAGS="%{rpmldflags} -Wl,--as-needed"
117 %configure \
118         %{!?with_static_libs:--disable-static} \
119         --with-sysfontmap=%{_fontsdir}/ghostscript-fonts-std.font \
120         --with-gsfontmap=%{_fontsdir}/Type1/Fontmap \
121         --with-gsfontdir=%{_fontsdir}/Type1
122
123 %{__make}
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127
128 %{__make} -j1 install \
129         DESTDIR=$RPM_BUILD_ROOT
130
131 rm -rf html-doc
132 mv -f $RPM_BUILD_ROOT%{_datadir}/doc ./html-doc
133
134 # no static modules and *.la for GTK+ loaders - shut up check-files
135 rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2*/*/loaders/*.{a,la}
136
137 %clean
138 rm -rf $RPM_BUILD_ROOT
139
140 %post
141 %{_bindir}/libwmf-fontmap > /dev/null
142
143 %post   libs -p /sbin/ldconfig
144 %postun libs -p /sbin/ldconfig
145
146 %files
147 %defattr(644,root,root,755)
148 %doc CREDITS ChangeLog README TODO
149 %attr(755,root,root) %{_bindir}/libwmf-fontmap
150 %attr(755,root,root) %{_bindir}/wmf2eps
151 %attr(755,root,root) %{_bindir}/wmf2fig
152 %attr(755,root,root) %{_bindir}/wmf2gd
153 %attr(755,root,root) %{_bindir}/wmf2svg
154 %attr(755,root,root) %{_bindir}/wmf2x
155 %dir %{_datadir}/libwmf
156 %dir %{_datadir}/libwmf/fonts
157 %ghost %{_datadir}/libwmf/fonts/fontmap
158
159 %files libs
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_libdir}/*.so.*.*
162
163 %files devel
164 %defattr(644,root,root,755)
165 %doc html-doc examples
166 %attr(755,root,root) %{_bindir}/libwmf-config
167 %attr(755,root,root) %{_libdir}/*.so
168 %{_libdir}/*.la
169 %{_includedir}/*
170
171 %if %{with static_libs}
172 %files static
173 %defattr(644,root,root,755)
174 %{_libdir}/*.a
175 %endif
176
177 %if %{with gtk}
178 %files gtk-loader
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_libdir}/gtk-2*/*/loaders/*.so
181 %endif
This page took 0.039494 seconds and 4 git commands to generate.