Summary: X.Org X11 xfs font server
Name: xorg-x11-xfs
Version: 1.1.3
Release: 1%{?dist}
# NOTE: Remove Epoch line if package gets renamed
Epoch: 1
License: MIT
Group: System Environment/Daemons
URL: http://www.x.org
Source0: ftp://ftp.x.org/pub/individual/app/xfs-%{version}.tar.bz2
Source1: ftp://ftp.x.org/pub/individual/app/xfsinfo-1.0.3.tar.bz2
Source2: ftp://ftp.x.org/pub/individual/app/fslsfonts-1.0.3.tar.bz2
Source3: ftp://ftp.x.org/pub/individual/app/fstobdf-1.0.4.tar.bz2
Source4: ftp://ftp.x.org/pub/individual/app/showfont-1.0.3.tar.bz2
Source10: xfs.init
Source11: xfs.config
Patch0: xfs-1.1.3-xfont-compat.patch
BuildRequires: pkgconfig
# xfs needs 'fontsproto' to build, as indicated by ./configure
BuildRequires: xorg-x11-proto-devel
# FIXME: xfs needs xtrans to build, but autotools doesn't detect it missing
BuildRequires: xorg-x11-xtrans-devel
BuildRequires: libFS-devel
BuildRequires: libXfont-devel
BuildRequires: libX11-devel
# FIXME: xfs needs freetype-devel to build, but autotools doesn't detect it missing
BuildRequires: freetype-devel
BuildRequires: libfontenc-devel
Provides: xfs
Requires(pre): /sbin/nologin, /usr/sbin/useradd
Requires(post): /sbin/chkconfig, grep, sed, coreutils
Requires(preun): /sbin/service, /sbin/chkconfig
Requires(postun): /sbin/service
# xfs initscript runtime dependencies
Requires: initscripts, fontconfig, sed, /usr/bin/find
Requires: /bin/sort, /usr/bin/uniq
Requires: mkfontdir, mkfontscale, ttmkfdir
# end of xfs initscript runtime dependencies
%description
X.Org X11 xfs font server
%package utils
Summary: X.Org X11 font server utilities
Group: User Interface/X
#Requires: %{name} = %{version}-%{release}
%description utils
X.Org X11 font server utilities
%prep
%setup -q -c %{name}-%{version} -a1 -a2 -a3 -a4
%patch0 -p0
%build
# Build xfs
{
pushd xfs-*
%configure
# FIXME: Create patch for the following, and submit it upstream.
# <daniels> mharris: uhm, just set configdir=$(sysconfdir) in Makefile.am
# <mharris> daniels: Do you mean, change it in Makefile.am, and submit patch to fix? Or patch it for local use?
# <daniels> mharris: and submit patch to fix, yeah
make configdir=%{_sysconfdir}/X11/fs
# CFLAGS='-DDEFAULT_CONFIG_FILE="/etc/X11/fs/config"'
popd
}
for pkg in xfsinfo fslsfonts fstobdf showfont ; do
pushd ${pkg}-*
%configure
make
popd
done
%install
rm -rf $RPM_BUILD_ROOT
# Install xfs
{
pushd xfs-*
# FIXME: Create patch for the following, and submit it upstream.
# <daniels> mharris: uhm, just set configdir=$(sysconfdir) in Makefile.am
# <mharris> daniels: Do you mean, change it in Makefile.am, and submit patch to fix? Or patch it for local use?
# <daniels> mharris: and submit patch to fix, yeah
%makeinstall configdir=$RPM_BUILD_ROOT%{_sysconfdir}/X11/fs
popd
}
for pkg in xfsinfo fslsfonts fstobdf showfont ; do
pushd ${pkg}-*
make install DESTDIR=$RPM_BUILD_ROOT
popd
done
# Install the Red Hat xfs config file and initscript
{
mkdir -p $RPM_BUILD_ROOT/etc/{X11/fs,rc.d/init.d}
install -c -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/xfs
install -c -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/X11/fs/config
}
%clean
rm -rf $RPM_BUILD_ROOT
%pre
{
/usr/sbin/useradd -c "X Font Server" -r -s /sbin/nologin -u 43 -d /etc/X11/fs xfs || :
} &> /dev/null || : # Silence output, and ignore errors (Bug #91822)
%post
{
# Install section
/sbin/chkconfig --add xfs
#------------------------------------------------------------------------
# Upgrade section
if [ "$1" -gt "1" ] ; then
XORG_CONFIG=/etc/X11/xorg.conf
XFSCONFIG=/etc/X11/fs/config
# XFS config file upgrade munging
if [ -f $XFSCONFIG ] ; then
# Remove Speedo font directories from xfs config if present to avoid
# bug reports about xfs complaining about empty directories in syslog.
perl -p -i -e 's#^.*/.*/Speedo.*\n##' $XFSCONFIG
fi
fi ; # End Upgrade section
}
%preun
{
if [ "$1" = "0" ]; then
/sbin/service xfs stop &> /dev/null || :
# FIXME: The chkconfig call below works properly if uninstalling the package,
# but it will cause xfs to be de-chkconfig'd if upgrading from one X11
# implementation to another, as witnessed in the transition from
# XFree86 to Xorg X11. If this call is removed however, then xfs will
# remain visible in ntsysv and similar utilities even after xfs is
# uninstalled from the system in non-upgrade scenarios. Not sure how
# to fix this yet.
/sbin/chkconfig --del xfs || :
# userdel/groupdel removed because they cause the user/group to get destroyed
# when upgrading from one X11 implementation to another, ie: XFree86 -> Xorg
# /usr/sbin/userdel xfs 2>/dev/null || :
# /usr/sbin/groupdel xfs 2>/dev/null || :
fi
}
%postun
{
if [ "$1" -gt "1" ]; then
/sbin/service xfs condrestart &> /dev/null || :
fi
}
%files
%defattr(-,root,root,-)
%doc xfs-%{version}/COPYING
%{_bindir}/xfs
%dir %{_sysconfdir}/X11/fs
# NOTE: We intentionally override the upstream default config file location
# during build.
# FIXME: Create patch for the following, and submit it upstream.
# Check if this is still relevent: set configdir=$(sysconfdir) in Makefile.am
# and if so, submit patch upstream to fix.
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/X11/fs/config
#%dir %{_mandir}/man1x
# FIXME: The manpage incorrectly points to /usr/X11R6/...
%{_mandir}/man1/xfs.1*
%{_sysconfdir}/rc.d/init.d/xfs
%files utils
%defattr(-,root,root,-)
# cheating
%doc xfs-%{version}/COPYING
%{_bindir}/fslsfonts
%{_bindir}/fstobdf
%{_bindir}/showfont
%{_bindir}/xfsinfo
#%dir %{_mandir}/man1x
%{_mandir}/man1/fslsfonts.1*
%{_mandir}/man1/fstobdf.1*
%{_mandir}/man1/showfont.1*
%{_mandir}/man1/xfsinfo.1*
%changelog
* Mon Jun 09 2014 Adam Jackson <ajax@redhat.com> 1.1.3-1
- xfs 1.1.3 plus new fontproto compat
- Pre-F12 changelog trim
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Mar 23 2012 Adam Jackson <ajax@redhat.com> 1.1.2-1
- xfs 1.1.2
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Jul 05 2011 Adam Jackson <ajax@redhat.com> 1.1.1-3
- xfs.init: Redact calls to chkfontpath (#665746)
- Remove some monolith-to-modular upgrade path leftovers
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Nov 02 2010 Peter Hutterer <peter.hutterer@redhat.com> 1:1.1.1-1
- xfs 1.1.1
- xfsinfo 1.0.3
- fslsfonts 1.0.3
- fstobdf 1.0.4
- showfont 1.0.3
* Thu Jul 08 2010 Adam Jackson <ajax@redhat.com> 1:1.0.5-8
- Install a COPYING for -utils too
- Remove some XFree86 compat oh my goodness how was that still there.
* Fri Mar 05 2010 Matěj Cepl <mcepl@redhat.com> - 1:1.0.5-7
- Fixed bad directory ownership of /etc/X11
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild