Blob Blame History Raw
%if 0%{?fc7}
%else
  %define _remove_encoding --remove-key Encoding
%endif

Summary:	A GNOME development IDE for C/C++
Name:		anjuta
Epoch:		1
Version:	2.2.3
Release:	5%{?dist}
License:	GPLv2+
Group:		Development/Tools
URL:		http://www.anjuta.org/
Source0:	http://downloads.sourceforge.net/anjuta/%{name}-%{version}.tar.bz2

Patch0:		%{name}-%{version}-makefile.patch
Patch1:		%{name}-%{version}-%{name}-tags.patch

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

Requires:	gnome-icon-theme
Requires:	hicolor-icon-theme
Requires(post):	/sbin/ldconfig
Requires(postun): /sbin/ldconfig

%if 0%{?fc7}
BuildRequires:	libgnomeui-devel
%endif

BuildRequires:	autogen
BuildRequires:	desktop-file-utils
BuildRequires:	devhelp-devel
BuildRequires:	gettext
BuildRequires:	glade3-libgladeui-devel
BuildRequires:	gnome-doc-utils
BuildRequires:	gtksourceview-devel
BuildRequires:	gnome-build-devel
BuildRequires:	graphviz-devel
BuildRequires:	libgdl-devel
BuildRequires:	libgnomeprintui22-devel
BuildRequires:	libwnck-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
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

# 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-static --enable-gtk-doc --enable-devhelp \
  --enable-plugin-glade --enable-graphviz --enable-plugin-sourceview \
  --disable-plugin-valgrind --enable-plugin-subversion \
  --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}

%install
rm -rf $RPM_BUILD_ROOT

make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name "*.la" -delete

%if 0%{?fc7}
 rm -rf $RPM_BUILD_ROOT%{_var}/lib/scrollkeeper
%endif

# Move architecture dependent file from /usr/share/anjuta/scripts to /usr/bin.
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts/%{name}-tags \
  $RPM_BUILD_ROOT%{_bindir}

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

%find_lang %{name}

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

# Remove zero-length files.
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/project/terminal/po/ChangeLog
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/project/terminal/NEWS
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/project/mkfile/po/ChangeLog
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/project/terminal/README
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/project/terminal/ChangeLog
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/project/terminal/AUTHORS

%clean
rm -rf $RPM_BUILD_ROOT

%post
/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

%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
%{_bindir}/%{name}
%{_bindir}/%{name}_import.sh
%{_bindir}/%{name}_launcher
%{_bindir}/%{name}-shell
%{_bindir}/%{name}-tags
%{_datadir}/applications/fedora-%{name}.desktop
%{_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
%{_libdir}/libanjuta-ctags.so.*
%{_libdir}/libanjuta-egg.so.*
%{_libdir}/libanjuta.so.*
%{_mandir}/man1/%{name}.1.gz
%{_mandir}/man1/%{name}_launcher.1.gz

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

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

%dir %{_libdir}/%{name}
# Contains *.so files that are not symlinked to *.so.* files.
%{_libdir}/%{name}/*.plugin
%{_libdir}/%{name}/libanjuta-*.so

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

%dir %{_datadir}/gtk-doc/html/libanjuta
%{_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/C

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

%changelog
* 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
- Fixes Red Hat Bugzilla bug #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.