1 |
%define name wv |
2 |
%define version 1.2.4 |
3 |
%define real_version %version |
4 |
%define serial 1 |
5 |
|
6 |
%define api_version 1.2 |
7 |
%define lib_major 3 |
8 |
%define lib_name %mklibname %{name}- %{api_version} %{lib_major} |
9 |
|
10 |
Summary: MSWord 6/7/8/9 binary file format -> HTML converter |
11 |
Name: %{name} |
12 |
Version: %{version} |
13 |
Release: %mkrel 10 |
14 |
Epoch: %{serial} |
15 |
License: GPLv2 |
16 |
Group: Office |
17 |
URL: http://sourceforge.net/projects/wvware/ |
18 |
Source: http://prdownloads.sourceforge.net/wvware/%{name}-%{real_version}.tar.bz2 |
19 |
Patch0: %{name}-1.2.4-fix-str-fmt.patch |
20 |
Patch1: wv-1.2.4-linkage.patch |
21 |
BuildRequires: X11-devel |
22 |
BuildRequires: glib2-devel |
23 |
BuildRequires: libwmf-devel >= 0.2.8 |
24 |
BuildRequires: libjpeg-devel |
25 |
BuildRequires: libpng-devel |
26 |
BuildRequires: libxml2-devel |
27 |
BuildRequires: libgsf-devel |
28 |
BuildRoot: %{_tmppath}/%{name}-buildroot |
29 |
Obsoletes: mswordview |
30 |
Provides: mswordview |
31 |
Requires: tetex-latex |
32 |
Requires: tetex-dvips |
33 |
|
34 |
%description |
35 |
Wv is a program that understands the Microsoft Word 6/7/8/9 |
36 |
binary file format and is able to convert Word |
37 |
documents into HTML, which can then be read with a browser. |
38 |
|
39 |
%package -n %{lib_name} |
40 |
Summary: Library used by wv |
41 |
Group: System/Libraries |
42 |
Provides: lib%{name} = %{serial}:%{version}-%{release} |
43 |
|
44 |
%description -n %{lib_name} |
45 |
Wv is a program that understands the Microsoft Word 6/7/8/9 |
46 |
binary file format and is able to convert Word |
47 |
documents into HTML, which can then be read with a browser. |
48 |
|
49 |
This package provides the library that is used by wv. |
50 |
|
51 |
%package -n %{lib_name}-devel |
52 |
Summary: MSWord 6/7/8/9 binary file format -> HTML converter (development) |
53 |
Group: Development/C |
54 |
Requires: %{lib_name} = %{serial}:%{version} |
55 |
Provides: %{name}-devel = %{serial}:%{version} |
56 |
|
57 |
%description -n %{lib_name}-devel |
58 |
Wv is a program that understands the Microsoft Word 6/7/8/9 |
59 |
binary file format and is able to convert Word |
60 |
documents into HTML, which can then be read with a browser. |
61 |
|
62 |
This is the development package. |
63 |
|
64 |
%prep |
65 |
%setup -q -n %{name}-%{version} |
66 |
%patch0 -p1 -b .strfmt |
67 |
%patch1 -p0 -b .linkage |
68 |
|
69 |
%build |
70 |
%configure2_5x |
71 |
%make |
72 |
|
73 |
%install |
74 |
rm -rf $RPM_BUILD_ROOT |
75 |
%makeinstall_std |
76 |
# uggly fix for symlink /usr/bin/wvText to wvConvert. |
77 |
ln -sf wvConvert $RPM_BUILD_ROOT/%{_bindir}/wvText |
78 |
# the following file seems not to be used by any wv executable. |
79 |
#cp $RPM_BUILD_DIR/%{name}/config-mswordview $RPM_BUILD_ROOT/usr/lib/mswordview |
80 |
rm -f notes/decompress/a.out |
81 |
# make sure libwv.a is in lib directory |
82 |
# mv $RPM_BUILD_ROOT%{_datadir}/libwv.a $RPM_BUILD_ROOT%{_libdir}/libwv.a |
83 |
|
84 |
%if %mdkversion < 200900 |
85 |
%post -n %{lib_name} -p /sbin/ldconfig |
86 |
%endif |
87 |
|
88 |
%if %mdkversion < 200900 |
89 |
%postun -n %{lib_name} -p /sbin/ldconfig |
90 |
%endif |
91 |
|
92 |
%clean |
93 |
rm -rf $RPM_BUILD_ROOT |
94 |
|
95 |
%files |
96 |
%defattr(-,root,root) |
97 |
%doc README |
98 |
%attr(755,root,root) %{_bindir}/wv[A-Z]* |
99 |
%attr(755,root,root) %dir %{_datadir}/wv |
100 |
%attr(644,root,root) %{_datadir}/wv/*.xml |
101 |
%attr(644,root,root) %{_datadir}/wv/*.dtd |
102 |
%attr(755,root,root) %dir %{_datadir}/wv/patterns |
103 |
%attr(644,root,root) %{_datadir}/wv/patterns/* |
104 |
%attr(755,root,root) %dir %{_datadir}/wv/wingdingfont |
105 |
%attr(644,root,root) %{_datadir}/wv/wingdingfont/* |
106 |
%attr(644,root,root) %{_mandir}/man1/* |
107 |
|
108 |
%files -n %{lib_name} |
109 |
%defattr(-,root,root) |
110 |
%attr(755,root,root) %{_libdir}/libwv-%{api_version}.so.%{lib_major}* |
111 |
|
112 |
%files -n %{lib_name}-devel |
113 |
%defattr(-,root,root) |
114 |
%attr(755,root,root) %dir %{_includedir}/wv |
115 |
%attr(644,root,root) %{_includedir}/wv/*.h |
116 |
%attr(755,root,root) %{_libdir}/libwv.so |
117 |
%attr(644,root,root) %{_libdir}/libwv.*a |
118 |
%attr(644,root,root) %{_libdir}/pkgconfig/wv-1.0.pc |
119 |
|
120 |
|