%define	pkg_version	3.6.2

%define	glib_required		2.32.0
%define	gtk_required		3.4.0
%define	orbit_required		2.14.19
%define	glade3_required     	3.12.0
%define	vte_required		0.32.0
%define	libxml_required		2.7.8
%define	libdevhelp_required	3.4.0
%define	gdl_required		3.1.5
#%define	libgraphviz_required	1.0
%define	neon_required		0.28.2
%define	svn_major		1
%define	svn_minor		5
%define	svn_patch		0
%define	subversion_required	%{svn_major}.%{svn_minor}.%{svn_patch}
%define	gtksourceview_required	2.10.0
#%define	binutils_required	2.15.92
%define	libwnck_required	2.30
%define	gda_required		4.2.0
%define	unique_required		3.0.0
%define	vala_required		0.14.0

%define	desktop_vendor	anjuta

Version:	%{pkg_version}
Release:	1%{?_dist_release}

Summary:	GNOME IDE for C and C++
Name:		anjuta
License:	GPL2
Group:		Applications/Development
URL:		http://www.anjuta.org/
Source:		%{name}-%{version}.tar.xz
#Patch:		%{name}-utils.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	yasumichi,inagaki,Takemikaduchi

Requires:	autogen
Requires:	gdb
Requires:	glib2		>= %{glib_required}
#Requires:	gdk-pixbuf >= %{gdk_pixbuf_required}
Requires:	gtk3		>= %{gtk_required}
Requires:	ORBit2		>= %{orbit_required}
#Requires:	libglade2	>= %{libglade2_required}
Requires:	GConf2		>= %{gconf_required}
Requires:	vte3		>= %{vte_required}
Requires:	libxml2		>= %{libxml_required}
Requires:	devhelp		>= %{libdevhelp_required}
Requires:	gdl		>= %{gdl_required}
#Requires:	graphviz	>= %{libgraphviz_required}
Requires:	neon		>= %{neon_required}
Requires:	subversion	>= %{subversion_required}
Requires:	libwnck		>= %{libwnck_required}
Requires:	libgda		>= %{gda_required}
Requires:	gda-sqlite	>= %{gda_required}
Requires:	unique3		>= %{unique_required}
#Requires:	pango >= 1.1.1
#Requires:	pcre >= 3.9
#Requires:	gnome-build >= 0.2.0
Requires:	e2fsprogs
Requires:	libSM
#Requires:	valgrind
Requires:	libuuid
Requires:	gtksourceview3

Requires:	%{name}-libs = %{version}-%{release}

BuildRequires:	autogen
BuildRequires:	pkgconfig
BuildRequires:	autoconf >= 2.13
BuildRequires:	gettext >= 0.10
BuildRequires:	flex
BuildRequires:	bison
BuildRequires:  glib2-devel	>= %{glib_required}
BuildRequires:  gtk3-devel	>= %{gtk_required}
BuildRequires:  ORBit2-devel	>= %{orbit_required}
#BuildRequires:  libglade2-devel	>= %{libglade2_required}
BuildRequires:  glade3-devel	>= %{glade3_required}
BuildRequires:	GConf2-devel	>= %{gconf_required}
BuildRequires:  vte3-devel	>= %{vte_required}
BuildRequires:  libxml2-devel	>= %{libxml_required}
BuildRequires:  devhelp-devel	>= %{libdevhelp_required}
BuildRequires:  gdl-devel	>= %{gdl_required}
#BuildRequires:  graphviz-devel	>= %{libgraphviz_required}
BuildRequires:  neon-devel	>= %{neon_required}
BuildRequires:  subversion-devel	>= %{subversion_required}
BuildRequires:	libwnck-devel	>= %{libwnck_required}
BuildRequires:	libgda-devel	>= %{gda_required}
BuildRequires:	unique3-devel	>= %{unique_required}
#BuildRequires:  pango-devel	>= 1.1.1
#BuildRequires:  pcre-devel	>= 3.9
#BuildRequires:  gnome-build-devel	>= 0.2.0
BuildRequires:	e2fsprogs-devel
BuildRequires:	perl-gettext
BuildRequires:	intltool
BuildRequires:	libSM-devel
#BuildRequires:	binutils-devel
BuildRequires:	libuuid-devel
BuildRequires:	gtksourceview3-devel
BuildRequires:	yelp-tools
BuildRequires:	vala-devel >= %{vala_required}
BuildRequires:	vala-tools
BuildRequires:	sqlite3-devel
BuildRequires:	python-devel
BuildRequires:	pygobject3-devel
BuildRequires:	graphviz-devel

Provides: perl(GBF::Make)

Obsoletes: anjuta-i18n
Obsoletes: anjuta-docs-en anjuta-docs-ja
Obsoletes: anjuta-docs
Obsoletes: gnome-build

