File namazu.spec of Package namazu

#
# spec file for package namazu (Version 2.0.18)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           namazu
BuildRequires:  kakasi-devel nkf perl-File-MMagic perl-NKF perl-Text-ChaSen perl-Text-Kakasi
License:        GPL v2 or later
Group:          Productivity/Networking/Web/Utilities
Requires:       perl >= 5.8.0, perl-File-MMagic >= 1.20, nkf >= 1.70, perl-NKF >= 1.70
Requires:       kakasi >= 2.3.0, perl-Text-Kakasi >= 1.00
AutoReqProv:    on
Version:        2.0.18
Release:        1
Url:            http://www.namazu.org/
# Original Source is gzipped. 
Source0:        http://www.namazu.org/stable/%{name}-%{version}.tar.bz2
Patch0:         linguas.patch
Patch1:         namazu-2.0.6-newgettext3.patch
Patch2:         configure.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        A Full-Text Search Engine
#Summary(ja): 全文検索シス テムです。
# %description -l ja
# Namazu は手軽に使えることを第一に目指した日本語全文検索シ
# ステムです。CGI として動作させることにより小中規模の WWW 
# 全文検索システムを構築することができるほか、コマンドライ
# ンやEmacs上で電子メイルの山を検索するといった個人用途にも
# 使えます。
# 
# Authors:
# --------
#     Satoru Takabayashi <satoru@namazu.org>
#     knok@daionet.gr.jp (NOKUBI Takatsugu)
#     Yukinori MAEDA <yuki@myu.org>
#     Ken-ichi Hirose <kenzo-@tama.or.jp>
#     masao@ulis.ac.jp (Masao Takaku)
#     Ryuji Abe <raeva@t3.rim.or.jp>
#     Hajime BABA <baba@kusastro.kyoto-u.ac.jp>
#     KOSEKI Yoshinori <kose@wizard.tamra.co.jp>
#     Rei FURUKAWA <furukawa@tcp-ip.or.jp>
#     Makoto Fujiwara <makoto@ki.nu>
#     Kenji Suzuki <kenji@po.ganseki.ne.jp>
#     MIYOSHI Masanori <miyoshi@ask.ne.jp>
#     Hideyuki SHIRAI  <shirai@rdmg.mgcs.mei.co.jp>
#     Jose Juan Zapater Vera <compi@arrakis.es>
#     Yoshinori TAKESAKO <takesako@robotics.im.hiroshima-cu.ac.jp>
#     SATOH Fumiyasu <fumiya@samba.gr.jp>

%description
Namazu is a full-text search engine software intended for easy use. It
works not only as a CGI program for small or medium scale WWW search
engines, but also works for personal use such as a search system for
the local hard disk.



Authors:
--------
    Satoru Takabayashi <satoru@namazu.org>
    knok@daionet.gr.jp (NOKUBI Takatsugu)
    Yukinori MAEDA <yuki@myu.org>
    Ken-ichi Hirose <kenzo-@tama.or.jp>
    masao@ulis.ac.jp (Masao Takaku)
    Ryuji Abe <raeva@t3.rim.or.jp>
    Hajime BABA <baba@kusastro.kyoto-u.ac.jp>
    KOSEKI Yoshinori <kose@wizard.tamra.co.jp>
    Rei FURUKAWA <furukawa@tcp-ip.or.jp>
    Makoto Fujiwara <makoto@ki.nu>
    Kenji Suzuki <kenji@po.ganseki.ne.jp>
    MIYOSHI Masanori <miyoshi@ask.ne.jp>
    Hideyuki SHIRAI  <shirai@rdmg.mgcs.mei.co.jp>
    Jose Juan Zapater Vera <compi@arrakis.es>
    Yoshinori TAKESAKO <takesako@robotics.im.hiroshima-cu.ac.jp>
    SATOH Fumiyasu <fumiya@samba.gr.jp>

%package -n namazu-devel
License:        GPL v2 or later
Summary:        header files and libraries of Namazu
# Summary(ja): Namazu のヘッダファイル及びライブラリです。
Group:          Productivity/Networking/Web/Utilities
Requires:       %{name} = %{version}
# %description -n namazu-devel -l ja
# Namazuのヘッダファイル及びライブラリです。

%description -n namazu-devel
header files and libraries of Namazu



