File ghex.spec of Package ghex
#
# spec file for package ghex
#
# Copyright (c) 2016 SUSE LINUX 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.18.3
Release: 0
Summary: GNOME Binary Editor
License: GPL-2.0+
Group: Development/Tools/Other
Url: http://www.gnome.org/
Source: http://download.gnome.org/sources/ghex/3.18/%{name}-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: intltool
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
BuildRequires: yelp-tools
BuildRequires: pkgconfig(atk) >= 1.0.0
BuildRequires: pkgconfig(gail-3.0)
BuildRequires: pkgconfig(gio-2.0) >= 2.31.10
BuildRequires: pkgconfig(gtk+-3.0) >= 3.3.8
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
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
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
%build
%configure --with-pic\
--disable-static\
--disable-scrollkeeper
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
%dir %{_datadir}/appdata
%{_datadir}/appdata/ghex.appdata.xml
%{_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
# Own dirs for older versions of openSUSE
%if 0%{?suse_version} <= 1320
%dir %{_datadir}/icons/hicolor/512x512
%dir %{_datadir}/icons/hicolor/512x512/apps
%endif
%{_datadir}/icons/hicolor/*/apps/ghex*
%doc %{_datadir}/help/C/%{name}/
%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