File fontforge.spec of Package fontforge

#
# spec file for package fontforge (Version 20230101)
#
# Copyright (c) 2023 SUSE LLC, 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/
#

%define __builder ninja
%define	skip_python2 1
Name:           fontforge
BuildRequires:  libjpeg-devel libtiff-devel libpng-devel freetype2-devel giflib-devel gtk3-devel libxml2-devel pango-devel cairo-devel libspiro-devel python3-devel cmake ninja gcc gcc-c++ readline-devel woff2-devel libuv1 >= 1.38.0 krb5
BuildRequires:	python-rpm-macros
License:        GPL-3.0
Group:          Productivity/Graphics/Vector Editors
Version:        20230101
Release:        5
Url:            http://fontforge.sourceforge.net/
Source0:	https://github.com/fontforge/fontforge/releases/download/%{version}/fontforge-%{version}.tar.xz
Source10:       %{name}.desktop
Source11:       %name.png
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        A Font Editor

%description
FontForge allows editing of outline and bitmap fonts.  With it, you can
create new fonts or modify old ones.  It also converts font formats and
can convert among PostScript (ASCII & binary Type 1, some Type 3s, and
some Type 0s), TrueType, OpenType (Type2), and CID-keyed fonts.

%package devel
License:        BSD3c(or similar)
Summary:        Include Files and Libraries mandatory for Development
Group:          Development/Libraries/Other
Requires:       %{name} = %{version} freetype2-devel

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.

%package -n libfontforge4
Summary: Shared library for FontForge

%description -n libfontforge4
FontForge provides a complete suite of tools for producing high-quality 
typefaces and supports a wide range of file formats including TrueType, 
OpenType, PostScript, and U. F. O..

%package -n python-fontforge
Summary: python-bindings for FontForge
Requires: libfontforge4 = %{version}

%description -n python-fontforge
FontForge provides a complete suite of tools for producing high-quality 
typefaces and supports a wide range of file formats including TrueType, 
OpenType, PostScript, and U. F. O..

%lang_package

%prep
%autosetup

%build
%cmake
%cmake_build

%install
#cd build
#DESTDIR="$RPM_BUILD_ROOT" ninja install
%cmake_install
%find_lang FontForge

%files
%defattr(-,root,root)
%{_datadir}/fontforge
%{_bindir}/fontforge
%{_bindir}/fontimage
%{_bindir}/fontlint
%{_bindir}/sfddiff
%{_mandir}/man1/fontforge*
%{_mandir}/man1/fontimage.*
%{_mandir}/man1/fontlint.*
%{_mandir}/man1/sfddiff.*
%{_datadir}/icons/hicolor/*/apps/org.fontforge.FontForge.*
%{_datadir}/metainfo/org.fontforge.FontForge.appdata.xml
%{_datadir}/mime/packages/fontforge.xml
%{_datadir}/applications/org.fontforge.FontForge.desktop

%files devel
%defattr(-, root, root)
#dir %{_includedir}/%{name}/
#{_includedir}/%{name}/*
#{_libdir}/pkgconfig/*
%{_libdir}/lib*.so

%files lang -f FontForge.lang

%pre -n libfontforge4
/sbin/ldconfig

%preun -n libfontforge4
/sbin/ldconfig

%files -n libfontforge4
%defattr(-,root,root)
%{_libdir}/libfontforge.so*

%files -n python-fontforge
%defattr(-,root,root)
%{_datadir}/fontforge/python/excepthook.py
#%{_libdir}/python3.11/site-packages/fontforge.so
#%{_libdir}/python3.11/site-packages/psMat.so
%{python_sitelib}/fontforge.so
%{python_sitelib}/psMat.so

%changelog
openSUSE Build Service is sponsored by