lcdf-typetools.spec 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. ##
  2. ## lcdf-typetools.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package version
  25. %define V_typetools 2.41
  26. %define V_t1utils 1.32
  27. %define V_autofont 0.94
  28. %define V_fontools 20051003
  29. # package information
  30. Name: lcdf-typetools
  31. Summary: LCDF Typegraphy Tools
  32. URL: http://www.lcdf.org/type/
  33. Vendor: Eddie Kohler
  34. Packager: OpenPKG
  35. Distribution: OpenPKG
  36. Class: EVAL
  37. Group: Text
  38. License: GPL+MIT-style
  39. Version: %{V_typetools}
  40. Release: 20060813
  41. # list of sources
  42. Source0: http://www.lcdf.org/type/lcdf-typetools-%{V_typetools}.tar.gz
  43. Source1: http://www.lcdf.org/type/t1utils-%{V_t1utils}.tar.gz
  44. Source2: http://www.lcdf.org/type/Autofont-%{V_autofont}.tar.gz
  45. Source3: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/fontools/fontools-%{V_fontools}.zip
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20040130, tetex, perl, perl-openpkg, gcc, infozip
  50. PreReq: OpenPKG, openpkg >= 20040130, tetex, perl
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. The LCDF Typetools package contains several command-line programs
  55. for manipulating PostScript Type 1 and PostScript-flavored OpenType
  56. fonts. It also contains additional command-line tools for dealing
  57. with Type 1 fonts from a revision of I. Lee Hetheringtons beloved
  58. t1utils. Finally, it contains Autofont and FonTools, a set of tools
  59. for automating the font generation for TeX.
  60. %track
  61. prog lcdf-typetools:typetools = {
  62. version = %{V_typetools}
  63. url = http://www.lcdf.org/type/
  64. regex = lcdf-typetools-(__VER__)\.tar\.gz
  65. }
  66. prog lcdf-typetools:t1utils = {
  67. version = %{V_t1utils}
  68. url = http://www.lcdf.org/type/
  69. regex = t1utils-(__VER__)\.tar\.gz
  70. }
  71. prog lcdf-typetools:autofont = {
  72. version = %{V_autofont}
  73. url = http://www.lcdf.org/type/
  74. regex = Autofont-(__VER__)\.tar\.gz
  75. }
  76. prog lcdf-typetools:fontools = {
  77. version = %{V_fontools}
  78. url = ftp://ftp.openpkg.org/sources/CPY/VERSIONED/fontools/
  79. regex = fontools-(__VER__)\.zip
  80. }
  81. %prep
  82. %setup -q -c
  83. %setup -q -T -D -a1
  84. %setup -q -T -D -a2
  85. %{l_prefix}/bin/unzip -q -x %{SOURCE3}
  86. %build
  87. # build LCDF TypeTools
  88. ( cd lcdf-typetools-%{V_typetools}
  89. CC="%{l_cc}" \
  90. CXX="%{l_cxx}" \
  91. CFLAGS="%{l_cflags -O}" \
  92. CXXFLAGS="%{l_cxxflags -O}" \
  93. CPPFLAGS="%{l_cppflags}" \
  94. LDFLAGS="%{l_ldflags}" \
  95. ./configure \
  96. --prefix=%{l_prefix} \
  97. --with-kpathsea=%{l_prefix}
  98. %{l_make} %{l_mflags -O}
  99. ) || exit $?
  100. # build LCDF T1Utils
  101. ( cd t1utils-%{V_t1utils}
  102. CC="%{l_cc}" \
  103. CFLAGS="%{l_cflags -O}" \
  104. CPPFLAGS="%{l_cppflags}" \
  105. LDFLAGS="%{l_ldflags}" \
  106. ./configure \
  107. --prefix=%{l_prefix}
  108. %{l_make} %{l_mflags -O}
  109. ) || exit $?
  110. # build LCDF AutoFont
  111. %{l_prefix}/bin/perl-openpkg prepare
  112. ( cd Autofont-%{V_autofont}
  113. %{l_prefix}/bin/perl-openpkg configure
  114. %{l_prefix}/bin/perl-openpkg build
  115. ) || exit $?
  116. %install
  117. rm -rf $RPM_BUILD_ROOT
  118. # install LCDF TypeTools
  119. ( cd lcdf-typetools-%{V_typetools}
  120. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  121. ) || exit $?
  122. # install LCDF T1Utils
  123. ( cd t1utils-%{V_t1utils}
  124. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  125. ) || exit $?
  126. # install LCDF AutoFont
  127. ( cd Autofont-%{V_autofont}
  128. %{l_prefix}/bin/perl-openpkg install
  129. ) || exit $?
  130. # install FonTools
  131. ( cd fontools
  132. %{l_shtool} install -c -m 755 \
  133. -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \
  134. bin/* $RPM_BUILD_ROOT%{l_prefix}/bin/
  135. %{l_shtool} install -c -m 644 \
  136. doc/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  137. %{l_shtool} mkdir -f -p -m 755 \
  138. $RPM_BUILD_ROOT%{l_prefix}/share/texmf/fonts/enc/dvips/lcdf-typetools/fontools
  139. %{l_shtool} install -c -m 644 \
  140. share/* $RPM_BUILD_ROOT%{l_prefix}/share/texmf/fonts/enc/dvips/lcdf-typetools/fontools/
  141. ) || exit $?
  142. # post-adjust installation area
  143. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  144. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  145. # determine installation files
  146. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  147. %{l_files_std} `cat perl-openpkg-files`
  148. %files -f files
  149. %clean
  150. rm -rf $RPM_BUILD_ROOT
  151. %post
  152. # update TeX hashes
  153. $RPM_INSTALL_PREFIX/bin/texhash >/dev/null 2>&1 || true
  154. exit 0
  155. %postun
  156. # update TeX hashes
  157. $RPM_INSTALL_PREFIX/bin/texhash >/dev/null 2>&1 || true
  158. exit 0