source: spec/trunk/SPECS/texinfo.spec@ 1330

Last change on this file since 1330 was 1144, checked in by dmik, 8 years ago

spec: texinfo: Release version 5.2-3.

File size: 6.8 KB
Line 
1# Note: this .spec is borrowed from texinfo-5.2-8.fc22.src.rpm
2
3%global tex_texinfo %{_datadir}/texmf/tex/texinfo
4
5Summary: Tools needed to create Texinfo format documentation files
6Name: texinfo
7Version: 5.2
8Release: 3%{?dist}
9License: GPLv3+
10Group: Applications/Publishing
11Url: http://www.gnu.org/software/texinfo/
12Vendor: bww bitwise works GmbH
13
14%scm_source svn http://svn.netlabs.org/repos/ports/texinfo/trunk 1066
15
16Source2: info-dir
17Source5: macros.info
18
19# TODO: Do we lack these perl bits on OS/2?
20%define perl_i18n_support 0
21
22Requires(post): %{_sbindir}/install-info.exe
23Requires(preun): %{_sbindir}/install-info.exe
24Requires: perl >= 5.7.3
25Requires: perl(Data::Dumper)
26%if %{?perl_i18n_support}
27Requires: perl(Text::Unidecode), perl(Unicode::EastAsianWidth), perl(Locale::Messages)
28%endif
29BuildRequires: zlib-devel, ncurses-devel, help2man
30BuildRequires: perl(Data::Dumper)
31%if %{?perl_i18n_support}
32BuildRequires: 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.
41Requires: 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
52Texinfo is a documentation system that can produce both online
53information and printed output from a single source file. The GNU
54Project uses the Texinfo file format for most of its documentation.
55
56Install texinfo if you want a documentation system for producing both
57online and print documentation from the same source file and/or if you
58are going to write documentation for the GNU Project.
59
60%package -n info
61Summary: A stand-alone TTY-based reader for GNU texinfo documentation
62Group: System Environment/Base
63
64%description -n info
65The GNU project uses the texinfo file format for much of its
66documentation. The info package provides a standalone TTY-based
67browser program for viewing texinfo files.
68
69%package tex
70Summary: Tools for formatting Texinfo documentation files using TeX
71Group: Applications/Publishing
72Requires: texinfo = %{version}-%{release}
73Requires: tex(tex) tex(epsf.tex)
74Requires(post): %{_bindir}/texconfig-sys
75Requires(postun): %{_bindir}/texconfig-sys
76
77%description tex
78Texinfo is a documentation system that can produce both online
79information and printed output from a single source file. The GNU
80Project uses the Texinfo file format for most of its documentation.
81
82The texinfo-tex package provides tools to format Texinfo documents
83for printing using TeX.
84
85%prep
86%scm_setup
87
88# Create files necessary for configure
89autogen.sh
90
91# Change DEFAULT_INFOPATH to match prefix
92sed -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.
103export TEXINFO_DEV_SOURCE=1
104
105make %{?_smp_mflags}
106
107%install
108mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
109
110make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
111
112mkdir -p $RPM_BUILD_ROOT%{tex_texinfo}
113install -p -m644 doc/texinfo.tex doc/txi-??.tex $RPM_BUILD_ROOT%{tex_texinfo}
114
115install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_infodir}/dir
116mv $RPM_BUILD_ROOT%{_bindir}/install-info.exe $RPM_BUILD_ROOT%{_sbindir}
117
118mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
119cp %{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
130if [ -f %{_infodir}/texinfo.gz ]; then # --excludedocs?
131 %{_sbindir}/install-info.exe %{_infodir}/texinfo.gz %{_infodir}/dir || :
132elif [ -f %{_infodir}/texinfo.info ]; then # --excludedocs?
133 %{_sbindir}/install-info.exe %{_infodir}/texinfo.info %{_infodir}/dir || :
134fi
135
136%preun
137if [ $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
143fi
144
145%post -n info
146if [ -f %{_infodir}/info-stnd.info ]; then # --excludedocs?
147 %{_sbindir}/install-info.exe %{_infodir}/info-stnd.info %{_infodir}/dir
148fi
149if [ -x %{_bindir}/sed ]; then
150 %{_bindir}/sed -i '/^This is.*produced by makeinfo.*from/d' %{_infodir}/dir || :
151fi
152
153%preun -n info
154if [ $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
159fi
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.
Note: See TracBrowser for help on using the repository browser.