Summary: Cmemo is cool and useful GTK text editor.
Summary(ja): Cmemo はシンプルで使いやすい GTK テキストエディタ
Name: cmemo
Version: 2.1.4
Release: 4%{?_dist_release}
License: GPL
Group: Applications/Editors
## Autoconf/Automake/rpm version
URL: http://www.mindgear.org/index.cgi/PlusAlpha?page=Cmemo%2Bi
Source: http://www.mindgear.org/data/PlusAlpha/%{name}-%{version}.tar.gz
#---------------------------------------------------------------------------
Source1:	cmemo2.desktop

#---------------------------------------------------------------------------
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires: gtk2, gtk2-devel, automake, gettext

#### orignal developer
# Source: http://www1.neweb.ne.jp/wb/smusic/soft/archives/cmemo213.tar.gz
# URL: http://www1.neweb.ne.jp/wb/smusic/
#### Before Packager version (CLOSE site)
# http://www.hi-net.zaq.ne.jp/seiun/linux/archives/cmemo-%{version}-%{release}.tar.gz
# URL: http://www.hi-net.zaq.ne.jp/seiun/linux/index.html
# Packager: MATSUMURA tomohiro <seiwn@excite.co.jp>
#----------------------------------------------------------------------------

%description
Cmemo is a simple, cool and useful text editor. 
 * search for strings, replace
 * Auto indent, line number
 * Emacs key assignment, available
 * highlight a keyword which you want to define
 * Global search and Tag jump
 * any file have EUC/SJIS/JIS/UTF-8[EUC range only] 
   and CR/CRLF/LF is editable
 * Key macros

If you install cmemo completely, please type
 $ %{_prefix}/share/cmemo/cmemocfg.inst [Enter]
to install configuration file.

Other documents, please read this:
 %{_prefix}/share/doc/cmemo-%{version}/

%description -l ja
Cmemoはシンプルで渋くて使いやすいエディタです。主な機能は以下の通り。
・文字列の検索、置換
・オートインデント、行番号表示
・Emacsキーアサインが可能
・構文強調表示 [単語登録可能]
・グローバル検索とタグジャンプ
・EUC/SJIS/JIS/UTF-8[EUCの範囲のみ]およびCR/CRLF/LFのファイルを編集可能
・キーマクロ

※インストール後に各ユーザーで次のコマンドを実行して、
  設定ファイルをインストールしてください。
  $ %{_prefix}/share/cmemo/cmemocfg.inst [Enter]

※まだmanページはありません。各種ドキュメントは標準では
  %{_prefix}/share/doc/cmemo-%{version}/ 以下にコピーされます。


#----------------------------------------------------------------------------
%prep
rm -rf ${RPM_BUILD_ROOT}

%setup -q %{name}-%{version}

%build
./configure --prefix=%{_prefix}
make

%install
%makeinstall
### make prefix=${RPM_BUILD_ROOT}%{_prefix} install

#### Before Pack save
## cp ./cmemocfg12.inst ${RPM_BUILD_ROOT}/usr/bin

# install desktop files
desktop-file-install \
  --vendor=vine \
  --dir=${RPM_BUILD_ROOT}/%{_datadir}/applications \
  %{SOURCE1}

# check desktop files
%check
desktop-file-validate \
 ${RPM_BUILD_ROOT}%{_datadir}/applications/vine-cmemo2.desktop

%clean
rm -rf $RPM_BUILD_ROOT

#----------------------------------------------------------------------------

## %{_datadir}=/usr/share ,%{_bindir}=/usr/bin, %{_prefix}=/usr

%files
%doc ABOUT-NLS COPYING INSTALL
%doc doc/00ADD_cmemo.txt
%doc doc/AUTHORS*
%doc doc/ChangeLog*
%doc doc/INSTALL*
%doc doc/KNOWN_BUGS
%doc doc/Manual.txt
%doc doc/NEWS*
%doc doc/README*
%doc doc/TODO.ja
%doc doc/Usage.ja
%doc doc/org-*
%doc doc/rgbhex.txt

%defattr(-, root, root)
%{_bindir}/cmemo
%{_datadir}/locale/*/LC_MESSAGES/cmemo.mo
%{_datadir}/applications/*.desktop
%{_datadir}/cmemo/po_org.tar.gz
%{_datadir}/cmemo/cmemo2*
%{_datadir}/cmemo/cmemo*.patch
%{_datadir}/cmemo/dot.*
%attr(755,root,root) %{_datadir}/cmemo/cmemocfg.inst
## %docdir directry-name

#----------------------------------------------------------------------------

%post
#if [ "$LANG" = "ja_JP.eucJP" ]; then
if [ "$LANG" = "ja_JP.UTF-8" ]; then
    echo "Cmemoをインストールしていただきありがとうございます。データ"
    echo "ディレクトリ(標準で %{_prefix}/share/cmemo/)の cmemocfg.inst"
    echo "を各ユーザー毎に実行し ~/.cmemo 設定ファイルをコピーしてください"
else
    echo "Cmemo installed, Thank you. Please run script "
    echo "(default: %{_prefix}/share/cmemo/)cmemocfg.inst ,"
    echo "copy your ~/.cmemo config file."
fi

#----------------------------------------------------------------------------
%changelog
* Sat Sep 06 2008 Shu KONNO <owa@bg.wakwak.com> 2.1.4-4
- changed locale condition at %%post

* Fri Aug 29 2008 Seiichirou Babasaki 2.1.4-3
- Changes directory tree.
- Updated configure.ac , Makefile.am .
- Updated specfile (vl, vs, and zon)
- "--prefix=/usr" option enabled.
- added "--enable-openbsd" swtich.(no test yet)
- added 00ADD_cmemo.txt(ja)

* Fri Aug 22 2008 Seiichirou Babasaki 2.1.4-2
- Updated cmemocfg.inst Script .
- Updated specfile (vl and zon)
- localedir chenges /usr/local -> /usr (src/cme_def.h)
- Update to 2.1.4
- Updated cmemo.po 

* Wed Feb 08 2008 Seiichirou Babasaki 2.1.3-1zon5
- Import cmemo - Packager: Babasaki
- Updated specfile
- Update to 2.1.3
  #---------------------#

* Sat Feb 09 2003 MATSUMURA tomohiro <seiwn@excite.co.jp>
- some fix

* Thu Aug 29 2002 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.2.3

* Wed Apr 03 2002 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.2.2

* Tue Mar 12 2002 MATSUMURA tomohiro <seiwn@excite.co.jp>
- update cmemo.inst script

* Fri Mar 08 2002 MATSUMURA tomohiro <seiwn@excite.co.jp>
- fix failing to install on non-GNUgettext system.

* Fri Feb 01 2002 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.2.1 automake/autoconf version
- fix failing to install on non-GNUgettext system.

* Sun Dec 23 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.2.0 automake/autoconf version

* Tue Nov 27 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.2.0

* Mon Oct 15 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.1.11
- and some fix

* Sun Oct 7 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.1.10

* Fri Sep 29 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- fix some error

* Sun Sep 23 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.1.9

* Sun Sep 23 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.1.8

* Mon Sep 17 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- fix locale error

* Sun Sep 16 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- Cmemo and Cmemo-ext, to share Makefile and spec.
- This modify is experiment for preraring next version.

* Sat Aug 18 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.1.7

* Sun Jul 15 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.1.6

* Mon Jul 2 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.1.5

* Sun Jun 24 2001 MATSUMURA tomohiro <seiwn@excite.co.jp>
- version up 1.1.4
