File libXfont2.spec of Package libXfont2
%define realname libXfont2
%define realver 2.0.1
%define srcext tar.bz2
%define so_ver 2
# turn off the generation of debuginfo rpm (RH9) ??
%global debug_package %{nil}
# Common info
Name: %{realname}-%{so_ver}
Version: %{realver}
Release: wiz%{?extraver:0.}1%{?dist}
License: MIT
Group: System/Libraries
URL: https://cgit.freedesktop.org/xorg/lib/libXfont
Summary: X font handling library for server & utilities
# Install-time parameters
Provides: libXfont = %{version}
Provides: libXfont2 = %{version}
# Build-time parameters
BuildRequires: pkgconfig
BuildRequires: pkgconfig(xorg-macros) >= 1.10
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(xproto)
BuildRequires: pkgconfig(xtrans)
BuildRequires: pkgconfig(fontsproto) >= 2.1.3
BuildRequires: pkgconfig(fontenc)
BuildRequires: zlib-devel
%if 0%{?suse_version}
BuildRequires: libbz2-devel
%else
BuildRequires: bzip2-devel
%endif
BuildRoot: %{_tmppath}/%{name}-root
Source: https://www.x.org/releases/individual/lib/%{realname}-%{realver}%{?extraver}.%{srcext}
%description
libXfont provides the core of the legacy X11 font system, handling the
index files (fonts.dir, fonts.alias, fonts.scale), the various font file
formats, and rasterizing them. It is used by the X servers, the
X Font Server (xfs), and some font utilities (bdftopcf for instance),
but should not be used by normal X11 clients. X11 clients access fonts
via either the new API's in libXft, or the legacy API's in libX11.
%package -n %{realname}-devel
Group: Development/Languages/C and C++
Summary: Development files for %{name}
Requires: %{name} = %{version}
Provides: %{name}-devel = %{version}
%description -n %{realname}-devel
Development files for %{name}
# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}%{?extraver}
%build
%configure \
--disable-static \
--with-bzip2 \
CFLAGS="%{optflags} %{?gcc_lto}" \
CXXFLAGS="%{optflags} %{?gcc_lto}" \
LDFLAGS="-Wl,--as-needed -Wl,--strip-all %{?gcc_lto}"
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=%{buildroot}
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_libdir}/libXfont2.so.%{?so_ver}*
# Development stuff
%files -n %{realname}-devel
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_libdir}/pkgconfig/xfont2.pc
%dir %{_includedir}/X11/fonts
%dir %{_includedir}/X11
%{_includedir}/X11/fonts/libxfont2.h
%{_libdir}/libXfont2.so
%exclude %{_libdir}/*.la
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%changelog