TrueType-ricty-vl.spec 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. %define _fontdir %{_datadir}/fonts/%{name}
  2. %define migu_version 20121030
  3. %define inconsolata_version 001.010
  4. Summary: TrueType font designed for programing
  5. Summary(ja): プログラミング用 TrueType フォント
  6. Name: TrueType-ricty
  7. Version: 3.2.4
  8. Release: 1%{?_dist_release}
  9. License: public domain, SIL OFL v1.1, M+ FONT LICENSE, IPA Font License v1.0
  10. Group: User Interface/X
  11. URL: http://save.sys.t.u-tokyo.ac.jp/~yusa/fonts/ricty.html
  12. Source0: Ricty-%{version}.tar.gz
  13. Requires: OpenType-inconsolata >= %{inconsolata_version}
  14. Requires: TrueType-migu >= %{migu_version}
  15. BuildRequires: fontforge
  16. Requires(post): fontforge
  17. BuildArch: noarch
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
  19. %description
  20. Ricty is a free, TrueType font designed for programing.
  21. We remark that Ricty fonts is generated in the installation of this package.
  22. %description -l ja
  23. Ricty は Linux 環境での研究・開発に適したフリーのプログラミング用
  24. TrueType フォントです。
  25. Ricty フォントは、パッケージのインストール時に生成されます。
  26. %prep
  27. %setup -q -n Ricty-%{version}
  28. %__sed -i -e "s,#!/usr/local/bin/fontforge,#!/usr/bin/fontforge," ricty_discord_patch.pe || exit 1
  29. %build
  30. %install
  31. %__rm -rf $RPM_BUILD_ROOT
  32. %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/%{name}
  33. %__cp -a ricty_discord_patch.pe $RPM_BUILD_ROOT%{_datadir}/%{name}/
  34. %__cp -a ricty_generator.sh $RPM_BUILD_ROOT%{_datadir}/%{name}/
  35. %__mkdir_p $RPM_BUILD_ROOT%{_fontdir}
  36. %clean
  37. %__rm -rf $RPM_BUILD_ROOT
  38. %post
  39. #set -x
  40. echo "Generating Ricty fonts ... "
  41. (cd %{_fontdir}
  42. %__cp %{_datadir}/%{name}/ricty_discord_patch.pe . || exit 1
  43. %__cp %{_datadir}/%{name}/ricty_generator.sh . || exit 1
  44. sh ricty_generator.sh \
  45. %{_datadir}/fonts/OpenType-inconsolata/Inconsolata.otf \
  46. %{_datadir}/fonts/TrueType-migu/migu-1m-regular.ttf \
  47. %{_datadir}/fonts/TrueType-migu/migu-1m-bold.ttf
  48. %__rm -f ricty_discord_patch.pe ricty_generator.sh ||:
  49. [ ! -f Ricty-Regular.ttf ] && echo "failed." && exit 1
  50. [ ! -f Ricty-Bold.ttf ] && echo "failed." && exit 1
  51. )
  52. echo "done."
  53. %__font_install_post %{_fontdir}
  54. %preun
  55. if [ "$1" = 0 ]; then
  56. %__rm -f %{_fontdir}/Ricty{,Discord}-{Regular,Bold}.ttf ||:
  57. fi
  58. %postun
  59. %__font_install_postun %{_fontdir}
  60. %files
  61. %defattr(-,root,root,-)
  62. %doc README.md
  63. %{_datadir}/%{name}/
  64. # %{_fontdir}/Ricty-Regular.ttf
  65. # %{_fontdir}/Ricty-Bold.ttf
  66. # %{_fontdir}/RictyDiscord-Regular.ttf
  67. # %{_fontdir}/RictyDiscord-Bold.ttf
  68. %{_fontdir}/
  69. %changelog
  70. * Sun Jan 11 2015 Munehiro Yamamoto <munepi@vinelinux.org> 3.2.4-1
  71. - new upstream release
  72. * Mon Jan 13 2014 Munehiro Yamamoto <munepi@vinelinux.org> 3.2.2-1
  73. - new upstream release
  74. * Sat Mar 9 2013 Munehiro Yamamoto <munepi@vinelinux.org> 3.2.1-1
  75. - new upstream release
  76. - supported the new naming rule for Migu fonts
  77. * Thu Jan 12 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.1.3-1
  78. - new upstream release
  79. * Sat Oct 15 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.1.2-1
  80. - new upstream release
  81. - set %%migu_version to 20111002
  82. * Wed Jun 22 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.1.0-2
  83. - added Requires(post): fontforge
  84. * Wed Jun 22 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.1.0-1
  85. - new upstream release
  86. * Sun Jun 5 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.0.2-1
  87. - Initial build.