1 |
%define lib_major 5 |
2 |
%define lib_name %mklibname %{name} %{lib_major} |
3 |
%define sgmlbase %{_datadir}/sgml |
4 |
|
5 |
Summary: The OpenJade Group's SGML and XML parsing tools |
6 |
Name: OpenSP |
7 |
Version: 1.5.2 |
8 |
Release: %mkrel 7 |
9 |
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot |
10 |
License: BSD |
11 |
Group: Publishing |
12 |
Source: http://download.sourceforge.net/openjade/%{name}-%{version}.tar.bz2 |
13 |
Patch0: OpenSP-1.5-prefer-catalog-entries.patch.bz2 |
14 |
Patch1: opensp-1.5.2-multilib.patch |
15 |
Patch2: opensp-1.5.2-nodeids.patch |
16 |
URL: http://openjade.sourceforge.net/ |
17 |
BuildRequires: xmlto |
18 |
BuildRequires: docbook-dtd412-xml |
19 |
|
20 |
%description |
21 |
This package is a collection of SGML/XML tools called OpenSP. It is a fork from |
22 |
James Clark's SP suite. These tools are used to parse, validate, and normalize |
23 |
SGML and XML files. |
24 |
|
25 |
%package -n %{lib_name} |
26 |
Summary: Runtime library for the OpenJade group's SP suite |
27 |
Group: System/Libraries |
28 |
|
29 |
%description -n %{lib_name} |
30 |
This is the SP suite's shared library runtime support. This C++ |
31 |
library contains entity management functions, parsing functions, and |
32 |
other functions useful for SGML/XML/DSSSL development. |
33 |
|
34 |
%package -n %{lib_name}-devel |
35 |
Summary: Libraries and include files for developing OpenSP applications |
36 |
Group: Development/C |
37 |
Requires: %{lib_name} = %{version} |
38 |
Provides: lib%{name}-devel = %{version}-%{release} |
39 |
Provides: %{name}-devel = %{version}-%{release} |
40 |
|
41 |
%description -n %{lib_name}-devel |
42 |
This contains include files and libraries for OpenSP. |
43 |
This C++ library contains entity management functions, parsing functions, |
44 |
and other functions useful for SGML/XML/DSSSL development. |
45 |
|
46 |
%prep |
47 |
%setup -q |
48 |
%patch0 -p1 -b .try_catalogs_first |
49 |
%patch1 -p1 -b .multilib |
50 |
%patch2 -p1 -b .nodeids |
51 |
|
52 |
%build |
53 |
%configure2_5x --enable-static --enable-http \ |
54 |
--enable-default-catalog=%{_sysconfdir}/sgml/catalog \ |
55 |
--enable-default-search-path=%{sgmlbase} \ |
56 |
--datadir=%{sgmlbase}/%{name}-%{version} |
57 |
%make |
58 |
|
59 |
%install |
60 |
|
61 |
test "$RPM_BUILD_ROOT" = "/" || rm -rf "$RPM_BUILD_ROOT" |
62 |
%makeinstall_std |
63 |
|
64 |
%find_lang sp |
65 |
|
66 |
#remove unpackaged files |
67 |
rm -rf $RPM_BUILD_ROOT%{_prefix}/doc $RPM_BUILD_ROOT%{_docdir}/OpenSP |
68 |
|
69 |
%clean |
70 |
test "$RPM_BUILD_ROOT" = "/" || rm -rf "$RPM_BUILD_ROOT" |
71 |
|
72 |
%if %mdkversion < 200900 |
73 |
%post -n %{lib_name} -p /sbin/ldconfig |
74 |
%endif |
75 |
|
76 |
%if %mdkversion < 200900 |
77 |
%postun -n %{lib_name} -p /sbin/ldconfig |
78 |
%endif |
79 |
|
80 |
%files -f sp.lang |
81 |
%defattr(-, root, root) |
82 |
%doc doc/*.htm ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README |
83 |
%{_bindir}/* |
84 |
%{sgmlbase}/%{name}-%{version}/* |
85 |
%{_mandir}/man1/* |
86 |
|
87 |
|
88 |
%files -n %{lib_name} |
89 |
%defattr(-, root, root) |
90 |
%{_libdir}/libosp.so.%{lib_major}* |
91 |
|
92 |
%files -n %{lib_name}-devel |
93 |
%defattr(-, root, root) |
94 |
%{_libdir}/lib*.so |
95 |
%{_libdir}/lib*.a |
96 |
%{_libdir}/lib*.la |
97 |
%{_includedir}/OpenSP |
98 |
|
99 |
|