Name: bluefish
Summary: The Bluefish HTML Editor
Summary(ja): Bluefish HTML エディタ
Version: 2.0.3
Release: 1%{?_dist_release}

License: GPLv2
Group:   Applications/Editors
Source:  http://www.bennewitz.com/bluefish/stable/source/%{name}-%{version}.tar.bz2

URL: http://bluefish.openoffice.nl/

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: desktop-file-utils
BuildRequires: enchant-devel 
BuildRequires: glib2-devel >= 2.16.0 
BuildRequires: gtk2-devel >= 2.12.0 
%if %{?_dist_release} == "vl5" || %{?_dist_release} == "vl6"
BuildRequires: gucharmap-devel
%endif
BuildRequires: libxml2-devel
BuildRequires: pcre-devel >= 3.9
BuildRequires: shared-mime-info
Requires(post): desktop-file-utils shared-mime-info
Requires: gtk2 >= 2.12.0 
Requires: pcre >= 3.9

Distribution: Vine Linux
Vendor: Project Vine

%description
Bluefish is a GTK+ HTML editor for the experienced web designer or
programmer. It is not finished yet, but already a very powerful site
creating environment. Bluefish has extended support for programming
dynamic and interactive websites, there is for example a lot of PHP
support.

%description -l ja
Bluefish は経験に富んだウェブデザイナやプログラマ向けの HTML エディタです。
また完成していないが、すでに非常に強力にサイトを作成する環境になっている。
Bluefish は動的な対話型ウェブサイトをプログラミングのために、
拡張サポートしている。例えば、数多くの PHP をサポートしている。

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

%build
%configure --disable-update-databases
make %{?_smp_mflags}

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

make DESTDIR=$RPM_BUILD_ROOT install

# added JIS to default encoding 
echo "JIS (Japanese):ISO-2022-JP:" >> \
    $RPM_BUILD_ROOT%{_datadir}/bluefish/encodings.default

