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

Last change on this file since 1010 was 549, checked in by dmik, 11 years ago

spec: texinfo: Release 5.2-1.

File size: 7.1 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: 2%{?dist}
9License: GPLv3+
10Group: Applications/Publishing
11Url: http://www.gnu.org/software/texinfo/
12
13#Source0: ftp://ftp.gnu.org/gnu/texinfo/texinfo-%{version}.tar.xz
14#Source1: ftp://ftp.gnu.org/gnu/texinfo/texinfo-%{version}.tar.xz.sig
15
16%define svn_url http://svn.netlabs.org/repos/ports/texinfo/trunk
17%define svn_rev 1066
18
19Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
20
21BuildRequires: gcc make subversion zip
22
23Source2: info-dir
24# Source3: script for filtering out false perl requires
25Source3: filter-requires-texinfo.sh
26# Source4: script for filtering out false perl provides
27Source4: filter-provides-texinfo.sh
28# Source5: macro definitions
29Source5: macros.info
30
31Requires(post): %{_sbindir}/install-info.exe
32Requires(preun): %{_sbindir}/install-info.exe
33Requires: perl >= 5.7.3
34#Requires: perl(Text::Unidecode), perl(Unicode::EastAsianWidth), perl(Data::Dumper), perl(Locale::Messages)
35BuildRequires: zlib-devel, ncurses-devel, help2man
36#BuildRequires: perl(Data::Dumper), perl(Locale::Messages), perl(Unicode::EastAsianWidth), perl(Text::Unidecode)
37
38# @todo Disabled, seems to not work (and not needed ATM)
39#global _use_internal_dependency_generator 0
40#global __find_requires %{SOURCE3}
41#global __find_provides %{SOURCE4}
42
43# Two reasons for the following dependency:
44# 1. texinfo.mo is installed by info rather by texinfo (since info needs it and for most users
45# texinfo itself isn't necessary), so texinfo must depend on it.
46# 2. Packages that contain .info documentation often use BuildRequires: texinfo so that they
47# can build it. However, if they want to use %info_requires/%info_post()/%info_preun() macros
48# they must have macros.info installed at rpm-build time which is provided by info.
49Requires: info = %{version}-%{release}
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%if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
87%setup -q
88%else
89%setup -n "%{name}-%{version}" -Tc
90svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
91rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
92(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
93%endif
94
95# Create files necessary for configure
96autogen.sh
97
98# Change DEFAULT_INFOPATH to match prefix
99sed -i -e "/define DEFAULT_INFOPATH/ s,/usr,%{_prefix},g" info/filesys.h
100
101%build
102%configure
103# --with-external-Text-Unidecode \
104# --with-external-libintl-perl \
105# --with-external-Unicode-EastAsianWidth
106
107# This is necessary so that Perl module search path is properly set
108# when running help2man on makeinfo etc.
109export TEXINFO_DEV_SOURCE=1
110
111make %{?_smp_mflags}
112
113%install
114mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
115
116make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
117
118mkdir -p $RPM_BUILD_ROOT%{tex_texinfo}
119install -p -m644 doc/texinfo.tex doc/txi-??.tex $RPM_BUILD_ROOT%{tex_texinfo}
120
121install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_infodir}/dir
122mv $RPM_BUILD_ROOT%{_bindir}/install-info.exe $RPM_BUILD_ROOT%{_sbindir}
123
124mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
125cp %{SOURCE5} $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
126
127%find_lang %{name}
128%find_lang %{name}_document
129
130# @todo Disabled for now
131#%check
132#export ALL_TESTS=yes
133#make %{?_smp_mflags} check
134
135%post
136if [ -f %{_infodir}/texinfo.gz ]; then # --excludedocs?
137 %{_sbindir}/install-info.exe %{_infodir}/texinfo.gz %{_infodir}/dir || :
138elif [ -f %{_infodir}/texinfo.info ]; then # --excludedocs?
139 %{_sbindir}/install-info.exe %{_infodir}/texinfo.info %{_infodir}/dir || :
140fi
141
142%preun
143if [ $1 = 0 ]; then
144 if [ -f %{_infodir}/texinfo.gz ]; then # --excludedocs?
145 %{_sbindir}/install-info.exe --delete %{_infodir}/texinfo.gz %{_infodir}/dir || :
146 elif [ -f %{_infodir}/texinfo.info ]; then # --excludedocs?
147 %{_sbindir}/install-info.exe --delete %{_infodir}/texinfo.info %{_infodir}/dir || :
148 fi
149fi
150
151%post -n info
152if [ -f %{_infodir}/info-stnd.info ]; then # --excludedocs?
153 %{_sbindir}/install-info.exe %{_infodir}/info-stnd.info %{_infodir}/dir
154fi
155if [ -x %{_bindir}/sed ]; then
156 %{_bindir}/sed -i '/^This is.*produced by makeinfo.*from/d' %{_infodir}/dir || :
157fi
158
159%preun -n info
160if [ $1 = 0 ]; then
161 if [ -f %{_infodir}/info-stnd.info ]; then # --excludedocs?
162 %{_sbindir}/install-info.exe --delete %{_infodir}/info-stnd.info %{_infodir}/dir \
163 || :
164 fi
165fi
166
167%post tex
168%{_bindir}/texconfig-sys rehash 2> /dev/null || :
169
170%postun tex
171%{_bindir}/texconfig-sys rehash 2> /dev/null || :
172
173
174%files -f %{name}_document.lang
175%doc AUTHORS ChangeLog NEWS README TODO
176%{!?_licensedir:%global license %%doc}
177%license COPYING
178%{_bindir}/makeinfo
179%{_bindir}/texi2any
180%{_bindir}/pod2texi
181%{_datadir}/texinfo
182%{_infodir}/texinfo*
183%{_mandir}/man1/makeinfo.1*
184%{_mandir}/man5/texinfo.5*
185%{_mandir}/man1/texi2any.1*
186%{_mandir}/man1/pod2texi.1*
187
188%files -n info -f %{name}.lang
189%config(noreplace) %verify(not md5 size mtime) %{_infodir}/dir
190%{!?_licensedir:%global license %%doc}
191%license COPYING
192%{_bindir}/info.exe
193%{_bindir}/infokey.exe
194%{_infodir}/info.info*
195%{_infodir}/info-stnd.info*
196%{_sbindir}/install-info.exe
197%{_mandir}/man1/info.1*
198%{_mandir}/man1/infokey.1*
199%{_mandir}/man1/install-info.1*
200%{_mandir}/man5/info.5*
201%{_rpmconfigdir}/macros.d/macros.info
202
203%files tex
204%{_bindir}/texindex.exe
205%{_bindir}/texi2dvi
206%{_bindir}/texi2pdf
207%{_bindir}/pdftexi2dvi
208%{tex_texinfo}/
209%{_mandir}/man1/texindex.1*
210%{_mandir}/man1/texi2dvi.1*
211%{_mandir}/man1/texi2pdf.1*
212%{_mandir}/man1/pdftexi2dvi.1*
213
214%changelog
215* Tue Feb 17 2015 Dmitriy Kuminov <coding@dmik.org> 5.2-2
216- Make @unixroot strings properly quoted in perl scripts.
217
218* Fri Feb 13 2015 Dmitriy Kuminov <coding@dmik.org> 5.2-1
219- Initial package for version 5.2.
Note: See TracBrowser for help on using the repository browser.