namazu-vl.spec 14 KB

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