%description
Anjuta is a versatile Integrated Development Environment (IDE) for C and C++. 
It has been written for GTK/GNOME, and features a number of advanced 
programming facilities. It is basically a GUI interface for the collection 
of command line programming utilities and tools available for the GNU system. 
These are usually run via a text console, and can be unfriendly to use.

%description -l ja
Anjutaは、多才なC言語及びC++の統合開発環境です。GTK/GNOME用に記述され、
進化したプログラミング環境としての特徴を備えています。
基本的には、GNUシステムのためのコマンドラインプログラミングの
ユーティリティやツール群のGUIインターフェースです。今までのツール群は、
テキストコンソール経由で動作し、ユーザにはやさしくないのが常でしたが、
Anjuta がそれを解決してくれます。

#%%package docs
#Summary: Anjuta docuemntation
#Summary(ja): Anjuta のドキュメント
#Group: Applications/Documentation
#Prereq: scrollkeeper

#%%description docs
#Anjuta documentation

%package libs
Summary: Libraries for use in anjuta extentions
Summary(ja): anjuta 拡張機能で利用するライブラリ
Group: User Interface/Desktops

%description libs
This package provides libraries required by anjuta extention
module.

%description -l ja libs
このパッケージは、anjuta 拡張機能が必要とするライブラリを提供します。


%package devel
Summary: Libraries and include files for Anjuta plugins development.
Summary(ja): Anjuta の開発環境
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires: GConf2-devel
Requires: gtk2-devel
Requires: pkgconfig

%description devel
Libraries, header files and API docs for developing Anjuta plugins.

%prep
%setup -q
#%patch -p1

%build
%configure --disable-scrollkeeper
##make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC" 
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC"

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
make install DESTDIR=$RPM_BUILD_ROOT
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

%find_lang %{name} --all-name --with-gnome

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'

# conflicts file from gnome-panel
rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache

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

%post
if which update-mime-database>/dev/null 2>&1; then \
    update-mime-database %{_datadir}/mime; \
fi
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi

#%%post docs
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi

%postun
if which update-mime-database>/dev/null 2>&1; then \
    update-mime-database %{_datadir}/mime; \
fi
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:

#%%postun docs
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:


