1 | # Note: this .spec is borrowed from texinfo-5.2-8.fc22.src.rpm
|
---|
2 |
|
---|
3 | %global tex_texinfo %{_datadir}/texmf/tex/texinfo
|
---|
4 |
|
---|
5 | Summary: Tools needed to create Texinfo format documentation files
|
---|
6 | Name: texinfo
|
---|
7 | Version: 5.2
|
---|
8 | Release: 3%{?dist}
|
---|
9 | License: GPLv3+
|
---|
10 | Group: Applications/Publishing
|
---|
11 | Url: http://www.gnu.org/software/texinfo/
|
---|
12 | Vendor: bww bitwise works GmbH
|
---|
13 |
|
---|
14 | %scm_source svn http://svn.netlabs.org/repos/ports/texinfo/trunk 1066
|
---|
15 |
|
---|
16 | Source2: info-dir
|
---|
17 | Source5: macros.info
|
---|
18 |
|
---|
19 | # TODO: Do we lack these perl bits on OS/2?
|
---|
20 | %define perl_i18n_support 0
|
---|
21 |
|
---|
22 | Requires(post): %{_sbindir}/install-info.exe
|
---|
23 | Requires(preun): %{_sbindir}/install-info.exe
|
---|
24 | Requires: perl >= 5.7.3
|
---|
25 | Requires: perl(Data::Dumper)
|
---|
26 | %if %{?perl_i18n_support}
|
---|
27 | Requires: perl(Text::Unidecode), perl(Unicode::EastAsianWidth), perl(Locale::Messages)
|
---|
28 | %endif
|
---|
29 | BuildRequires: zlib-devel, ncurses-devel, help2man
|
---|
30 | BuildRequires: perl(Data::Dumper)
|
---|
31 | %if %{?perl_i18n_support}
|
---|
32 | BuildRequires: perl(Locale::Messages), perl(Unicode::EastAsianWidth), perl(Text::Unidecode)
|
---|
33 | %endif
|
---|
34 |
|
---|
35 | # Two reasons for the following dependency:
|
---|
36 | # 1. texinfo.mo is installed by info rather by texinfo (since info needs it and for most users
|
---|
37 | # texinfo itself isn't necessary), so texinfo must depend on it.
|
---|
38 | # 2. Packages that contain .info documentation often use BuildRequires: texinfo so that they
|
---|
39 | # can build it. However, if they want to use info_requires/info_post()/info_preun() macros
|
---|
40 | # they must have macros.info installed at rpm-build time which is provided by info.
|
---|
41 | Requires: info = %{version}-%{release}
|
---|
42 |
|
---|
43 | # Texinfo perl packages are not installed in default perl library dirs
|
---|
44 | %global __provides_exclude ^perl\\(.*Texinfo.*\\)$
|
---|
45 | %global __requires_exclude ^perl\\(.*Texinfo.*\\)$
|
---|
46 | # Also no need to look into installed perl stuff at all (this filters out
|
---|
47 | # quile a lot of deps like perl(Locale::RecodeData::*) on OS/2)
|
---|
48 | %global __provides_exclude_from ^%{_datadir}/texinfo
|
---|
49 | %global __requires_exclude_from ^%{_datadir}/texinfo
|
---|
50 |
|
---|
51 | %description
|
---|
52 | Texinfo is a documentation system that can produce both online
|
---|
53 | information and printed output from a single source file. The GNU
|
---|
54 | Project uses the Texinfo file format for most of its documentation.
|
---|
55 |
|
---|
56 | Install texinfo if you want a documentation system for producing both
|
---|
57 | online and print documentation from the same source file and/or if you
|
---|
58 | are going to write documentation for the GNU Project.
|
---|
59 |
|
---|
60 | %package -n info
|
---|
61 | Summary: A stand-alone TTY-based reader for GNU texinfo documentation
|
---|
62 | Group: System Environment/Base
|
---|
63 |
|
---|
64 | %description -n info
|
---|
65 | The GNU project uses the texinfo file format for much of its
|
---|
66 | documentation. The info package provides a standalone TTY-based
|
---|
67 | browser program for viewing texinfo files.
|
---|
68 |
|
---|
69 | %package tex
|
---|
70 | Summary: Tools for formatting Texinfo documentation files using TeX
|
---|
71 | Group: Applications/Publishing
|
---|
72 | Requires: texinfo = %{version}-%{release}
|
---|
73 | Requires: tex(tex) tex(epsf.tex)
|
---|
74 | Requires(post): %{_bindir}/texconfig-sys
|
---|
75 | Requires(postun): %{_bindir}/texconfig-sys
|
---|
76 |
|
---|
77 | %description tex
|
---|
78 | Texinfo is a documentation system that can produce both online
|
---|
79 | information and printed output from a single source file. The GNU
|
---|
80 | Project uses the Texinfo file format for most of its documentation.
|
---|
81 |
|
---|
82 | The texinfo-tex package provides tools to format Texinfo documents
|
---|
83 | for printing using TeX.
|
---|
84 |
|
---|
85 | %prep
|
---|
86 | %scm_setup
|
---|
87 |
|
---|
88 | # Create files necessary for configure
|
---|
89 | autogen.sh
|
---|
90 |
|
---|
91 | # Change DEFAULT_INFOPATH to match prefix
|
---|
92 | sed -i -e "/define DEFAULT_INFOPATH/ s,/usr,%{_prefix},g" info/filesys.h
|
---|
93 |
|
---|
94 | %build
|
---|
95 | %configure
|
---|
96 | %if %{?perl_i18n_support}
|
---|
97 | --with-external-Text-Unidecode \
|
---|
98 | --with-external-libintl-perl \
|
---|
99 | --with-external-Unicode-EastAsianWidth
|
---|
100 | %endif
|
---|
101 | # This is necessary so that Perl module search path is properly set
|
---|
102 | # when running help2man on makeinfo etc.
|
---|
103 | export TEXINFO_DEV_SOURCE=1
|
---|
104 |
|
---|
105 | make %{?_smp_mflags}
|
---|
106 |
|
---|
107 | %install
|
---|
108 | mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
|
---|
109 |
|
---|
110 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
|
---|
111 |
|
---|
112 | mkdir -p $RPM_BUILD_ROOT%{tex_texinfo}
|
---|
113 | install -p -m644 doc/texinfo.tex doc/txi-??.tex $RPM_BUILD_ROOT%{tex_texinfo}
|
---|
114 |
|
---|
115 | install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_infodir}/dir
|
---|
116 | mv $RPM_BUILD_ROOT%{_bindir}/install-info.exe $RPM_BUILD_ROOT%{_sbindir}
|
---|
117 |
|
---|
118 | mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
|
---|
119 | cp %{SOURCE5} $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
|
---|
120 |
|
---|
121 | %find_lang %{name}
|
---|
122 | %find_lang %{name}_document
|
---|
123 |
|
---|
124 | # TODO: Disabled for now
|
---|
125 | #%check
|
---|
126 | #export ALL_TESTS=yes
|
---|
127 | #make %{?_smp_mflags} check
|
---|
128 |
|
---|
129 | %post
|
---|
130 | if [ -f %{_infodir}/texinfo.gz ]; then # --excludedocs?
|
---|
131 | %{_sbindir}/install-info.exe %{_infodir}/texinfo.gz %{_infodir}/dir || :
|
---|
132 | elif [ -f %{_infodir}/texinfo.info ]; then # --excludedocs?
|
---|
133 | %{_sbindir}/install-info.exe %{_infodir}/texinfo.info %{_infodir}/dir || :
|
---|
134 | fi
|
---|
135 |
|
---|
136 | %preun
|
---|
137 | if [ $1 = 0 ]; then
|
---|
138 | if [ -f %{_infodir}/texinfo.gz ]; then # --excludedocs?
|
---|
139 | %{_sbindir}/install-info.exe --delete %{_infodir}/texinfo.gz %{_infodir}/dir || :
|
---|
140 | elif [ -f %{_infodir}/texinfo.info ]; then # --excludedocs?
|
---|
141 | %{_sbindir}/install-info.exe --delete %{_infodir}/texinfo.info %{_infodir}/dir || :
|
---|
142 | fi
|
---|
143 | fi
|
---|
144 |
|
---|
145 | %post -n info
|
---|
146 | if [ -f %{_infodir}/info-stnd.info ]; then # --excludedocs?
|
---|
147 | %{_sbindir}/install-info.exe %{_infodir}/info-stnd.info %{_infodir}/dir
|
---|
148 | fi
|
---|
149 | if [ -x %{_bindir}/sed ]; then
|
---|
150 | %{_bindir}/sed -i '/^This is.*produced by makeinfo.*from/d' %{_infodir}/dir || :
|
---|
151 | fi
|
---|
152 |
|
---|
153 | %preun -n info
|
---|
154 | if [ $1 = 0 ]; then
|
---|
155 | if [ -f %{_infodir}/info-stnd.info ]; then # --excludedocs?
|
---|
156 | %{_sbindir}/install-info.exe --delete %{_infodir}/info-stnd.info %{_infodir}/dir \
|
---|
157 | || :
|
---|
158 | fi
|
---|
159 | fi
|
---|
160 |
|
---|
161 | %post tex
|
---|
162 | %{_bindir}/texconfig-sys rehash 2> /dev/null || :
|
---|
163 |
|
---|
164 | %postun tex
|
---|
165 | %{_bindir}/texconfig-sys rehash 2> /dev/null || :
|
---|
166 |
|
---|
167 |
|
---|
168 | %files -f %{name}_document.lang
|
---|
169 | %doc AUTHORS ChangeLog NEWS README TODO
|
---|
170 | %{!?_licensedir:%global license %%doc}
|
---|
171 | %license COPYING
|
---|
172 | %{_bindir}/makeinfo
|
---|
173 | %{_bindir}/texi2any
|
---|
174 | %{_bindir}/pod2texi
|
---|
175 | %{_datadir}/texinfo
|
---|
176 | %{_infodir}/texinfo*
|
---|
177 | %{_mandir}/man1/makeinfo.1*
|
---|
178 | %{_mandir}/man5/texinfo.5*
|
---|
179 | %{_mandir}/man1/texi2any.1*
|
---|
180 | %{_mandir}/man1/pod2texi.1*
|
---|
181 |
|
---|
182 | %files -n info -f %{name}.lang
|
---|
183 | %config(noreplace) %verify(not md5 size mtime) %{_infodir}/dir
|
---|
184 | %{!?_licensedir:%global license %%doc}
|
---|
185 | %license COPYING
|
---|
186 | %{_bindir}/info.exe
|
---|
187 | %{_bindir}/infokey.exe
|
---|
188 | %{_infodir}/info.info*
|
---|
189 | %{_infodir}/info-stnd.info*
|
---|
190 | %{_sbindir}/install-info.exe
|
---|
191 | %{_mandir}/man1/info.1*
|
---|
192 | %{_mandir}/man1/infokey.1*
|
---|
193 | %{_mandir}/man1/install-info.1*
|
---|
194 | %{_mandir}/man5/info.5*
|
---|
195 | %{_rpmconfigdir}/macros.d/macros.info
|
---|
196 |
|
---|
197 | %files tex
|
---|
198 | %{_bindir}/texindex.exe
|
---|
199 | %{_bindir}/texi2dvi
|
---|
200 | %{_bindir}/texi2pdf
|
---|
201 | %{_bindir}/pdftexi2dvi
|
---|
202 | %{tex_texinfo}/
|
---|
203 | %{_mandir}/man1/texindex.1*
|
---|
204 | %{_mandir}/man1/texi2dvi.1*
|
---|
205 | %{_mandir}/man1/texi2pdf.1*
|
---|
206 | %{_mandir}/man1/pdftexi2dvi.1*
|
---|
207 |
|
---|
208 | %changelog
|
---|
209 | * Fri May 12 2017 Dmitriy Kuminov <coding@dmik.org> 5.2-3
|
---|
210 | - Use scm_source and friends.
|
---|
211 | - Fix broken info_preun macro (bashism).
|
---|
212 |
|
---|
213 | * Tue Feb 17 2015 Dmitriy Kuminov <coding@dmik.org> 5.2-2
|
---|
214 | - Make @unixroot strings properly quoted in perl scripts.
|
---|
215 |
|
---|
216 | * Fri Feb 13 2015 Dmitriy Kuminov <coding@dmik.org> 5.2-1
|
---|
217 | - Initial package for version 5.2.
|
---|