Name:		howm
Version:	1.3.9.1
Release:	2%{?_dist_release}
Summary:	a note-taking tool on Emacs
Summary(ja):	Emacs で断片的なメモをどんどんとるための環境
License:	GPL
Group:		Applications/Editors/Emacs
URL:		http://howm.sourceforge.jp/
Source0:	%{name}-%{version}.tar.gz
Source1:	%{name}-install.sh
Source2:	%{name}-remove.sh
Source3:	%{name}-init.el
Source4:	vine-default-%{name}.el

BuildRoot:	%{_tmppath}/%{name}-root
BuildArch:	noarch
Requires(post,preun): emacsen

%description
Howm is a note-taking tool on Emacs. It is similar to emacs-wiki;
you can enjoy hyperlinks and full-text search easily. It is not
similar to emacs-wiki; it can be combined with any format.

%description -l ja
Emacs で断片的なメモをどんどんとるための環境です. 分類機能はあえてつけ
ません. かわりに, 全文検索とメモ間リンクが手軽にできるようにしました.
自由書式なので改宗も不要 :-)

%prep
%setup -q

%build
%__rm -rf */Makefile.am */Makefile.in

%install
%__rm -rf %{buildroot}
%__mkdir_p %{buildroot}%{_datadir}/emacs/site-lisp/%{name}
%__mkdir_p %{buildroot}%{emacsen_pkgdir}/install
%__mkdir_p %{buildroot}%{emacsen_pkgdir}/remove

#
# install el files
#

%__install -m 0644 *.el %{buildroot}%{_datadir}/emacs/site-lisp/%{name}
%__install -m 0644 %{SOURCE3} %{SOURCE4} \
    ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/

#
# install script (bytecompile el and install elc, remove)
#

%_installemacsenscript %{name} %{SOURCE1}

%_removeemacsenscript  %{name} %{SOURCE2}

%clean
%__rm -rf %{buildroot}

%post 
#
# bytecompile and install
#

if [ "$1" = 2 ]; then
%_emacsenPackageRemove %{name}

fi
%_addemacsenlist %{name}

%_emacsenPackageInstall %{name}

%preun
if [ "$1" = 0 ]; then
%_emacsenPackageRemove %{name}

%_removeemacsenlist %{name}

fi

%files
%defattr(-,root,root)
%doc COPYING ChangeLog doc en ext ja sample
%{_datadir}/emacs/site-lisp/%{name}/
%{emacsen_pkgdir}/install/%{name}
%{emacsen_pkgdir}/remove/%{name}

%changelog
* Sat Jan 29 2011 Munehiro Yamamoto <munepi@vinelinux.org> 1.3.9.1-2
- updated howm-init.el
  - output "Loading vine-default-howm ..." to the buffer *Messages*

* Sun Jan 02 2011 Munehiro Yamamoto <munepi@vinelinux.org> 1.3.9.1-1
- new upstream release
- dropped howm-1.3.9-check-make-local-hook.patch
  - this patch merged into upstream
- changed to Requires(post,preun): emacsen
  - Prereq tag is already deprecated
- supported vine-default

* Sun Jan 02 2011 Munehiro Yamamoto <munepi@vinelinux.org> 1.3.9-1
- new upstream release
- supported emacs-24.0.50
  - applied howm-1.3.9-check-make-local-hook.patch

* Fri Jan 08 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.3.8-1
- new upstream release
- use %%{emacsen_pkgdir}

* Sat Jan 10 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.3.7-1
- new upstream release

* Sat Nov 01 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.3.6-1
- apply new versioning policy 
- spec in utf-8
- source update

# * Sat Aug 30 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.3.6-0vl1
# - new upstream

* Tue Jan 09 2007 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 1.3.4-0vl1
- New upstream version.
- Change Group.

* Sun May 15 2005 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 1.2.3-0vl1
- New upstream version.

* Sun Nov 21 2004 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 1.2-0vl2
- Fix howm-en-dir and howm-ja-dir.

* Fri Oct 01 2004 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 1.2-0vl1
- New upstream version.

* Mon Jun 14 2004 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 1.1.2.1-0vl1
- New upstream version.

* Tue Feb 24 2004 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 1.1.1-0vl1
- New upstream version.

* Wed Feb 11 2004 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 1.1.0.4-0vl1
- Initial build.

