| 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: 2%{?dist}
|
|---|
| 9 | License: GPLv3+
|
|---|
| 10 | Group: Applications/Publishing
|
|---|
| 11 | Url: 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 |
|
|---|
| 19 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 20 |
|
|---|
| 21 | BuildRequires: gcc make subversion zip
|
|---|
| 22 |
|
|---|
| 23 | Source2: info-dir
|
|---|
| 24 | # Source3: script for filtering out false perl requires
|
|---|
| 25 | Source3: filter-requires-texinfo.sh
|
|---|
| 26 | # Source4: script for filtering out false perl provides
|
|---|
| 27 | Source4: filter-provides-texinfo.sh
|
|---|
| 28 | # Source5: macro definitions
|
|---|
| 29 | Source5: macros.info
|
|---|
| 30 |
|
|---|
| 31 | Requires(post): %{_sbindir}/install-info.exe
|
|---|
| 32 | Requires(preun): %{_sbindir}/install-info.exe
|
|---|
| 33 | Requires: perl >= 5.7.3
|
|---|
| 34 | #Requires: perl(Text::Unidecode), perl(Unicode::EastAsianWidth), perl(Data::Dumper), perl(Locale::Messages)
|
|---|
| 35 | BuildRequires: 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.
|
|---|
| 49 | Requires: info = %{version}-%{release}
|
|---|
| 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 | %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
|
|---|
| 90 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 91 | rm -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
|
|---|
| 96 | autogen.sh
|
|---|
| 97 |
|
|---|
| 98 | # Change DEFAULT_INFOPATH to match prefix
|
|---|
| 99 | sed -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.
|
|---|
| 109 | export TEXINFO_DEV_SOURCE=1
|
|---|
| 110 |
|
|---|
| 111 | make %{?_smp_mflags}
|
|---|
| 112 |
|
|---|
| 113 | %install
|
|---|
| 114 | mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
|
|---|
| 115 |
|
|---|
| 116 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
|
|---|
| 117 |
|
|---|
| 118 | mkdir -p $RPM_BUILD_ROOT%{tex_texinfo}
|
|---|
| 119 | install -p -m644 doc/texinfo.tex doc/txi-??.tex $RPM_BUILD_ROOT%{tex_texinfo}
|
|---|
| 120 |
|
|---|
| 121 | install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_infodir}/dir
|
|---|
| 122 | mv $RPM_BUILD_ROOT%{_bindir}/install-info.exe $RPM_BUILD_ROOT%{_sbindir}
|
|---|
| 123 |
|
|---|
| 124 | mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
|
|---|
| 125 | cp %{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
|
|---|
| 136 | if [ -f %{_infodir}/texinfo.gz ]; then # --excludedocs?
|
|---|
| 137 | %{_sbindir}/install-info.exe %{_infodir}/texinfo.gz %{_infodir}/dir || :
|
|---|
| 138 | elif [ -f %{_infodir}/texinfo.info ]; then # --excludedocs?
|
|---|
| 139 | %{_sbindir}/install-info.exe %{_infodir}/texinfo.info %{_infodir}/dir || :
|
|---|
| 140 | fi
|
|---|
| 141 |
|
|---|
| 142 | %preun
|
|---|
| 143 | if [ $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
|
|---|
| 149 | fi
|
|---|
| 150 |
|
|---|
| 151 | %post -n info
|
|---|
| 152 | if [ -f %{_infodir}/info-stnd.info ]; then # --excludedocs?
|
|---|
| 153 | %{_sbindir}/install-info.exe %{_infodir}/info-stnd.info %{_infodir}/dir
|
|---|
| 154 | fi
|
|---|
| 155 | if [ -x %{_bindir}/sed ]; then
|
|---|
| 156 | %{_bindir}/sed -i '/^This is.*produced by makeinfo.*from/d' %{_infodir}/dir || :
|
|---|
| 157 | fi
|
|---|
| 158 |
|
|---|
| 159 | %preun -n info
|
|---|
| 160 | if [ $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
|
|---|
| 165 | fi
|
|---|
| 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.
|
|---|