rm -rf $RPM_BUILD_ROOT%{_libdir}/bluefish/*.la

#remove docs because duplicate
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc
rm -rf $RPM_BUILD_ROOT%{_datadir}/applications/bluefish-project.desktop

%post 
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    update-desktop-database -q  &> /dev/null || :
    update-mime-database %{_datadir}/mime &> /dev/null || :
    touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
    gtk-update-icon-cache %{_datadir}/icons/hicolor  &> /dev/null || :
fi

%posttrans
update-desktop-database -q  &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :
gtk-update-icon-cache %{_datadir}/icons/hicolor  &> /dev/null || :

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc [A-LN-Z]*
%{_bindir}/bluefish
%dir %{_libdir}/bluefish
%{_libdir}/bluefish/*.so
%{_datadir}/bluefish
%{_datadir}/icons/hicolor/*
%{_datadir}/pixmaps/*
%{_datadir}/applications/bluefish.desktop
%{_datadir}/locale/*/*/*.mo
%{_datadir}/mime/packages/*.xml
%{_datadir}/xml/bluefish
%{_mandir}/man1/*

%changelog
* Sun Aug 21 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.3-1
- new upstream release
- built without gucharmap (VineSeed)
- added BR: libxml2-devel

* Tue Oct 12 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.2-1
- new upstream release

* Sun Jul 25 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.1-1
- new upstream release

* Fri Mar 19 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0.0-1
- new upstream release
- updated BR

* Thu Jul 30 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.0.7-2
- added Japanese description

* Fri Sep 19 2008 Shu KONNO <owa@bg.wakwak.com> 1.0.7-1vl5
- applied new versioning policy, spec in utf-8

* Tue Nov  7 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.7-0vl2
- rebuilt for Vine Linux 4.0

* Tue Nov  7 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.7-0vl1
- new upstream release

* Sat Feb 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.5-0vl3
- rebuild for VineSeed Plus

* Sat Feb 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.5-0vl2
- rebuit for VinePlus/3.0
- dropped Patch0 (fixed at upstream version)

* Wed Feb 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.5-0vl1
- new upstream release

* Tue Sep  6 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.4-0vl1.1
- added Patch0 for disable PCRE_UTF8 in highlighting

* Sat Sep  3 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.4-0vl1
- new upstream release

* Thu Aug 25 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.3-0vl2
- rebuild for VineSeed Plus

* Thu Aug 25 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.3-0vl1
- new upstream release

* Tue Aug 16 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.2-0vl2
- rebuild for VineSeed Plus

* Tue Aug 16 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.2-0vl1
- new upstream release

* Mon Jun 13 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.1-0vl3
- rebuild for VineSeed Plus

* Mon Jun 13 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.1-0vl2
- rebuild for VinePlus/3.1 
- added BuildRequires: shared-mime-info

* Sun Jun  5 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.1-0vl1
- new upstream release

* Thu May 26 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0-0vl2
- rebuild for VineSeed Plus
- added --disable-update-databases option
- run update-mime-database on %post
- added Prereq: shared-mime-info

* Sun Feb  6 2005 Masaki Shinomiya <shino@pos.to> 1.0-0vl1
- new upstream release, make install, files. desktop, compile ja.po

* Sun Apr 18 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.13-0vl1
- new upstream release
- dropped patch0

* Mon Jul 28 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.11-0vl1
- new upstream release

* Fri Jul 18 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10-0vl1
- Rebuild with new toolchains and Gnome2 for VineSeedPlus
- add makefile.patch to fix Makefile.in
- modified encodings.default

* Fri Aug 2 2002 Masaki Shinomiya <shino@pos.to>
- 0.7-0vl1 for VinePllus2.1, 0.7-0vl2 for VinePlus2.5/VineSeedPlus
- vine.patch, without perl

* Fri Mar  1 2002 Shingo Akagaki <dora@kondara.org>
- (0.7-8k)
- fix file attributes

* Thu Feb 21 2002 Shingo Akagaki <dora@kondara.org>
- (0.7-6k)
- rebuild against for db3,4

* Thu Feb 07 2002 Motonobu Ichimura <famao@kondara.org>
- (0.7-4k)
- add perl,attrpage,internal-preview support

* Thu Feb 07 2002 Motonobu Ichimura <famao@kondara.org>
- (0.7-2k)
- add xim patch
- up to 0.7

* Thu Oct 18 2001 Motonobu Ichimura <famao@kondara.org>
- (0.6-4k)
- not egcs, but gcc2.95.3

* Thu Oct 18 2001 Motonobu Ichimura <famao@kondara.org>
- (0.6-2k)
- up to 0.6
- add BuildRequires: egcs ...
- include .desktop file

* Wed Oct 17 2001 Toru Hoshina <t@kondara.org>
- (0.4-10k)
- rebuild against gettext 0.10.40.

* Mon Oct 15 2001 Toru Hoshina <t@kondara.org>
- (0.4-8k)
- rebuild against libpng 1.2.0.

* Sat Dec  2 2000 MATSUDA, Daiki <dyky@df-usa.com>
- (0.4-4k)
- modified spec file with macros

* Thu Jul 13 2000 AYUHANA Tomonori <l@kondara.org>
- (0.4-2k)
- SPEC fixed ( BuildRoot )
- missing bluefish.desktop!

* Tue Jun 13 2000 haruka kusumi <haruka76@kondara.org>
  - changed some items for kondara 

* Fri May 5 2000   Bo Forslund  <bo.forslund@abc.se>
  - fine tuning of the spec file
  - possible to build with all processors on smp machines
  - an entry for RedHats wmconfig

* Tue Mar 21 2000 CW Zuckschwerdt <zany@triq.net>
  - complete rewrite of spec file
  - relocateable on build-time
  - no privileges required while building
  - fix for install_location (should really be $(LIBDIR)/bluefish!)
  - included man, locale and lib into RPM (was seriously broken)

* Thu Jan 13 2000 Chris Lea <chrislea@luciddesigns.com>
  - Fixed up spec file some. bluefish-0.3.5

* Wed Nov 17 1999 Chris Lea <chrislea@luciddesigns.com>
  - added spec file. this is my third RPM that I've made a spec
    file for, so please be merciful if I've screwed something up