Authors:
--------
    Satoru Takabayashi <satoru@namazu.org>
    knok@daionet.gr.jp (NOKUBI Takatsugu)
    Yukinori MAEDA <yuki@myu.org>
    Ken-ichi Hirose <kenzo-@tama.or.jp>
    masao@ulis.ac.jp (Masao Takaku)
    Ryuji Abe <raeva@t3.rim.or.jp>
    Hajime BABA <baba@kusastro.kyoto-u.ac.jp>
    KOSEKI Yoshinori <kose@wizard.tamra.co.jp>
    Rei FURUKAWA <furukawa@tcp-ip.or.jp>
    Makoto Fujiwara <makoto@ki.nu>
    Kenji Suzuki <kenji@po.ganseki.ne.jp>
    MIYOSHI Masanori <miyoshi@ask.ne.jp>
    Hideyuki SHIRAI  <shirai@rdmg.mgcs.mei.co.jp>
    Jose Juan Zapater Vera <compi@arrakis.es>
    Yoshinori TAKESAKO <takesako@robotics.im.hiroshima-cu.ac.jp>
    SATOH Fumiyasu <fumiya@samba.gr.jp>

%package -n namazu-cgi
License:        GPL v2 or later
Summary:        a CGI interface for Namazu
# Summary(ja): Namazu のためのCGIインタフェース
Group:          Productivity/Networking/Web/Utilities
# Requires: webserver
# %description -n namazu-cgi -l ja
# Namazu のためのCGIインタフェース

%description -n namazu-cgi
a CGI interface for Namazu



Authors:
--------
    Satoru Takabayashi <satoru@namazu.org>
    knok@daionet.gr.jp (NOKUBI Takatsugu)
    Yukinori MAEDA <yuki@myu.org>
    Ken-ichi Hirose <kenzo-@tama.or.jp>
    masao@ulis.ac.jp (Masao Takaku)
    Ryuji Abe <raeva@t3.rim.or.jp>
    Hajime BABA <baba@kusastro.kyoto-u.ac.jp>
    KOSEKI Yoshinori <kose@wizard.tamra.co.jp>
    Rei FURUKAWA <furukawa@tcp-ip.or.jp>
    Makoto Fujiwara <makoto@ki.nu>
    Kenji Suzuki <kenji@po.ganseki.ne.jp>
    MIYOSHI Masanori <miyoshi@ask.ne.jp>
    Hideyuki SHIRAI  <shirai@rdmg.mgcs.mei.co.jp>
    Jose Juan Zapater Vera <compi@arrakis.es>
    Yoshinori TAKESAKO <takesako@robotics.im.hiroshima-cu.ac.jp>
    SATOH Fumiyasu <fumiya@samba.gr.jp>
    

%prep
%setup0 -q
%patch0 -p1 -b .linguas
#%patch1 -p1 -b .newgettext
%patch2 -p1 -b .config

%build
# XXX is this right - it was /var/lib before FHS macros
%define _localstatedir	/var/lib
%define _libexecdir	/srv/www/cgi-bin
autoreconf --force --install
test -f po/Makevars || mv po/Makevars.template po/Makevars
export CFLAGS="$RPM_OPT_FLAGS" 
%configure --disable-static --with-pic \
	    --with-perl5=/usr/bin/perl
make 

%install
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/namazu \
         $RPM_BUILD_ROOT/%{_libexecdir}
make DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} install
mv %{buildroot}%{_sysconfdir}/namazu/namazurc-sample \
        %{buildroot}%{_sysconfdir}/namazu/namazurc
mv %{buildroot}%{_sysconfdir}/namazu/mknmzrc-sample \
	%{buildroot}%{_sysconfdir}/namazu/mknmzrc
chmod a+rw -R %{buildroot}%{_localstatedir}/namazu
chmod a+rw -R %{buildroot}%{_localstatedir}/namazu/index
mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/namazu/
pushd $RPM_BUILD_ROOT/%{_defaultdocdir}/namazu/
    ln -s %{_datadir}/namazu/doc .
    ln -s %{_datadir}/namazu/etc .
