Hi,
Gnome Devhlp provides Solaris users with a development tool for browsing
and searching API documentation for GTK+ and GNOME.
Attach new spec files for it. Please review.
Thanks,
-Simon
-------------- next part --------------
#
# spec file for package SUNWdevhelp.spec
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# includes module(s): devhelp
#
%include Solaris.inc
%use devhelp = devhelp.spec
Name: SUNWgnome-devhelp
Summary: API documentation browser for GNOME 2
Version: %{default_pkg_version}
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
Requires: SUNWgnome-base-libs
Requires: SUNWfirefox
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWfirefox-devel
%package root
Summary: %{summary} - / filesystem
SUNW_BaseDir: /
%include default-depend.inc
Requires: SUNWpostrun
Requires: SUNWgnome-config
%package devel
Summary: %{summary} - developer files
SUNW_BaseDir: %{_basedir}
%include default-depend.inc
Requires: %name
Requires: SUNWgnome-base-libs-devel
%if %build_l10n
%package l10n
Summary: %{summary} - l10n files
SUNW_BaseDir: %{_basedir}
%include default-depend.inc
Requires: %{name}
%endif
%prep
rm -rf %name-%version
mkdir %name-%version
%devhelp.prep -d %name-%version
cd %{_builddir}/%name-%version
%build
export CFLAGS="-i -xO4 -xspace -mr -I/usr/include/firefox -I/usr/include/mps"
export CPPFLAGS="-i -xO3 -xspace -mr -I/usr/include/firefox -I/usr/include/mps"
export CXXFLAGS="-i -xO3 -xspace -mr -I/usr/include/firefox -I/usr/include/mps"
export LDFLAGS="%_ldflags"
%devhelp.build -d %name-%version
%install
rm -rf $RPM_BUILD_ROOT
%devhelp.install -d %name-%version
%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post root
( echo 'test -x /usr/bin/gconftool-2 || {';
echo ' echo "ERROR: gconftool-2 not found"';
echo ' exit 0';
echo '}';
echo 'umask 0022';
echo "GCONF_CONFIG_SOURCE=xml:merged:%{_sysconfdir}/gconf/gconf.xml.defaults";
echo 'export GCONF_CONFIG_SOURCE';
echo "SDIR=%{_sysconfdir}/gconf/schemas";
echo '/usr/bin/gconftool-2 --makefile-install-rule $SDIR/devhelp.schemas'
) | $PKG_INSTALL_ROOT/usr/lib/postrun
%preun root
( echo 'test -x /usr/bin/gconftool-2 || {';
echo ' echo "ERROR: gconftool-2 not found"';
echo ' exit 0';
echo '}';
echo 'umask 0022';
echo "GCONF_CONFIG_SOURCE=xml:merged:%{_sysconfdir}/gconf/gconf.xml.defaults";
echo 'export GCONF_CONFIG_SOURCE';
echo "SDIR=%{_sysconfdir}/gconf/schemas";
echo '/usr/bin/gconftool-2 --makefile-uninstall-rule $SDIR/devhelp.schemas'
) | $PKG_INSTALL_ROOT/usr/lib/postrun
%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/lib*
%{_libdir}/gedit-2/plugins/devhelp*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, bin) %{_datadir}/devhelp
%{_datadir}/devhelp/*
%attr (0755, root, other) %{_datadir}/icons
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*
%files root
%defattr (0755, root, sys)
%attr (0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/devhelp.schemas
%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*
%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%endif
%changelog
* Fri March 9 2007 - simon.zheng at sun.com
- initial version created
-------------- next part --------------
#
# spec file for package devhelp.spec
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
#
Name: devhelp
License: GPL
Group: System/GUI/GNOME
Version: 0.13
Release: 1
Distribution: Java Desktop System
Vendor: Sun Microsystems, Inc.
Summary: API documentation browser for GNOME
Source:
http://ftp.gnome.org/pub/GNOME/sources/devhelp/%{version}/devhelp-%{version}.tar.bz2
URL: http://developer.imendio.com/projects/devhelp
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define gtk2_version 2.5.3
%define gnome_vfs_version 2.6.0
%define libgnomeui_version 2.6.0
%define libbonobo_version 2.6.0
%define libxslt_version 1.1.14
%define libglade_version 2.5.1
%define libxml2_version 2.6.5
%define mozilla_version 1.7
%define libwnck_version 2.16.0
Requires: gtk2 >= %{gtk2_version}
Requires: gnome-vfs >= %{gnome_vfs_version}
Requires: libgnomeui >= %{libgnomeui_version}
Requires: libbonobo >= %{libbonobo_version}
Requires: libxslt >= %{libxslt_version}
Requires: libglade >= %{libglade_version}
Requires: libxml2 >= %{libxml2_version}
Requires: mozilla >= %{mozilla_version}
Requires: libwnck >= %{libwnck_version}
BuildRequires: gtk2-devel >= %{gtk2_version}
BuildRequires: gnome-vfs-devel >= %{gnome_vfs_version}
BuildRequires: libgnomeui-devel >= %{libgnomeui_version}
BuildRequires: libbonobo-devel >= %{libbonobo_version}
BuildRequires: libglade-devel >= %{libglade_version}
BuildRequires: libxslt-devel >= %{libxslt_version}
BuildRequires: mozilla-devel >= %{mozilla_version}
BuildRequires: libwnck-devel >= %{libwnck_version}
%description
Devhelp is an API documentation browser for GNOME 2. It works natively with
gtk-doc (the API reference framework developed for GTK+ and used throughout
GNOME for API documentation).
%package devel
Summary: Library to embed Devhelp in other applications
SUNW_BaseDir: %{_basedir}
%include default-depend.inc
Requires: %name
Requires: SUNWgnome-base-libs-devel
%description devel
Library of Devhelp for embedding into other applications.
%prep
%setup -q
%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
CPUS=1
fi
./configure --prefix=%{_prefix} --mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--sysconfdir=%{_sysconfdir} --disable-gtk-doc
make -j$CPUS
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%config %{_sysconfdir}/gconf/schemas/devhelp.schemas
%{_bindir}/devhelp*
%{_datadir}/applications/devhelp.desktop
%{_datadir}/devhelp/
%{_datadir}/mime-info/devhelp.*
%{_datadir}/pixmaps/devhelp.png
%{_libdir}/libdevhelp-1.so.*
%files devel
%defattr(-, root, root)
%{_includedir}/devhelp-1.0/
%{_libdir}/libdevhelp-1.so
%{_libdir}/pkgconfig/libdevhelp-1.0.pc
%changelog
* Fri Mar 9 2007 - simon.zheng at sun.com
- Inintial version created