Blob Blame History Raw
Summary:	A GNOME development IDE for C/C++
Name:		anjuta
Epoch:		1
Version:	2.24.2
Release:	3%{?dist}
License:	GPLv2+
Group:		Development/Tools
URL:		http://www.anjuta.org/
Source0:	http://ftp.gnome.org/pub/GNOME/sources/anjuta/2.24/%{name}-%{version}.tar.gz

# http://bugzilla.gnome.org/559951
Patch0:		%{name}-%{version}-class-gen-add-class.patch
# http://bugzilla.gnome.org/575147
Patch1:		%{name}-%{version}-class-gen-templates.patch
# http://bugzilla.gnome.org/560284
Patch2:		%{name}-%{version}-delete-folder-crash.patch
# http://bugzilla.gnome.org/563530
Patch3:		%{name}-%{version}-hide-python-binaries.patch
# http://bugzilla.gnome.org/574376
Patch4:		%{name}-%{version}-save-and-exit.patch
# http://bugzilla.gnome.org/560311
Patch5:		%{name}-%{version}-webkit.patch

BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

Requires:	GConf2
Requires:	autogen
Requires:	git
Requires:	glade3-libgladeui
Requires:	gnome-icon-theme
Requires:	hicolor-icon-theme
Requires:	libglade2 >= 2.6.3-2
Requires(pre):	GConf2
Requires(post):	GConf2
Requires(post):	/sbin/ldconfig
Requires(preun):  GConf2
Requires(postun): /sbin/ldconfig

BuildRequires:	autogen
BuildRequires:	binutils-devel
BuildRequires:	desktop-file-utils
BuildRequires:	devhelp-devel >= 0.22
BuildRequires:	e2fsprogs-devel
BuildRequires:	gettext
BuildRequires:	glade3-libgladeui-devel
BuildRequires:	gnome-doc-utils
BuildRequires:	gtksourceview2-devel >= 2.3.1
BuildRequires:	gnome-build-devel
BuildRequires:	graphviz-devel
BuildRequires:	intltool
BuildRequires:	libgdl-devel >= 2.23.0
BuildRequires:	libgnomeprintui22-devel
BuildRequires:	libXres-devel
BuildRequires:	neon-devel
BuildRequires:	pcre-devel
BuildRequires:	perl(XML::Parser)
BuildRequires:	scrollkeeper
BuildRequires:	subversion-devel
BuildRequires:	vte-devel

%description
Anjuta DevStudio is a versatile Integrated Development Environment (IDE) on
GNOME Desktop Environment and features a number of advanced programming
facilities. These include project management, application and class wizards,
an on-board interactive debugger, powerful source editor, syntax highlighting,
intellisense autocompletions, symbol navigation, version controls, integrated
GUI designing and other tools.

The documentation for this package is in %{name}-doc.

%package devel
Summary:	Development files for %{name}
Group:		Development/Libraries