%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO
%doc doc/ScintillaDoc.html
%{_bindir}/%{name}
%{_bindir}/%{name}-launcher
%{_bindir}/%{name}-tags
%{_libdir}/%{name}/*
%{_libdir}/glade/modules/libgladeanjuta.so
%{_datadir}/%{name}
%{_datadir}/applications/*%{name}.desktop
%{_datadir}/icons/*
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/pixmaps/%{name}/*
%{_mandir}/man1/*
%{_datadir}/doc/%{name}

#%%files docs
#%%defattr(-, root, root)
#%{_datadir}/gnome/help/%{name}-faqs
#%{_datadir}/gnome/help/%{name}-manual
#%{_datadir}/gnome/help/%{name}-build-tutorial

%files libs
%defattr(-, root, root)
%{_libdir}/girepository-1.0/*.typelib
%{_libdir}/libanjuta-3.so.*

%files devel
%defattr(-, root, root)
%{_libdir}/libanjuta-3.so
%{_libdir}/pkgconfig/libanjuta-3.0.pc
%{_includedir}/libanjuta-3.0
%{_datadir}/gtk-doc/html/lib%{name}
%{_datadir}/glade/catalogs/anjuta-glade.xml
%{_datadir}/gir-1.0/*.gir


%changelog
* Wed Nov 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-1
- new upstream release

* Fri Oct 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Sun Sep 30 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release
- change BuildRequires: yelp-tools instead of gnome-doc-utils

* Sat Aug 18 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-1
- new upstream release

* Tue Jun 05 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.3-1
- new upstream release

* Sun May 06 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release

* Wed Apr 18 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.0-1
- new upstream release

* Sat Oct 22 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- new upstream release

* Fri Sep 30 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.92-1
- new upstream release

* Sun Aug 28 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.5-1
- new upstream release

* Thu Aug 18 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.4-1
- new upstream release
- change BuildRequires: gtk3-devel instead of gtk2-devel
- change BuildRequires: vte3-devel instead of vte-devel
- change BuildRequires: unique3-devel instead of unique-devel
- change BuildRequires: gtksourceview3-devel instead of gtksourceview2-devel
- add BuildRequires: flex, bison, graphviz-devel
- create -libs sub package

* Thu Dec 30 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.1.1-1
- new upstream release

* Sat Nov 20 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.1.0-1
- new upstream release

* Sat Oct 09 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.0.0-1
- new upstream release
- remove BuildRequires: libgnome-devel, libgnomeui-devel
- remove Requires: libgnome, libgnomeui
- add BuildRequires: vala-devel, vala-tools, sqlite3-devel,
                     python-devel, pygobject-devel
- remove unrecognized configure option (--disable-plugin-valgrind)
- remove make option (%{?_smp_mflags}) 
- fix %files

* Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.2.1-2
- rebuild with rpm-4.8.1 for pkg-config file

* Sat Jun 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.2.1-1
- new upstream release

* Mon Jun 21 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.2.0-1
- new upstream release

* Sat May 01 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.1.0-1
- new upstream release

* Sun Apr 18 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.0.0-1
- new upstream release
- add Requires: GConf2-devel, gtk2-devel (devel package)

* Fri Feb 26 2010 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.28.2.0-1
- new upstream version
- add gnome-doc-utils to BuildRequires

* Thu Nov 12 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.28.1.0-2
- rebuilt with devhelp-2.28.1

* Tue Nov 03 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.28.1.0-1
- new upstream version
- remove libglade2, graphviz, binutils from reqires.
- add file-manager and preferencs to schemas file 
- add gtksourceview2(-devel) to (Build)Requires.

* Sat Aug 01 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org>
- care icon cache (no build)

* Fri Jul 31 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.26.2.2-6
- enable devhelp plugin again.

* Fri Jul 31 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.26.2.2-5
- add gda-sqlite to Requires.

* Thu Jul 30 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.26.2.2-4
- update patch (anjuta-utils.patch)

* Tue Jul 28 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.26.2.2-3
- add patch anjuta-mkdir.patch [VineLinux:0737]

* Sun Jul 26 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.26.2.2-2
- add autogen to Requires [VineLinux:0738]
- docs sub-package integrated into the main package.

* Sun Jul 12 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.26.2.2-1
- new upstream version

* Sat Jul 11 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.26.1.0-3
- added Requires libSM
- added BR: libSM-devel perl-gettext intltool
- added anjuta-build-tutorial to docs
- move any so file from devel to main
- added Provides perl(GBF::Make)
- added Obsoletes gnome-build

* Fri May 01 2009 Shu KONNO <owa@bg.wakwak.com> 2.6.1.0-2vl5
- added BR: glade3-devel

* Tue Apr 28 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.6.1.0-1vl5
- update anjuta to 2.6.1.0
- update *Requires

* Sun Aug 24 2008 Shu KONNO <owa@bg.wakwak.com> 2.4.2-1vl5
- update anjuta to 2.4.2
- added --disable-plugin-valgrind

* Wed May 14 2008 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.4.1-3vl5
- removed --disable-plugin-glade

* Tue May 13 2008 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.4.1-2vl5
- use macro for Release

* Sat May 10 2008 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.4.1-1vl5
- update anjuta to 2.4.1
- remove *.la

* Tue Apr 08 2008 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.4.0-1vl5
- update anjuta to 2.4.0
- comment out BuildRequires: binutils-devel
- comment out BuildRequires: automake14

* Mon Jan 14 2008 Shu KONNO <owa@bg.wakwak.com> 2.2.3-0vl3
- moved %%{_libdir}/libanjuta*.so.* to anjuta main package from devel

* Sun Jan 13 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.3-0vl2
- rebuilt with libwnck-2.20.2

* Sat Jan 05 2008 Shu KONNO <owa@bg.wakwak.com> 2.2.3-0vl1
- new upstream release
- updated Requires, BuildRequires by anjuta-2.2.3/anjuta.spec
- added BuildRequires: binutils-devel
- added --disable-scrollkeeper to %%configure
- added -fPIC to make
- added package anjuta-docs (dropt docs-en, doc-ja)
- added package anjuta-devel

* Mon Jul 30 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.4a-0vl3
- rebuilt with new toolchain

* Sun Apr 29 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.4a-0vl2
- rebuild with gnome-2.18

* Sat Jul 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.4a-0vl1
- updated anjuta to 1.2.4a
- changed Group to Applications/Development
- changed docs Group to Applications/Documentation

* Sat Dec 31 2005 Yasumichi Akahoshi <yasumichi@vinelinux.org> 1.2.4-1vl1
- updated anjuta to 1.2.4
- add patch from http://bugzilla.gnome.org/show_bug.cgi?id=323918

* Fri Jan 21 2005 Shu KONNO <owa@bg.wakwak.com> 1.2.2-1vl5
- changed "BuildRequires: automake" with "automake14" in data definitions
- changed "Requires: gettext" with "BuildRequires" in data definitions

* Sat Jan 15 2005 Shu KONNO <owa@bg.wakwak.com> 1.2.2-1vl3
- added requires to spec

* Wed Dec 01 2004 Shu KONNO <owa@bg.wakwak.com> 1.2.2-1vl1
- updated anjuta to 1.2.2

* Sun Feb  1 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.1-1vl1
- new upstream release
- merged i18n package into main package
- changed package Group:

* Mon Nov  8 2002 Yasumichi Akahoshi <w2linux@lapis.plala.or.jp>
- Replace ja.po

* Mon Nov  7 2002 Yasumichi Akahoshi <w2linux@lapis.plala.or.jp>
- change spec file

* Mon Nov  6 2002 Yasumichi Akahoshi <w2linux@lapis.plala.or.jp>
- packaged for Vine Linux
