]> git.pld-linux.org Git - packages/libwmf.git/blob - libwmf.spec
Release 2 (by relup.sh)
[packages/libwmf.git] / libwmf.spec
1 # TODO:
2 # - update fonts-Type1-urw.spec, revise system fonts usage
3 # - given sysfontmap file doesn't exist since 2007
4 #
5 # Conditional build:
6 %bcond_without  gtk             # gtk-loader package (requires gdk-pixbuf2)
7 %bcond_without  static_libs     # static library
8 #
9 Summary:        libwmf - library to convert WMF files
10 Summary(pl.UTF-8):      libwmf - biblioteka z funkcjami do konwersji plików WMF
11 Name:           libwmf
12 Version:        0.2.13
13 Release:        2
14 Epoch:          2
15 License:        LGPL v2+
16 Group:          Applications/Text
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
22 # Source0-md5:  1c95363fd3c2f7b92bb4f4026aeab8d6
23 Patch0:         %{name}-fontmap-pld.patch
24 Patch1:         %{name}-includes.patch
25 Patch2:         %{name}-segv.patch
26 Patch3:         %{name}-png12.patch
27 Patch4:         %{name}-ah.patch
28 URL:            http://wvware.sourceforge.net/
29 BuildRequires:  autoconf >= 2.59-9
30 BuildRequires:  automake
31 BuildRequires:  expat-devel
32 BuildRequires:  freetype-devel >= 2.0
33 %{?with_gtk:BuildRequires:      gdk-pixbuf2-devel >= 2.1.2}
34 BuildRequires:  libjpeg-devel
35 BuildRequires:  libpng-devel >= 2:1.4.0
36 BuildRequires:  libtool >= 1:1.4.2-9
37 BuildRequires:  pkgconfig
38 BuildRequires:  xorg-lib-libX11-devel
39 Requires(post): ghostscript-fonts-std
40 Requires(post): sed
41 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
42 Requires:       fonts-Type1-urw
43 Requires:       sed
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         specflags_ia32  -fomit-frame-pointer
47
48 %description
49 libwmf is a library for Unix like machines that can convert WMF files
50 into other formats, currently it supports fig, eps, a gd binding to
51 convert to png, and an X one to draw direct to an X Window or pixmap.
52
53 %description -l pl.UTF-8
54 libwmf jest biblioteką dla systemów uniksowych, która konwertuje pliki
55 WMF na inne formaty. Aktualnie obsługuje formaty fig i eps, format png
56 poprzez bibliotekę gd oraz - poprzez biblioteki X Window - rysowanie w
57 okienku oraz format xpm.
58
59 %package libs
60 Summary:        libwmf - libraries
61 Summary(pl.UTF-8):      libwmf - biblioteki
62 Group:          Libraries
63 Conflicts:      libwmf < 2:0.2.8.4
64
65 %description libs
66 This package contains libwmf libraries.
67
68 %description libs -l pl.UTF-8
69 Ten pakiet zawiera biblioteki libwmf.
70
71 %package devel
72 Summary:        libwmf - header files
73 Summary(pl.UTF-8):      libwmf - pliki nagłówkowe
74 Group:          Development/Libraries
75 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
76 # libwmflite(.la) has no additional deps
77 # libwmf(.la) needs freetype-devel, expat-devel, libjpeg-devel, libpng-devel, xorg-lib-libX11-devel
78
79 %description devel
80 This package contains libwmf header files.
81
82 %description devel -l pl.UTF-8
83 Pakiet zawiera pliki nagłówkowe do biblioteki libwmf.
84
85 %package static
86 Summary:        libwmf - static libraries
87 Summary(pl.UTF-8):      libwmf - biblioteki statyczne
88 Group:          Development/Libraries
89 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
90
91 %description static
92 This package contains libwmf static libraries.
93
94 %description static -l pl.UTF-8
95 Pakiet zawiera statyczną wersję biblioteki libwmf.
96
97 %package gtk-loader
98 Summary:        WMF loader for gdk_pixbuf 2.x library
99 Summary(pl.UTF-8):      Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
100 Group:          X11/Libraries
101 Requires:       %{name} = %{epoch}:%{version}-%{release}
102
103 %description gtk-loader
104 WMF loader for gdk_pixbuf 2.x library.
105
106 %description gtk-loader -l pl.UTF-8
107 Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
108
109 %prep
110 %setup -q
111 %patch0 -p1
112 %patch1 -p1
113 %patch2 -p1
114 %patch3 -p1
115 %patch4 -p1
116
117 %build
118 %{__libtoolize}
119 %{__aclocal}
120 %{__autoconf}
121 %{__autoheader}
122 %{__automake}
123 %configure \
124         %{!?with_static_libs:--disable-static} \
125         --with-sysfontmap=%{_fontsdir}/ghostscript-fonts-std.font \
126         --with-gsfontmap=%{_fontsdir}/Type1/Fontmap \
127         --with-gsfontdir=%{_fontsdir}/Type1
128
129 %{__make}
130
131 %install
132 rm -rf $RPM_BUILD_ROOT
133
134 %{__make} -j1 install \
135         DESTDIR=$RPM_BUILD_ROOT
136
137 # no static modules and *.la for GTK+ loaders - shut up check-files
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
142
143 %clean
144 rm -rf $RPM_BUILD_ROOT
145
146 %post
147 %{_bindir}/libwmf-fontmap > /dev/null
148
149 %post   libs -p /sbin/ldconfig
150 %postun libs -p /sbin/ldconfig
151
152 %files
153 %defattr(644,root,root,755)
154 %doc CREDITS ChangeLog README TODO
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
159 %attr(755,root,root) %{_bindir}/wmf2svg
160 %attr(755,root,root) %{_bindir}/wmf2x
161 %dir %{_datadir}/libwmf
162 %dir %{_datadir}/libwmf/fonts
163 %ghost %{_datadir}/libwmf/fonts/fontmap
164
165 %files libs
166 %defattr(644,root,root,755)
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
171
172 %files devel
173 %defattr(644,root,root,755)
174 %doc doc/caolan doc/html/{*.html,*.css,*.gif,*.png} examples
175 %attr(755,root,root) %{_bindir}/libwmf-config
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
181 %{_pkgconfigdir}/libwmf.pc
182
183 %if %{with static_libs}
184 %files static
185 %defattr(644,root,root,755)
186 %{_libdir}/libwmf.a
187 %{_libdir}/libwmflite.a
188 %endif
189
190 %if %{with gtk}
191 %files gtk-loader
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*/loaders/io-wmf.so
194 %endif
This page took 0.065703 seconds and 4 git commands to generate.