]> git.pld-linux.org Git - packages/libwmf.git/blob - libwmf.spec
- updated to 0.2.12 from github fork
[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.12
10 Release:        1
11 Epoch:          2
12 License:        LGPL v2+
13 Group:          Applications/Text
14 # original project seems dead
15 #Source0:       http://downloads.sourceforge.net/wvware/%{name}-%{version}.tar.gz
16 # RedHat supported fork
17 #Source0Download: https://github.com/caolanm/libwmf/releases
18 Source0:        https://github.com/caolanm/libwmf/archive/v%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5:  fa5c642447ef6c37737c6ac767d4ba3a
20 Patch0:         %{name}-fontmap-pld.patch
21 Patch1:         %{name}-includes.patch
22 Patch2:         %{name}-segv.patch
23 Patch3:         %{name}-png12.patch
24 Patch4:         %{name}-ah.patch
25 URL:            http://wvware.sourceforge.net/
26 BuildRequires:  autoconf >= 2.59-9
27 BuildRequires:  automake
28 BuildRequires:  expat-devel
29 BuildRequires:  freetype-devel >= 2.0
30 %{?with_gtk:BuildRequires:      gdk-pixbuf2-devel >= 2.1.2}
31 BuildRequires:  libjpeg-devel
32 BuildRequires:  libpng-devel >= 2:1.4.0
33 BuildRequires:  libtool >= 1:1.4.2-9
34 BuildRequires:  pkgconfig
35 BuildRequires:  xorg-lib-libX11-devel
36 Requires(post): ghostscript-fonts-std
37 Requires(post): sed
38 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
39 Requires:       fonts-Type1-urw
40 Requires:       sed
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         specflags_ia32  -fomit-frame-pointer
44
45 %description
46 libwmf is a library for Unix like machines that can convert WMF files
47 into other formats, currently it supports fig, eps, a gd binding to
48 convert to png, and an X one to draw direct to an X Window or pixmap.
49
50 %description -l pl.UTF-8
51 libwmf jest biblioteką dla systemów uniksowych, która konwertuje pliki
52 WMF na inne formaty. Aktualnie obsługuje formaty fig i eps, format png
53 poprzez bibliotekę gd oraz - poprzez biblioteki X Window - rysowanie w
54 okienku oraz format xpm.
55
56 %package libs
57 Summary:        libwmf - libraries
58 Summary(pl.UTF-8):      libwmf - biblioteki
59 Group:          Libraries
60 Conflicts:      libwmf < 2:0.2.8.4
61
62 %description libs
63 This package contains libwmf libraries.
64
65 %description libs -l pl.UTF-8
66 Ten pakiet zawiera biblioteki libwmf.
67
68 %package devel
69 Summary:        libwmf - header files
70 Summary(pl.UTF-8):      libwmf - pliki nagłówkowe
71 Group:          Development/Libraries
72 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
73 # libwmflite(.la) has no additional deps
74 # libwmf(.la) needs freetype-devel, expat-devel, libjpeg-devel, libpng-devel, xorg-lib-libX11-devel
75
76 %description devel
77 This package contains libwmf header files.
78
79 %description devel -l pl.UTF-8
80 Pakiet zawiera pliki nagłówkowe do biblioteki libwmf.
81
82 %package static
83 Summary:        libwmf - static libraries
84 Summary(pl.UTF-8):      libwmf - biblioteki statyczne
85 Group:          Development/Libraries
86 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
87
88 %description static
89 This package contains libwmf static libraries.
90
91 %description static -l pl.UTF-8
92 Pakiet zawiera statyczną wersję biblioteki libwmf.
93
94 %package gtk-loader
95 Summary:        WMF loader for gdk_pixbuf 2.x library
96 Summary(pl.UTF-8):      Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
97 Group:          X11/Libraries
98 Requires:       %{name} = %{epoch}:%{version}-%{release}
99
100 %description gtk-loader
101 WMF loader for gdk_pixbuf 2.x library.
102
103 %description gtk-loader -l pl.UTF-8
104 Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
105
106 %prep
107 %setup -q
108 %patch0 -p1
109 %patch1 -p1
110 %patch2 -p1
111 %patch3 -p1
112 %patch4 -p1
113
114 %build
115 %{__libtoolize}
116 %{__aclocal}
117 %{__autoconf}
118 %{__autoheader}
119 %{__automake}
120 %configure \
121         %{!?with_static_libs:--disable-static} \
122         --with-sysfontmap=%{_fontsdir}/ghostscript-fonts-std.font \
123         --with-gsfontmap=%{_fontsdir}/Type1/Fontmap \
124         --with-gsfontdir=%{_fontsdir}/Type1
125
126 %{__make}
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130
131 %{__make} -j1 install \
132         DESTDIR=$RPM_BUILD_ROOT
133
134 # no static modules and *.la for GTK+ loaders - shut up check-files
135 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/*/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}/libwmf-0.2.so.*.*.*
162 %attr(755,root,root) %ghost %{_libdir}/libwmf-0.2.so.7
163 %attr(755,root,root) %{_libdir}/libwmflite-0.2.so.*.*.*
164 %attr(755,root,root) %ghost %{_libdir}/libwmflite-0.2.so.7
165
166 %files devel
167 %defattr(644,root,root,755)
168 %doc doc/caolan doc/html/{*.html,*.css,*.gif,*.png} examples
169 %attr(755,root,root) %{_bindir}/libwmf-config
170 %attr(755,root,root) %{_libdir}/libwmf.so
171 %attr(755,root,root) %{_libdir}/libwmflite.so
172 %{_libdir}/libwmf.la
173 %{_libdir}/libwmflite.la
174 %{_includedir}/libwmf
175 %{_pkgconfigdir}/libwmf.pc
176
177 %if %{with static_libs}
178 %files static
179 %defattr(644,root,root,755)
180 %{_libdir}/libwmf.a
181 %{_libdir}/libwmflite.a
182 %endif
183
184 %if %{with gtk}
185 %files gtk-loader
186 %defattr(644,root,root,755)
187 %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*/loaders/io-wmf.so
188 %endif
This page took 0.066079 seconds and 4 git commands to generate.