TrueType-ricty-vl.spec 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. %define _fontdir %{_datadir}/fonts/%{name}
  2. %define migu_version 20110514
  3. %define inconsolata_version 001.010
  4. Summary: TrueType font designed for programing
  5. Summary(ja): プログラミング用 TrueType フォント
  6. Name: TrueType-ricty
  7. Version: 3.1.0
  8. Release: 2%{?_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: http://save.sys.t.u-tokyo.ac.jp/~yusa/fonts/ricty/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. %build
  29. %install
  30. %__rm -rf $RPM_BUILD_ROOT
  31. %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/%{name}
  32. %__cp -a ricty_discord_patch.pe $RPM_BUILD_ROOT%{_datadir}/%{name}/
  33. %__cp -a ricty_generator.sh $RPM_BUILD_ROOT%{_datadir}/%{name}/
  34. %__mkdir_p $RPM_BUILD_ROOT%{_fontdir}
  35. %clean
  36. %__rm -rf $RPM_BUILD_ROOT
  37. %post
  38. #set -x
  39. echo "Generating Ricty fonts ... "
  40. (cd %{_fontdir}
  41. %__cp %{_datadir}/%{name}/ricty_discord_patch.pe . || exit 1
  42. %__cp %{_datadir}/%{name}/ricty_generator.sh . || exit 1
  43. sh ricty_generator.sh \
  44. %{_datadir}/fonts/OpenType-inconsolata/Inconsolata.otf \
  45. %{_datadir}/fonts/TrueType-migu/Migu-1M-regular.ttf \
  46. %{_datadir}/fonts/TrueType-migu/Migu-1M-bold.ttf
  47. %__rm -f ricty_discord_patch.pe ricty_generator.sh ||:
  48. [ ! -f Ricty-Regular.ttf ] && echo "failed." && exit 1
  49. [ ! -f Ricty-Bold.ttf ] && echo "failed." && exit 1
  50. )
  51. echo "done."
  52. %__font_install_post %{_fontdir}
  53. %preun
  54. if [ "$1" = 0 ]; then
  55. %__rm -f %{_fontdir}/Ricty{,Discord}-{Regular,Bold}.ttf ||:
  56. fi
  57. %postun
  58. %__font_install_postun %{_fontdir}
  59. %files
  60. %defattr(-,root,root,-)
  61. %{_datadir}/%{name}/
  62. # %{_fontdir}/Ricty-Regular.ttf
  63. # %{_fontdir}/Ricty-Bold.ttf
  64. # %{_fontdir}/RictyDiscord-Regular.ttf
  65. # %{_fontdir}/RictyDiscord-Bold.ttf
  66. %{_fontdir}/
  67. %changelog
  68. * Wed Jun 22 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.1.0-2
  69. - added Requires(post): fontforge
  70. * Wed Jun 22 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.1.0-1
  71. - new upstream release
  72. * Sun Jun 5 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.0.2-1
  73. - Initial build.