namazu-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. %define _localstatedir /var
  2. %define _docdir %{_defaultdocdir}
  3. %define vinedocver 4.1
  4. %define nmzver 2.0.20
  5. %define tknamazuver 1.90
  6. Summary: Namazu is a search engine intented for easy use
  7. Summary(ja): 日本語全文検索エンジン
  8. Name: namazu
  9. Version: %{nmzver}
  10. Release: 2%{?_dist_release}
  11. Group: Applications/Text
  12. License: GPL2
  13. URL: http://www.namazu.org/
  14. Source0: http://www.namazu.org/stable/namazu-%{nmzver}.tar.gz
  15. Source1: http://www.cwo.zaq.ne.jp/vine-linux/text/TCL-scroll.txt
  16. Source2: namazu-vinehtml-%{vinedocver}.tar.gz
  17. Source3: tknamazurc.vine
  18. Source4: dw3m
  19. Source10: filter-requires-namazu.sh
  20. %define __find_requires %{SOURCE10}
  21. Patch0: namazu-2.0.20-nkf.patch
  22. Patch5: tknamazu.tcl.selall.patch
  23. Patch6: tknamazu.tcl.wheel.patch
  24. Patch7: tknamazu.tcl.w3m.patch
  25. Patch8: tknamazu-nowishjp.patch
  26. BuildRoot: %{_tmppath}/%{name}-%{nmzver}-root
  27. BuildRequires: kakasi
  28. BuildRequires: perl
  29. BuildRequires: perl-File-MMagic >= 1.21
  30. BuildRequires: nkf
  31. Requires: perl
  32. Requires: perl-File-MMagic >= 1.21
  33. Requires: kakasi >= 2.3.2
  34. Requires: w3m
  35. Vendor: Project Vine
  36. Distribution: Vine Linux
  37. %description
  38. Namazu is a search engine software intended for easy use. Not
  39. only it works as CGI program for small or medium scale WWW search
  40. engine, but also works as personal use such as search system for
  41. local HDD. Now, search clients for Mule and Tcl/Tk, JAVA and
  42. Win32 are available.
  43. %description -l ja
  44. 日本語全文検索エンジンです。 CGI として動作させることにより小中規模の
  45. WWW 全文検索システムを構築することができるほか、ハードディスク内のファ
  46. イルを対象としたようなパーソナルな用途にも使えるます。
  47. namazu_VineDocsdb, namazu_JFdb, namazu_JMANdb をインストールすると、
  48. tknamazuなどから Vine のオリジナルドキュメントや、JF、jman-pages の全文
  49. 検索をできるようになります。apacheなどでhttpdを立ち上げれば、
  50. http://localhost/search.html から検索をすることもできます。
  51. !!!注意!!! namazu-2 で用いるインデックスファイルとnamazu-1で用いる
  52. インデックスファイルは互換性がありません。namazu-1でインデックスを
  53. 作成しているかたは、namazu-1を用いるか、インデックスを作り直すよう
  54. にしてください。
  55. %package devel
  56. Summary: Libraries and include files of Namazu
  57. Summary(ja): Namazu の開発用ライブラリおよびヘッダファイル
  58. Group: Development/Libraries
  59. Requires: %{name} = %{version}
  60. %description devel
  61. Namazu の開発用ライブラリとヘッダファイルです。
  62. %package cgi
  63. Summary: A CGI interface for Namazu
  64. Summary(ja): Namazu用 CGI インターフェイス
  65. Group: Applications/Text
  66. Requires: %{name} = %{version}
  67. Requires: webserver
  68. %description cgi
  69. A CGI interface for Namazu.
  70. %description cgi -l ja
  71. Namazu 用の CGI インターフェイスです。
  72. %package -n tknamazu
  73. Summary: A Tcl/Tk interface for Namazu
  74. Summary(ja): Namazu用 Tcl/Tk インターフェイス
  75. Version: 1.90_%{nmzver}
  76. Group: Applications/Text
  77. Requires: namazu = %{nmzver}
  78. Requires: tk
  79. Requires: webclient
  80. %description -n tknamazu
  81. A TK interface for Namazu.
  82. %description -n tknamazu -l ja
  83. Namazu 用の Tcl/TK インターフェイスです。
  84. %prep
  85. %setup -q -a 2 -n namazu-%{nmzver}
  86. %patch0 -p1
  87. cd tknamazu
  88. %patch5 -p0
  89. %patch6 -p0
  90. %patch7 -p0
  91. %patch8 -p0
  92. cd ..
  93. %build
  94. if [ ! -f configure ]; then
  95. CFLAGS="%{optflags}" ./autogen.sh \
  96. --prefix=%{_prefix} \
  97. --libdir=%{_libdir} \
  98. --sysconfdir=%{_sysconfdir} \
  99. --mandir=%{_mandir} \
  100. --localstatedir=%{_localstatedir} \
  101. --libexecdir=/var/www/cgi-bin
  102. else
  103. CFLAGS="$RPM_OPT_FLAGS" ./configure \
  104. --prefix=%{_prefix} \
  105. --libdir=%{_libdir} \
  106. --sysconfdir=%{_sysconfdir} \
  107. --mandir=%{_mandir} \
  108. --localstatedir=%{_localstatedir} \
  109. --libexecdir=/var/www/cgi-bin
  110. fi
  111. make
  112. pushd tknamazu
  113. CFLAGS="%{optflags}" ./configure \
  114. --prefix=%{_prefix} \
  115. --with-namazu=%{_bindir} \
  116. --with-mknmz=%{_bindir} \
  117. --with-lynx=%{_bindir} \
  118. --with-indexdir=%{_localstatedir}/namazu/index
  119. make
  120. popd
  121. %install
  122. rm -rf %{buildroot}
  123. make prefix=%{buildroot}%{_prefix} \
  124. libdir=%{buildroot}%{_libdir} \
  125. sysconfdir=%{buildroot}%{_sysconfdir} \
  126. mandir=%{buildroot}%{_mandir} \
  127. localstatedir=%{buildroot}%{_localstatedir} \
  128. libexecdir=%{buildroot}/var/www/cgi-bin \
  129. install
  130. chmod a+rwt -R %{buildroot}%{_localstatedir}/namazu
  131. chmod a+rwt -R %{buildroot}%{_localstatedir}/namazu/index
  132. #mv -f $RPM_BUILD_ROOT%{_sysconfdir}/namazu/namazurc-sample \
  133. # $RPM_BUILD_ROOT%{_sysconfdir}/namazu/namazurc
  134. #mv -f $RPM_BUILD_ROOT%{_sysconfdir}/namazu/mknmzrc-sample \
  135. # $RPM_BUILD_ROOT%{_sysconfdir}/namazu/mknmzrc
  136. # Vine stuff below
  137. # config stuff is to be installed afterwards
  138. rm -f %{buildroot}%{_sysconfdir}/namazu/*-sample
  139. # prepare documents
  140. rm -rf docs-to-include
  141. mkdir -p docs-to-include
  142. cp -pr %{buildroot}%{_datadir}/namazu/doc/* docs-to-include/
  143. rm -rf %{buildroot}%{_datadir}/namazu/doc/*
  144. # compress huge files in %doc :-)
  145. # gzip --force --best ChangeLog ChangeLog.1 || :
  146. # install tknamazu
  147. make -C tknamazu DESTDIR=%{buildroot} install
  148. install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/tknamazu/tknamazurc
  149. cp -p %{SOURCE1} %{buildroot}%{_datadir}/tknamazu/wheel.tcl
  150. install -p -m 755 %{SOURCE4} %{buildroot}%{_bindir}
  151. # install items for Vine Linux
  152. make -C namazu-vinehtml-%{vinedocver} \
  153. DESTDIR=%{buildroot} NAMAZUVER=%{version} install
  154. %find_lang %{name}
  155. %clean
  156. rm -rf %{buildroot}
  157. %post -p /sbin/ldconfig
  158. %postun -p /sbin/ldconfig
  159. %triggerpostun -- namazu < 2.0.4
  160. case "$LANG" in
  161. ja*)
  162. echo "!!!注意!!! namazu-2 で用いるインデックスファイルとnamazu-1で用いる";
  163. echo "インデックスファイルは互換性がありません。namazu-1でインデックスを";
  164. echo "作成しているかたは、namazu-1を用いるか、インデックスを作り直すよう";
  165. echo "にしてください。";
  166. ;;
  167. *)
  168. echo "!!!warning!!! Index files for namazu-2 are not compatible with those";
  169. echo "for namazu-1. If you have already created any index on namazu-1,";
  170. echo "make sure you remake index on namazu-2, or you should still use";
  171. echo "namazu-1 packages.";
  172. ;;
  173. esac
  174. %files -f %{name}.lang
  175. %defattr(-, root, root)
  176. %doc AUTHORS ChangeLog* COPYING CREDITS INSTALL* README* HACKING*
  177. %doc NEWS THANKS TODO
  178. %doc lisp/ etc/namazu.png docs-to-include/*
  179. %config %{_sysconfdir}/namazu/*
  180. %{_bindir}/namazu
  181. %{_bindir}/bnamazu
  182. %{_bindir}/*nmz
  183. %{_bindir}/mailutime
  184. %{_bindir}/nmzcat
  185. %{_bindir}/nmzegrep
  186. %{_bindir}/nmzgrep
  187. %{_bindir}/nmzmerge
  188. %{_libdir}/libnmz.so.*
  189. %{_mandir}/man1/*
  190. %dir %{_datadir}/namazu
  191. %{_datadir}/namazu/*
  192. %dir %{_localstatedir}/namazu
  193. %dir %{_localstatedir}/namazu/index
  194. %files devel
  195. %defattr(-, root, root)
  196. %{_bindir}/nmz-config
  197. %{_includedir}/namazu/*.h
  198. %{_libdir}/libnmz.so
  199. %exclude %{_libdir}/libnmz.la
  200. %{_libdir}/libnmz.a
  201. %files cgi
  202. %defattr(-, root, root)
  203. /var/www/cgi-bin/namazu.cgi
  204. %config(noreplace) /var/www/cgi-bin/.namazurc
  205. /var/www/icons/*
  206. %config(noreplace) /var/www/html/*
  207. %files -n tknamazu
  208. %doc tknamazu/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,README}
  209. %defattr(-, root, root)
  210. %{_bindir}/dw3m
  211. %{_bindir}/tknamazu
  212. %dir %{_datadir}/tknamazu
  213. %{_datadir}/tknamazu/*
  214. %changelog
  215. * Wed Apr 14 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.20-2
  216. - fixed build dependencies
  217. - updated SOURCE10
  218. * Sat Mar 27 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.20-1
  219. - new upstream release
  220. - built with new toolchain
  221. - updated Patch0
  222. * Sat Oct 18 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.18-2
  223. - spec in UTF-8
  224. * Sat May 17 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.18-1
  225. - applied new versioning policy
  226. - removed libnmz.la from devel package
  227. * Wed Mar 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.18-0vl1
  228. - new upstream release
  229. - updated namazu-vinehtml
  230. - namazu-cgi files are installed to /var/www
  231. * Sun Feb 17 2008 Shu KONNO <owa@bg.wakwak.com> 2.0.16-0vl4
  232. - rebuild with tcl/tk-8.4.18
  233. * Tue Oct 09 2007 Shu KONNO <owa@bg.wakwak.com> 2.0.16-0vl3
  234. - rebuild with tcl/tk-8.4.16
  235. * Sun Oct 29 2006 NAKAMURA Kenta <kenta@vinelinux.org> 2.0.16-0vl2
  236. - added --libdir=%%{_libdir} configure option
  237. * Sat May 27 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.16-0vl1
  238. - updated 2.0.16
  239. - added Source10 from Fedora
  240. * Wed Mar 8 2006 Akira TAGOH <tagoh@redhat.com> - 2.0.15-3
  241. - filter-requires-namazu.sh: updated to fix much more self-dependencies. (#184149)
  242. * Fri Aug 19 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.14-0vl1
  243. - updated 2.0.14
  244. - dropped Patch20, merged into upstream
  245. - changed tknamazu versioning
  246. * Tue Dec 28 2004 IKEDA Katsumi <ikeda@webmasters.gr.jp> 2.0.13-1vl4.1
  247. - added security fix patch namazu-2.0.13-xss-tab.patch.
  248. * Sun Oct 17 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.13-1vl4
  249. - namazu-vinehtml-3.1
  250. updated namazu.vine.default
  251. * Tue Jul 13 2004 Tomoya TAKA <taka@vinelinux.org> 2.0.13-1vl3
  252. - remove 'Requires: tk' from namazu, add it to tknamazu
  253. * Mon Jul 12 2004 Satoshi MACHINO <machino@vinelinux.org> 2.0.13-1vl2
  254. - added Require: tk
  255. * Wed May 12 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.13-1vl1
  256. - updated Patch10 from Fedora
  257. * Fri Apr 16 2004 Akira TAGOH <tagoh@redhat.com> 2.0.13-2
  258. - namazu-2.0.13-de.patch: applied to fix German templates.
  259. - separated package namazu-cgi, tknamazu
  260. - Require: perl-File-MMagic >= 1.21, BuildRequire: perl-File-MMagic >= 1.21
  261. * Fri Apr 11 2003 IWAI Masaharu <iwai@alib.jp> 2.0.12-0vl3
  262. - build with new toolchain
  263. - add namazu-2.0.12-de.diff (Patch10)
  264. * Tue Nov 19 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
  265. - 2.0.12-0vl2
  266. - add %config(noreplace) tag /home/httpd/cgi-bin/.namazurc
  267. - add %config(noreplace) tag /home/httpd/html/*
  268. * Thu Sep 05 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.12-0vl1
  269. - updated to new upstream release
  270. * Thu Dec 27 2001 Toru Sagami <sagami@vinelinux.org>
  271. - 2.0.10-0vl1
  272. * Fri Nov 30 2001 Toru Sagami <sagami@vinelinux.org>
  273. - 2.0.9-0vl1
  274. * Tue Nov 27 2001 Toru Sagami <sagami@vinelinux.org>
  275. - 2.0.8-0vl1
  276. * Thu Sep 13 2001 Toru Sagami <sagami@vinelinux.org>
  277. - 2.0.7-0vl1
  278. - namazu-vinehtml-2.5.tar.gz: handle namazu version
  279. * Fri Aug 17 2001 <sagami@vinelinux.org>
  280. - 2.0.6-0vl1
  281. - chmod a+rwt %%{_localstatedir}/namazu{,index}
  282. - introduced %%{_docdir} definition
  283. 8
  284. * Mon Jul 16 2001 Jun Nishii <jun@vinelinux.org> 2.0.5-0vl6
  285. - change nkf option [vine-users:036182]
  286. * Wed Jun 13 2001 Jun Nishii <jun@vinelinux.org> 2.0.5-0vl5
  287. - added dep for perl-File-MMagic
  288. * Sun May 13 2001 <sagami@vinelinux.org>
  289. - 2.0.5-0vl4: add ad-hoc patch to erase Requirement for wish8.0jp
  290. * Fri Apr 20 2001 <sagami@vinelinux.org>
  291. - 2.0.5-0vl3
  292. - namazu-vinehtml-2.4.tar.gz: fixed typo
  293. * Wed Jan 10 2001 Jun Nishii <jun@vinelinux.org>
  294. - 2.0.5-0vl2
  295. - use nkf/kakasi-modules in mknmzrc, because /usr/bin/nkf
  296. seems not to work correctly with namazu
  297. * Fri Jan 5 2001 Jun Nishii <jun@vinelinux.org>
  298. - 2.0.5-0vl1
  299. - added lisp/ in %doc
  300. * Thu Dec 28 2000 Tomoya TAKA <tomoya@olive.plala.or.jp> 2.0.4-0vl8
  301. - changed character encoding of namazu-vinehtml from ISO-2022-JP to EUC-JP
  302. * Wed Dec 27 2000 Tomoya TAKA <tomoya@olive.plala.or.jp> 2.0.4-0vl8
  303. - some fixes to handle man pages correctly with _mandir
  304. - replaced prefix and sysconfdir macros with rpm's _prefix and _sysconfdir
  305. * Sun Nov 12 2000 MACHINO, Satoshi <machino@vinelinux.org> 2.0.4-0vl7
  306. - build on gcc-2.95.3
  307. - partially used rpmmacros
  308. * Wed Oct 25 2000 Jun Nishii <jun@vinelinux.org>
  309. - 2.0.4-0vl6
  310. - fix bug in .tknamazurc
  311. * Fri Oct 13 2000 Jun Nishii <jun@vinelinux.org>
  312. - 2.0.4-0vl5
  313. - fix bug in .namazurc and missing NMZ.*
  314. * Fri Sep 15 2000 Jun Nishii <jun@vinelinux.org>
  315. - 2.0.4-0vl4
  316. - added some lacked binaries in /usr/bin
  317. * Tue Aug 01 2000 Toru Sagami <czs14350@mb.infoweb.ne.jp>
  318. - 2.0.4-0vl3
  319. - handle /usr/share/namazu/etc correctly (should be moved to docdir...)
  320. * Thu Jul 05 2000 Toru Sagami <czs14350@nifty.ne.jp>
  321. - added Distribution/Vendor tag, just in case...
  322. - moved post stuff to triggerpostun -- namazu < 2.0.4
  323. - fixed RPM packaging stuff (files in docdir and doc in /usr/share, and more)
  324. - namazu-vinehtml-2.1: freshen some files and add default ones
  325. * Thu Jun 15 2000 Jun Nishii <jun@vinelinux.org>
  326. - 2.0.4-0vl1
  327. - ported for Vine Linux
  328. - now, use w3m in tknamazu!
  329. * Sun Feb 20 2000 Ryuji Abe <raeva@t3.rim.or.jp>
  330. - Install namazu.cgi at /home/httpd/cgi-bin.
  331. - Fixed typo.
  332. * Sat Feb 19 2000 Satoru Takabayashi <satoru-t@is.aist-nara.ac.jp>
  333. - Change URL.
  334. * Tue Feb 15 2000 Ryuji Abe <raeva@t3.rim.or.jp>
  335. - Delete package entries elisp and cgi.
  336. * Wed Feb 02 2000 Ryuji Abe <raeva@t3.rim.or.jp>
  337. - Apapted for namazu-current.
  338. - Changed group Utilities/Text -> Applications/Text.
  339. * Thu Dec 30 1999 Ryuji Abe <raeva@t3.rim.or.jp>
  340. - rpm-3.0.x adaptations.
  341. - Added package entries elisp and cgi (currently comment out).
  342. [Merged SAKA Toshihide's changes for Kondara MNU/Linux.]
  343. * Mon Nov 08 1999 Ryuji Abe <raeva@t3.rim.or.jp>
  344. - Changed includedir %{prefix}/include/namazu.
  345. - Bug fix at configure section.
  346. * Thu Nov 04 1999 Ryuji Abe <raeva@t3.rim.or.jp>
  347. - Added nmz-config in devel package.
  348. * Wed Nov 03 1999 Ryuji Abe <raeva@t3.rim.or.jp>
  349. - Use our definite macros, ver, rel, prefix, sysconfdir, and localstatedir.
  350. - If configure not found, use autogen.sh.
  351. - Optimized for SMP environment.
  352. - Build devel package.
  353. * Tue Oct 12 1999 Ryuji Abe <raeva@t3.rim.or.jp>
  354. - Fixed correctly executables entry at %files.
  355. - Added missing /usr/share/locale entry at %files.
  356. * Thu Aug 26 1999 Ryuji Abe <raeva@t3.rim.or.jp>
  357. - Requires perl >= 5.004.
  358. - Delete Packager tag.
  359. - Clean up at %prep.
  360. - Use CFLAGS="$RPM_OPT_FLAGS" at %build.
  361. - Use $RPM_BUILD_ROOT variables at %install.
  362. - Change configure option at %build and %files for new namazu directory structure.
  363. * Sun May 23 1999 Taku Kudoh <taku@TAHOO.ORG>
  364. -