popd
# install (X)Emacs lisp code:
mkdir -p $RPM_BUILD_ROOT/usr/share/emacs/site-lisp
install -p -m 644 lisp/gnus-nmz-1.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp
install -p -m 644 lisp/namazu.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp
mkdir -p $RPM_BUILD_ROOT/usr/share/xemacs/site-lisp/lisp
install -p -m 644 lisp/gnus-nmz-1.el $RPM_BUILD_ROOT/usr/share/xemacs/site-lisp/lisp
install -p -m 644 lisp/namazu.el $RPM_BUILD_ROOT/usr/share/xemacs/site-lisp/lisp
%{find_lang} namazu

%clean
rm -rf $RPM_BUILD_ROOT;

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f namazu.lang
%defattr(-, root, root)
%doc %dir %{_defaultdocdir}/namazu/
%doc %{_defaultdocdir}/namazu/*
%dir %{_sysconfdir}/namazu/
%config(noreplace) %{_sysconfdir}/namazu/*
%{_bindir}/namazu
%{_bindir}/bnamazu
%{_bindir}/*nmz
%{_bindir}/mailutime
%{_bindir}/nmzgrep
%{_bindir}/nmzegrep
%{_bindir}/nmzmerge
%{_bindir}/nmzcat
%{_libdir}/*.so.*
%{_mandir}/man1/*
%{_datadir}/namazu
%attr(755,root,root) %dir %{_localstatedir}/namazu
%attr(755,root,root) %dir %{_localstatedir}/namazu/index
%dir /usr/share/emacs/
%dir /usr/share/emacs/site-lisp/
/usr/share/emacs/site-lisp/*
%dir /usr/share/xemacs/
%dir /usr/share/xemacs/site-lisp/
%dir /usr/share/xemacs/site-lisp/lisp/
/usr/share/xemacs/site-lisp/lisp/*

%files devel
%defattr(-, root, root)
%{_bindir}/nmz-config
%dir %{_includedir}/namazu/
%{_includedir}/namazu/*.h
%{_libdir}/*.so
%exclude %{_libdir}/*.la

%files cgi
%defattr(-, root, root)
%{_libexecdir}/namazu.cgi

%changelog
* Mon Apr 07 2008 mfabian@suse.de
- bnc#373529: update to 2.0.18: Upstream NEWS:
  • Add 'Charset' directive.  "charset" was added to "ContentType"
  of the example in conf/namazurc-sample.
  • "charset" was added to the response header in Error messages
  for namazu.cgi.
  • Add HTML, BODY tags in Error messages for namazu.cgi.
  • '\'', '(', ')' is converted into "&#39;", "&#40;", "&#41;"
  respectively.
  • Add po/{de, pl}.po files. (But, it doesn't translate.)
  • Change charset from SJIS to Shift_JIS in po/ja_SJIS.po.
  • Change soname (LTVERSION 8:0:1)
  • pltests/env.pl: The checked environment variable and version of
  the checked Perl module is added.
  • pltests/mknmz-8.pl.in: The confirmation whether the index
  has been updated is added.
  • pltests/namazu-cgi-12.pl.in: Add new test.
  • tests/mknmz-9: Expand test file.
  • filter/hnf.pl: Correspondence GRP and bug fix.
  • conf/*.win32: Add new files.
  • filter/win32/ole*.pl: correspondence Office 2007. [for Windows]
  • filter/win32/olevisio.pl: It corresponds to Visio 2000 of another
  type. For Visio 2007/.vdx file. [for Windows]
  • OOo bug correction. for Office Open XML file. [for Windows]
  • nmzcat: SJIS output. [For  Windows]
  • mailutime: Bug correction related to passing.
  • To the code in which it considers after 2038 (In the direction
  that doesn't correspond).
  • File-MMagic: Imported 1.27. For eml file.
  • libnmz: Speed-up of retrieval.
  • nmzchkw.pl: New addition. (contrib)
  • libnmz: The bug around the memory is corrected. (users-ja#821).
  • namazu and namazu.cgi: The bug that falls into an infinite
  loop is corrected.
  • namazu and namazu.cgi: Correction of HTML emphasis tag.
  (for Windows)
  • gcnmz and nmzmerge: The output of the log is corrected and
  the format is corrected.
  • namazu and namazu.cgi: The possibility that the buffer
  overflow cuts it when the template is corrected is corrected.
  • filter/mp3.pl: MP3-Info 1.21.
  • namazu.spec.in: add nmzcat, nmzegrep.
  • namazu.spec.in: fix filter-requires-namazu.sh.
  • conf/namazurc-sample: It is added to the comment that
  Suicide_Time is only UNIX.
  • scripts/mknmz.in: The mistake of the number of dummy
  arguments of process_file() is corrected.
  • filter/pdf.pl: 'Unable to convert pdf file (maybe copying
  protection)' was corrected at option --debug.
  • filter/msofficexml.pl: Added new fiter.
  • filter/visio.pl: Added a new filter.
  • filter/mp3.pl: Support MP3-Info 1.21's behavior.
  • tests/*: It deals with trouble in which make check fails
  because of the environment of Mac + gettext 0.14.2.
  • tests/data/ja/*: Added new file.
  • Fix some bugs.
* Mon Feb 25 2008 crrodriguez@suse.de
- fix library-without-ldconfig-postin errors
- disbale static libraries and remove libtool archives
* Tue Dec 19 2006 mfabian@suse.de
- updated to 2.0.16. Upstream NEWS:
  • Directory traversal problem by lang and result of CGI parameter
  is corrected.
  • Substitution of "-r" that doesn't correspond to ACL of NTFS.
  • It corresponds to the file name including space.
  • For MeCab-perl-0.90rc10.
  • The mistake of the document concerning ISO-8859-* is corrected.
  • RedHat software namazu.spec was taken in.
  The unnecessary patch was deleted.
  • Include File::MMagic 1.25.
  • Support MeCab.
  • Add -b and --use-mecab options for mknmz.
  • Add --norc option for mknmz and namazu.
  • Add --decode-base64 option for mknmz.
  • Add new filters (Gnumeric, Koffice, Mainman/Pipermail, Zip, Visio).
  • Add new directives for mknmzrc (MECAB, DENY_DDN).
  To skip when filename is DDN.
  • Add sorting function by date of field.
  • Added new files (nmzcat, nmzegrep).
  • Adapt new filter programs (wvWare 1.0.3, xlhtml 0.5.1, xpdf 3.01).
  • For Windows of filter (msword.pl, excel.pl, powerpoint.pl,
  postscript.pl, etc...).
  • Ole control filter renewal.
  • ';' can have been used for the delimiter of QUERY_STRING.
  • Add the Perl version test program (pltests).
  • Fix some bugs.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Dec 17 2004 mfabian@suse.de
- Bugzilla #49304: update to 2.0.14.
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Thu Jun 19 2003 ro@suse.de
- build with current gettext
* Mon Jun 16 2003 mfabian@suse.de
- add patch for German template files from
  http://www.namazu.org/stable/namazu-2.0.12-de.diff
- fix "directory not owned by any package".
* Sun Feb 16 2003 mfabian@suse.de
- update to 2.0.12
  From the NEWS file of 2.0.12
  * Fix more cross-site scripting issue around NMZ.warnlog.
  From the NEWS file of 2.0.11
  * Change output warning to NMZ.warnlog file instead stderr
  (for cross-site scripting issue on some environments)
  * Update some filters.
  * Fix possibility of buffer overflow.
  * Fix shell execution issue on rpm/deb files.
  * Adaptation to xpdf 1.0x (filter/pdf.pl).
  * Fix possibility of relative path vulnerability on Win95/98.
  * Improve HTML filter (exclude scripting language code).
  * Add German template files.
* Mon Nov 18 2002 schwab@suse.de
- Add AM_GNU_GETTEXT_VERSION.
* Sat Aug 10 2002 mfabian@suse.de
- namazu-devel package should require namazu package
- fix directory permissions
* Mon Aug 05 2002 ro@suse.de
- adapt to server-root /srv/www
* Sat May 18 2002 schwab@suse.de
- Fix use of autoreconf.
* Tue Apr 23 2002 mfabian@suse.de
- fix for x86_64
* Mon Apr 08 2002 mfabian@suse.de
- use autoreconf
* Mon Apr 08 2002 mfabian@suse.de
- make it build again with new gettext 0.11
* Fri Jan 04 2002 tiwai@suse.de
- updated to version 2.0.10.
  (security fix release since 2.0.7)
- gettextized & libtoolized.
* Fri Nov 02 2001 mfabian@suse.de
- new package: namazu-2.0.7
openSUSE Build Service is sponsored by