TIVI-153: add as dependency for iputils
[profile/ivi/docbook-utils.git] / packaging / docbook-utils.spec
1 Name: docbook-utils
2 Version: 0.6.14
3 Release: 20
4 Group: Applications/Text
5
6 Summary: Shell scripts for managing DocBook documents
7 URL: http://sources.redhat.com/docbook-tools/
8
9 License: GPLv2+
10
11 Requires: docbook-style-dsssl >= 1.72
12 Requires: docbook-dtds
13 Requires: perl-SGMLSpm >= 1.03ii
14 Requires: which grep gawk
15 Requires: text-www-browser
16
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
18 BuildRequires: perl-SGMLSpm, openjade, docbook-style-dsssl
19
20 BuildArch: noarch
21 Source0: ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/%{name}-%{version}.tar.gz
22 Source1: db2html
23 Source2: gdp-both.dsl
24 #We will ship newer version of docbook2man-spec.pl for better handling of docbook2man conversion
25 #You could check it at http://sourceforge.net/projects/docbook2x/
26 Source3: docbook2man-spec.pl
27
28 Obsoletes: stylesheets <= %{version}-%{release}
29 Provides: stylesheets = %{version}-%{release}
30
31 Patch0: docbook-utils-spaces.patch
32 Patch1: docbook-utils-2ndspaces.patch
33 Patch2: docbook-utils-w3mtxtconvert.patch
34 Patch3: docbook-utils-grepnocolors.patch
35 Patch4: docbook-utils-sgmlinclude.patch
36 Patch5: docbook-utils-rtfmanpage.patch
37
38 %description
39 This package contains scripts are for easy conversion from DocBook
40 files to other formats (for example, HTML, RTF, and PostScript), and
41 for comparing SGML files.
42
43 %package pdf
44 Requires: jadetex >= 2.5
45 Requires: docbook-utils = %{version}
46 Requires: tex(dvips)
47 License: GPL+
48 Group: Applications/Text
49 Obsoletes: stylesheets-db2pdf <= %{version}-%{release}
50 Provides: stylesheets-db2pdf = %{version}-%{release}
51 Summary: A script for converting DocBook documents to PDF format
52 URL: ftp://sources.redhat.com/pub/docbook-tools/new-trials/
53
54 %description pdf
55 This package contains a script for converting DocBook documents to
56 PDF format.
57
58 %prep
59 %setup -q
60 %patch0 -p1 -b .spaces
61 %patch1 -p1 -b .2ndspaces
62 %patch2 -p1 -b .w3mtxtconvert
63 %patch3 -p1 -b .grepnocolors
64 %patch4 -p1 -b .sgmlinclude
65 %patch5 -p1 -b .rtfman
66
67 %build
68 ./configure --prefix=%{_prefix} --mandir=%{_mandir} --libdir=%{_libdir}
69 make %{?_smp_mflags}
70
71 %install
72 export DESTDIR=$RPM_BUILD_ROOT
73 rm -rf $RPM_BUILD_ROOT
74 make install prefix=%{_prefix} mandir=%{_mandir} docdir=/tmp
75 for util in dvi html pdf ps rtf
76 do
77         ln -s docbook2$util $RPM_BUILD_ROOT%{_bindir}/db2$util
78         ln -s jw.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/db2$util.1
79 done
80 ln -s jw.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/docbook2txt.1
81 # db2html is not just a symlink, as it has to create the output directory
82 rm -f $RPM_BUILD_ROOT%{_bindir}/db2html
83 install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/db2html
84 install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/utils-%{version}/docbook-utils.dsl
85 install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/utils-%{version}/helpers/docbook2man-spec.pl
86
87 rm -rf $RPM_BUILD_ROOT/tmp
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92
93 %files
94 %defattr (-,root,root,-)
95 %doc README COPYING TODO
96 %{_bindir}/jw
97 %{_bindir}/docbook2html
98 %{_bindir}/docbook2man
99 %{_bindir}/docbook2rtf
100 %{_bindir}/docbook2tex
101 %{_bindir}/docbook2texi
102 %{_bindir}/docbook2txt
103 %attr(0755,root,root) %{_bindir}/db2html
104 %{_bindir}/db2rtf
105 %{_bindir}/sgmldiff
106 %{_datadir}/sgml/docbook/utils-%{version}
107 %{_mandir}/*/db2dvi.*
108 %{_mandir}/*/db2html.*
109 %{_mandir}/*/db2ps.*
110 %{_mandir}/*/db2rtf.*
111 %{_mandir}/*/docbook2html.*
112 %{_mandir}/*/docbook2rtf.*
113 %{_mandir}/*/docbook2man.*
114 %{_mandir}/*/docbook2tex.*
115 %{_mandir}/*/docbook2texi.*
116 %{_mandir}/*/docbook2txt.*
117 %{_mandir}/*/jw.*
118 %{_mandir}/*/sgmldiff.*
119 %{_mandir}/*/*-spec.*
120
121 %files pdf
122 %defattr (-,root,root,-)
123 %{_bindir}/docbook2pdf
124 %{_bindir}/docbook2dvi
125 %{_bindir}/docbook2ps
126 %{_bindir}/db2dvi
127 %{_bindir}/db2pdf
128 %{_bindir}/db2ps
129 %{_mandir}/*/db2pdf.*
130 %{_mandir}/*/docbook2pdf.*
131 %{_mandir}/*/docbook2dvi.*
132 %{_mandir}/*/docbook2ps.*
133