Requires:	gtk-doc
Requires:	%{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires:	libgnomeui-devel
Requires:	libglade2-devel >= 2.6.3-2
Requires:	pkgconfig

%description devel
This package contains development files for %{name}.

%package doc
Summary:	Documentation for Anjuta DevStudio
Group:		Documentation

# Will be dropped in Fedora 10.
Provides:	%{name}-docs = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes:	%{name}-docs < 1:2.2.3

Requires:	%{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires(post):	scrollkeeper
Requires(postun): scrollkeeper

%description doc
Documentation for Anjuta DevStudio provided in DocBook format.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

# Suppress rpmlint error.
chmod 644 `find . -name "*.cxx" -perm /111 -print`
chmod 644 `find . -name "*.h" -perm /111 -print`
iconv --from-code ISO8859-1 --to-code UTF-8 ./THANKS \
  --output THANKS.utf-8 && mv THANKS.utf-8 ./THANKS

# Remove rpaths.
sed -i.libdir_syssearch --expression \
  '/sys_lib_dlsearch_path_spec/s|/usr/lib |/usr/lib /usr/lib64 /lib /lib64 |' \
  configure
sed -i.gecko --expression 's|-R\$GECKO_HOME||' configure

# pangox.pc contains rpath linkage on PPC64.
mkdir -p ./PKGCONFIG
sed --expression 's|-R/usr/lib64||' %{_libdir}/pkgconfig/pangox.pc > \
  ./PKGCONFIG/pangox.pc

%build
export PKG_CONFIG_PATH="./PKGCONFIG"
%configure --disable-schemas-install --disable-static --enable-gtk-doc \
  --enable-devhelp --enable-graphviz --enable-plugin-glade \
  --enable-plugin-scintilla --enable-plugin-sourceview \
  --enable-plugin-subversion --enable-plugin-valgrind \
  --with-svn-lib=%{_libdir}

# Omit unused direct shared library dependencies.
sed --in-place --expression 's! -shared ! -Wl,--as-needed\0!g' libtool

make %{?_smp_mflags}

# Strip unneeded translations from .mo files:
# http://bugzilla.gnome.org/474987
pushd ./po
  grep --invert-match \
    ".*[.]desktop[.]in[.]in$\|.*[.]server[.]in[.]in$\|.*[.]schemas[.]in$" \
    POTFILES.in > POTFILES.keep
  mv POTFILES.keep POTFILES.in
  intltool-update --pot
  for p in *.po; do
    msgmerge $p %{name}.pot > $p.out
    msgfmt -o `basename $p .po`.gmo $p.out
  done
popd

%install
rm -rf $RPM_BUILD_ROOT
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
mkdir -p $RPM_BUILD_ROOT%{_libdir}/libglade/2.0

# Installs zero-length files necessary for proper behaviour.
make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name "*.la" -delete

# Use %doc instead.
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}

# Some plugins (eg., Git and Subversion) need this.
pushd $RPM_BUILD_ROOT%{_libdir}/libglade/2.0
  ln -s ../../libanjuta.so.0 libanjuta.so
popd

%find_lang %{name}

desktop-file-install --remove-key Encoding --vendor fedora --delete-original \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%pre
if [ "$1" -gt 1 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  gconftool-2 --makefile-uninstall-rule \
  %{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null || :
  gconftool-2 --makefile-uninstall-rule \
  %{_sysconfdir}/gconf/schemas/%{name}-*.schemas >/dev/null || :
fi

%post
/sbin/ldconfig

export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule \
  %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
gconftool-2 --makefile-install-rule \
  %{_sysconfdir}/gconf/schemas/%{name}-*.schemas > /dev/null || :

if [ -x %{_bindir}/update-desktop-database ]; then
  update-desktop-database &> /dev/null || :
fi

if [ -x %{_bindir}/update-mime-database ];then
  update-mime-database %{_datadir}/mime &> /dev/null || :
fi

touch --no-create %{_datadir}/icons/gnome
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/gnome || :
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%preun
if [ "$1" -eq 0 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  gconftool-2 --makefile-uninstall-rule \
  %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
  gconftool-2 --makefile-uninstall-rule \
  %{_sysconfdir}/gconf/schemas/%{name}-*.schemas > /dev/null || :
fi

%postun
/sbin/ldconfig

if [ -x %{_bindir}/update-desktop-database ]; then
  update-desktop-database &> /dev/null || :
fi

if [ -x %{_bindir}/update-mime-database ];then
  update-mime-database %{_datadir}/mime &> /dev/null || :
fi

touch --no-create %{_datadir}/icons/gnome
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/gnome || :
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%post doc
scrollkeeper-update -q -o %{_datadir}/omf/%{name}-manual || :

%postun doc
scrollkeeper-update -q || :

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS
%doc ChangeLog
%doc COPYING
%doc MAINTAINERS
%doc NEWS
%doc README
%doc ROADMAP
%doc THANKS
%doc %{_mandir}/man1/%{name}.1*
%doc %{_mandir}/man1/%{name}_launcher.1*
%{_bindir}/%{name}
%{_bindir}/%{name}_import.sh
%{_bindir}/%{name}_launcher
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/glade3/catalogs/anjuta-glade.xml
%{_datadir}/icons/gnome/48x48/mimetypes/gnome-mime-application-x-%{name}.png
%{_datadir}/icons/gnome/scalable/mimetypes/gnome-mime-application-x-%{name}.svg
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/mime/packages/%{name}.xml
# No soname.
%{_libdir}/glade3/modules/libgladeanjuta.so
%{_libdir}/libanjuta-ctags.so.*
%{_libdir}/libanjuta.so.*
# Symlink to libanjuta.so.*.
%{_libdir}/libglade/2.0/libanjuta.so
%{_sysconfdir}/gconf/schemas/%{name}.schemas
%{_sysconfdir}/gconf/schemas/%{name}-*.schemas

%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*

%dir %{_datadir}/pixmaps/%{name}
%{_datadir}/pixmaps/%{name}/*

%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*

%files devel
%defattr (-,root,root,-)
%doc doc/ScintillaDoc.html
%{_libdir}/libanjuta-ctags.so
%{_libdir}/libanjuta.so
%{_libdir}/pkgconfig/libanjuta-1.0.pc

%dir %{_datadir}/gtk-doc/html/libanjuta
%doc %{_datadir}/gtk-doc/html/libanjuta/*

%dir %{_includedir}/libanjuta-1.0
%{_includedir}/libanjuta-1.0/libanjuta

%files doc
%defattr(-,root,root,-)

%dir %{_datadir}/gnome/help/%{name}-faqs
%{_datadir}/gnome/help/%{name}-faqs/C

%dir %{_datadir}/gnome/help/%{name}-manual
%{_datadir}/gnome/help/%{name}-manual/*

%dir %{_datadir}/omf/%{name}-manual
%{_datadir}/omf/%{name}-manual/%{name}-manual-*.omf

%changelog
* Tue Mar 17 2009 Debarshi Ray <rishi@fedoraproject.org> - 1:2.24.2-3
- Added 'BuildRequires: libXres-devel' to work around missing Requires in
  libwnck-devel on Fedora 10.

* Sun Mar 15 2009 Debarshi Ray <rishi@fedoraproject.org> - 1:2.24.2-2
- Stripped redundant translations from .mo files. (GNOME Bugzilla #474987)
- Backported fix to enable addition of new classes to a project using the
  class generator plugin. (GNOME Bugzilla #559951)
- Backported fix to prevent a crash when a folder within a project is deleted
  from a different application. (GNOME Bugzilla #560284)
- Backported fix to hide .pyc and .pyo files. (GNOME Bugzilla #563530)
- Backported fix to actually save files, modified by the GtkSourceview editor
  plugin, on exit. (GNOME Bugzilla #574376)
- Added patch against class generator plugin to fix wrong copyright and license
  notices. (GNOME Bugzilla #575147)

* Sun Jan 04 2009 Debarshi Ray <rishi@fedoraproject.org> - 1:2.24.2-1
- Version bump to 2.24.2. (Red Hat Bugzilla #478684)
  * Debug manager plugin:
    + Missing debugger menu. (GNOME Bugzilla #559800)
  * Translation updates: pt_BR and si.
  * http://ftp.gnome.org/pub/GNOME/sources/anjuta/2.24/anjuta-2.24.2.news

* Sat Jan 03 2009 Debarshi Ray <rishi@fedoraproject.org> - 1:2.24.1-3
- Added patch against the Devhelp plugin from GNOME to make it work with the
  new WebKit-based Devhelp >= 0.22. (GNOME Bugzilla #560311, and Red Hat
  Bugzilla #478578)

* Sun Nov 09 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.24.1-2
- Added 'Requires: libglade2 >= 2.6.3-2' and a symlink to libanjuta.so.0 for
  some plugins to work. (Red Hat Bugzilla #467894)

* Tue Oct 28 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.24.1-1
- Version bump to 2.24.1.
  * Build (basic Autotools) plugin:
    + Could not find the .glade file while executing a binary. (GNOME Bugzilla
      #554337)
  * Document manager plugin:
    + Do not disable save when closing file tabs. (GNOME Bugzilla #556053)
  * Translation updates: ar, de, ru, bg, fi, pl, he and da.
  * http://ftp.gnome.org/pub/GNOME/sources/anjuta/2.24/anjuta-2.24.1.news
  * http://ftp.gnome.org/pub/GNOME/sources/anjuta/2.5/anjuta-2.5.90.news
- Makefile problems fixed by upstream.
- Added 'Requires: git' and 'BuildRequires: e2fsprogs-devel intltool'.
- libanjuta-egg.so has been dropped.

* Sat Sep 20 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.4.2-1
- Version bump to 2.4.2.
  * http://ftp.gnome.org/pub/GNOME/sources/anjuta/2.4/anjuta-2.4.2.news
- Enabled Valgrind plugin and added 'BuildRequires: binutils-devel'.

* Sat May 24 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.4.1-1
- Version bump to 2.4.1. (Red Hat Bugzilla #446242)
  * http://ftp.gnome.org/pub/GNOME/sources/anjuta/2.4/anjuta-2.4.1.news
  * http://ftp.gnome.org/pub/GNOME/sources/anjuta/2.3/anjuta-2.3.5.news
  * http://ftp.gnome.org/pub/GNOME/sources/anjuta/2.3/anjuta-2.3.4.news
  * http://ftp.gnome.org/pub/GNOME/sources/anjuta/2.3/anjuta-2.3.3.news
  * http://ftp.gnome.org/pub/GNOME/sources/anjuta/2.3/anjuta-2.3.2.news
  * http://ftp.gnome.org/pub/GNOME/sources/anjuta/2.3/anjuta-2.3.1.news
- Spurious file modification messages from Scintilla fixed by upstream. (Red
  Hat Bugzilla #447090)

* Tue May 13 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.2.3-8
- Added missing header to fix build failure on ia64. (Red Hat Bugzilla #446020)

* Fri Apr 11 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.2.3-7
- Restored empty files. (Red Hat Bugzilla #440087)

* Sun Apr 06 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.2.3-6
- Added 'Requires: autogen'. (Red Hat Bugzilla #441036)

* Thu Mar 27 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.2.3-5
- Fixed Source0 URL according to Fedora packaging guidelines.
- Removed 'BuildRequires: chrpath' and use better ways of removing rpaths.
- Added Scintilla documentation to anjuta-devel.

* Fri Feb 29 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.2.3-4
- Restored 'BuildRequires: chrpath' for removing rpaths.
- Added 'Requires: gtk-doc' for anjuta-devel.

* Fri Feb 29 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.2.3-3
- Fixed create_global_tags.sh.in. (Red Hat Bugzilla #228351)
- Enabled Devhelp plugin on Fedora 7.
- Removed 'BuildRequires: chrpath' and use better ways of removing rpaths.
- Removed 'ExcludeArch: ppc64'.
- Fixed post scriplet for the doc subpackage.

* Mon Feb 18 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.2.3-2
- Added 'BuildRequires: libgnomeui-devel' to prevent failure on Fedora 7.
- Disabled Devhelp plugin to prevent failure on Fedora 7.

* Sun Jan 27 2008 Debarshi Ray <rishi@fedoraproject.org> - 1:2.2.3-1
- Initial build. Imported SPEC from Rawhide and renamed as anjuta-doc from
  anjuta-docs according to Fedora naming guidelines.