bookview-vl.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. Summary: BookView is a NDTP client.
  2. Summary(ja): BookView - NDTP クライアント
  3. Name: bookview
  4. Version: 3.2
  5. Release: 1%{?_dist_release}
  6. Source: ftp://ftp.sra.co.jp/pub/net/ndtp/bookview/%{name}-%{version}.tar.gz
  7. Source1: %{name}-redhat.tar.gz
  8. License: GPL
  9. Group: Applications/Text
  10. Url: http://www.sra.co.jp/people/m-kasahr/bookview/
  11. Buildarch: noarch
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  13. Requires: tcl >= 8.0.5_jp
  14. Requires: tk >= 8.0.5_jp
  15. BuildPrereq: tcl >= 8.4
  16. %define tkpath /usr/lib/tk8.0jp
  17. %define appsdir /etc/X11/applnk
  18. %define docpath %{_docdir}/%{name}-%{version}
  19. %description
  20. BookView is a NDTP (Network Dictionary Transfer Protocol) client
  21. written in Tcl /Tk. It requires Tcl/Tk8.0jp or Tcl/Tk8.3 and higher
  22. (`jp' means `Japanized version').
  23. #'
  24. %description -l ja
  25. BookView は CD-ROM 書籍を読むための、Tcl/Tkで書かれた NDTP
  26. (Network Dictionary Transfer Protocol) クライアントです。
  27. 動作させるには Tcl/Tk8.0jp あるいは Tcl/Tk8.3 以上が必要です。
  28. %prep
  29. rm -rf $RPM_BUILD_ROOT
  30. %setup -q -a 1
  31. # correct documents
  32. for i in doc/bookview.texi doc-ja/bookview-ja.texi;do
  33. mv $i $i.org
  34. cat $i.org | sed \
  35. -e 's:/usr/local/etc/bookview.conf:/etc/%{name}/bookview.conf:g' \
  36. -e 's:/usr/local:%{_prefix}:g' \
  37. > $i
  38. done
  39. %build
  40. ./configure --prefix=%{_prefix} \
  41. --sysconfdir=/etc/%{name} \
  42. --infodir=%{_infodir}
  43. make
  44. %install
  45. make DESTDIR=$RPM_BUILD_ROOT install
  46. install -d $RPM_BUILD_ROOT/etc/%{name}
  47. install -m 644 %{name}.conf $RPM_BUILD_ROOT/etc/%{name}
  48. install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
  49. install -m 644 *.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps
  50. install -d $RPM_BUILD_ROOT%{appsdir}/Applications
  51. install -m 644 *.desktop $RPM_BUILD_ROOT%{appsdir}/Applications
  52. echo "Categories=Application;Utility;" >> \
  53. $RPM_BUILD_ROOT%{appsdir}/Applications/BookView.desktop
  54. %clean
  55. rm -rf $RPM_BUILD_ROOT
  56. %post
  57. if [ -x /bin/grep -a -f /etc/services ] ; then
  58. grep -q "^ndtp" /etc/services || \
  59. echo "ndtp 2010/tcp # added by bookview RPM" >> /etc/services
  60. fi
  61. if [ -f %{tkpath}/kinput.tcl -a -x /bin/grep -a -x /bin/sed ]; then
  62. if ! grep -q 'set KIStart .*<Shift-space>' %{tkpath}/kinput.tcl; then
  63. cat %{tkpath}/kinput.tcl | \
  64. sed 's/set KIStart "/set KIStart "<Shift-space> /' \
  65. > %{tkpath}/kinput.tmp
  66. mv %{tkpath}/kinput.tcl %{tkpath}/kinput.tcl.rpmsave
  67. echo Original file is saved as %{tkpath}/kinput.tcl.rpmsave
  68. mv %{tkpath}/kinput.tmp %{tkpath}/kinput.tcl
  69. fi
  70. fi
  71. %files
  72. %defattr(-,root,root)
  73. %doc [ACNR]* doc*/help*.txt
  74. %{_bindir}/*
  75. %dir /etc/%{name}
  76. %config(missingok) /etc/%{name}/*
  77. %{_infodir}/*
  78. %{_datadir}/bookview/*
  79. %{_datadir}/pixmaps/*.xpm
  80. %config(missingok) %{appsdir}/Applications/*.desktop
  81. %changelog
  82. * Fri Sep 19 2008 Shu KONNO <owa@bg.wakwak.com> 3.2-1vl5
  83. - applied new versioning policy, spec in utf-8
  84. * Sun Dec 5 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.2-0vl3
  85. - fixed .desktop
  86. * Tue Nov 23 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.2-0vl2
  87. - fixed spec file encoding (it was utf-8...)
  88. - fixed Group to Applications/Text
  89. * Wed Jun 25 2003 Masaki Shinomiya <shino@pos.to> 3.2-0vl1
  90. - new upstream release supports Tcl/Tk-8.3 and higher
  91. - noarch, omit documents for install
  92. - buildrequire tcl >= 8.4 to prevent to rebuild on Vine 2.x
  93. -
  94. - if you want to use this version on Vine 2.x,
  95. - just install noarch.rpm build with tcl >= 8.4.
  96. - it may works.
  97. * Sat Jun 14 2003 Masaki Shinomiya <shino@pos.to> 3.1.1-0vl1
  98. - post install script to modify services and kinput.tcl
  99. - configure with specifying sysconfdir and infdir
  100. - files, add luncher, description ja, requires, bookview.conf
  101. - requires, buildprereq
  102. * Sun May 20 2001 UECHI Yasumasa <uh@u.dhis.portside.net>
  103. - 1st release