Blob Blame History Raw
%define glib2_version 2.3.0
%define gtk2_version 2.6.0
%define desktop_file_utils_version 0.9

Name:           gucharmap
Version:        2.22.0
Release:        1%{?dist}
Summary:        Unicode character picker and font browser

Group:          Applications/System
License:        GPLv2+ and GFDL+ and MIT
# GPL for the source code, GFDL for the docs, MIT for Unicode data
URL:            http://live.gnome.org/Gucharmap
Source:         http://download.gnome.org/sources/gucharmap/2.22/gucharmap-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: gnome-doc-utils >= 0.3.2
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gtk2-devel >= %{gtk2_version}
BuildRequires: libgnomeui-devel >= 2.13.2 
BuildRequires: libgnome-devel >= 2.13.7
BuildRequires: desktop-file-utils >= %{desktop_file_utils_version} 
BuildRequires: scrollkeeper
BuildRequires: gettext
BuildRequires: perl(XML::Parser)

Requires(post):scrollkeeper
Requires(post): desktop-file-utils >= %{desktop_file_utils_version} 
Requires(postun): scrollkeeper
Requires(postun): desktop-file-utils >= %{desktop_file_utils_version} 

%description
This program allows you to browse through all the available Unicode 
characters and categories for the installed fonts, and to examine their 
detailed properties. It is an easy way to find the character you might 
only know by its Unicode name or code point.

%package devel
Summary: Libraries and headers for libgucharmap
Group: Development/Libraries
Requires: glib2-devel >= %{glib2_version}
Requires: gtk2-devel >= %{gtk2_version}
Requires: gucharmap = %{version}-%{release}
Requires: pkgconfig

%description devel
The gucharmap-devel package contains header files and other resources
needed to use the libgucharmap library.

%prep
%setup -q


%build
%configure --disable-gtk-immodules --disable-scrollkeeper
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT RUN_QUERY_IMMODULES_TEST=false

rm $RPM_BUILD_ROOT/%{_libdir}/*.la

sed -i -e "s#Icon=gucharmap.png#Icon=/usr/share/icons/hicolor/48x48/apps/gucharmap.png#" \
  $RPM_BUILD_ROOT%{_datadir}/applications/gucharmap.desktop

desktop-file-install --vendor gnome --delete-original       \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications             \
  $RPM_BUILD_ROOT%{_datadir}/applications/*

%find_lang gucharmap --with-gnome


%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/ldconfig
scrollkeeper-update -q
update-desktop-database -q
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/gucharmap.schemas > /dev/null || :

%postun
/sbin/ldconfig
scrollkeeper-update -q
update-desktop-database -q
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi

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

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

%files -f gucharmap.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
%{_bindir}/charmap
%{_bindir}/gucharmap
%{_bindir}/gnome-character-map
%{_libdir}/libgucharmap.so.*
%{_datadir}/applications/gnome-gucharmap.desktop
%{_datadir}/icons/hicolor/48x48/apps/gucharmap.png
%{_sysconfdir}/gconf/schemas/gucharmap.schemas


%files devel
%defattr(-,root,root,-)
%{_includedir}/gucharmap
%{_libdir}/libgucharmap.so
%{_libdir}/pkgconfig/gucharmap.pc


%changelog
* Sun Mar  9 2008 Matthias Clasen <mclasen@redhat.com> - 2.22.0-1
- Update to 2.22.0

* Wed Jan 30 2008 Matthias Clasen <mclasen@redhat.com> - 2.21.90-1
- Update to 2.21.90

* Tue Jan 15 2008 Matthias Clasen <mclasen@redhat.com> - 2.21.5-1
- Update to 2.21.5

* Tue Dec 18 2007 Matthias Clasen <mclasen@redhat.com> - 2.21.4-1
- Update to 2.21.4

* Thu Dec  6 2007 Matthias Clasen <mclasen@redhat.com> - 2.21.3-1
- Update to 2.21.3

* Tue Sep 18 2007 Matthias Clasen <mclasen@redhat.com> - 1.10.1-1
- Update to 1.10.1

* Tue Aug  7 2007 Matthias Clasen <mclasen@redhat.com> - 1.10.0-2
- Update license field
- Use %%find_lang for help files

* Tue Mar 13 2007 Matthias Clasen <mclasen@redhat.com> - 1.10.0-1
- Update to 1.10.0

* Mon Sep  4 2006 Matthias Clasen <mclasen@redhat.com> - 1.8.0-1
- Update to 1.8.0
- Require pgkconfig for the -devel package

* Thu Aug 02 2006 Matthias Clasen <mclasen@redhat.com> 
- Rebuild 

* Wed Aug 02 2006 Behdad Esfahbod <besfahbo@redhat.com> - 1.7.0-1
- Update to 1.7.0

* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.6.0-8.1
- rebuild

* Fri Jun  9 2006 Matthias Clasen <mclasen@redhat.com> 1.6.0-8
- Add missing BuildRequires

* Fri Jun  2 2006 Matthias Clasen <mclasen@redhat.com> 1.6.0-7
- Rebuild

* Tue Apr 18 2006 Matthias Clasen <mclasen@redhat.com> 1.6.0-6
- Make -devel require the exact n-v-r

* Tue Apr 18 2006 Matthias Clasen <mclasen@redhat.com> 1.6.0-5
- incorporate more package review feedback

* Mon Apr 17 2006 Matthias Clasen <mclasen@redhat.com> 1.6.0-4
- split off a -devel package

* Mon Apr 17 2006 Matthias Clasen <mclasen@redhat.com> 1.6.0-3
- fix issues pointed out in package review

* Tue Apr 11 2006 Matthias Clasen <mclasen@redhat.com> 1.6.0-2
- Initial revision