File ghex.spec of Package ghex

#
# spec file for package ghex
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           ghex
Version:        3.0.0
Release:        1
License:        GPLv2+
Summary:        GNOME Binary Editor
Url:            http://www.gnome.org/
Group:          Development/Tools/Other
Source:         http://download.gnome.org/sources/ghex/3.0/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM ghex-empty-search-crash.patch bgo#473208
Patch7:         ghex-empty-search-crash.patch
BuildRequires:  fdupes
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  intltool
BuildRequires:  pkgconfig(atk) >= 1.0.0
BuildRequires:  pkgconfig(gail-3.0)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.0
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

%description
GHex allows the user to load data from any file and to view and edit it
in either hex or ASCII. It is a must for anyone playing games that use
a non-ASCII format for saving.

%package -n libgtkhex-3-0
License:        GPLv2+
Summary:        GNOME Binary Editor -- Library
Group:          System/Libraries

%description -n libgtkhex-3-0
GHex allows the user to load data from any file and to view and edit it
in either hex or ASCII. It is a must for anyone playing games that use
a non-ASCII format for saving.

%package devel
License:        GPLv2+
Summary:        GNOME Binary Editor -- Development Files
Group:          Development/Libraries/GNOME
Requires:       libgtkhex-3-0 = %{version}

%description devel
GHex allows the user to load data from any file and to view and edit it
in either hex or ASCII. It is a must for anyone playing games that use
a non-ASCII format for saving.

%lang_package
%prep
%setup -n ghex-%{version}
translation-update-upstream
%patch7

%build
%configure --with-pic\
	--disable-static\
	--disable-scrollkeeper\
	--disable-schemas-install
make %{?_smp_mflags}

%install
%makeinstall
find %{buildroot}%{_libdir} -name "*.la" -type f -delete -print
%suse_update_desktop_file -r %name GNOME Utility Editor
%find_lang %{name}-3.0 %{?no_lang_C}
%find_lang %{name} ghex-3.0.lang %{?no_lang_C}
%fdupes -s %{buildroot}

%clean
rm -rf %{buildroot}

%post
%if 0%{?suse_version} > 1130
%desktop_database_post
%icon_theme_cache_post
%glib2_gsettings_schema_post
%endif

%postun
%if 0%{?suse_version} > 1130
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun
%endif

%post -n libgtkhex-3-0 -p /sbin/ldconfig

%postun -n libgtkhex-3-0 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc README COPYING COPYING-DOCS AUTHORS
%{_bindir}/ghex
%{_datadir}/applications/ghex.desktop
%dir %{_datadir}/GConf
%dir %{_datadir}/GConf/gsettings
%{_datadir}/GConf/gsettings/ghex.convert
%{_datadir}/glib-2.0/schemas/org.gnome.GHex.gschema.xml
%{_datadir}/icons/hicolor/*/apps/ghex.*
%{_datadir}/%{name}/
%dir %{_datadir}/gnome/help/%{name}
%doc %{_datadir}/gnome/help/%{name}/C/
%doc %{_datadir}/omf/%{name}/%{name}-C.omf

%files -n libgtkhex-3-0
%defattr(-,root,root)
%{_libdir}/libgtkhex-3.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/gtkhex-3/
%{_libdir}/libgtkhex-3.so
%{_libdir}/pkgconfig/gtkhex-3.pc

%files lang -f %{name}-3.0.lang

%changelog
openSUSE Build Service is sponsored by