Hi Here is a better polished spec file, based on the comments I've received so far. The resulting rpms can be downloaded at : http://mapage.noos.fr/nmailhot/vera/vera-fonts-1.10-1.noarch.rpm http://mapage.noos.fr/nmailhot/vera/vera-fonts-1.10-1.src.rpm If it's satisfying I'd rather have the rpms distributed with the tars, since I don't really intend to become a font distributor. Cheers, -- Nicolas Mailhot
%define name vera-fonts %define archivename ttf-bitstream-vera %define version 1.10 %define url http://www.gnome.org/fonts/ %define _x11bindir /usr/X11R6/bin %define _x11encdir /usr/X11R6/lib/X11/fonts/encodings %define prefix %{_datadir}/fonts/bitstream-vera Summary: Bitstream Vera Fonts Name: %{name} Version: %{version} Release: 1 Epoch: 0 License: Free URL: %{url} Group: User Interface/X Source0: ftp://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/%{version}/%{archivename}-%{version}.tar.bz2 BuildArch: noarch Requires: %{_sbindir}/chkfontpath, %{_x11bindir}/mkfontdir, %{_bindir}/ttmkfdir BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description High quality hinted latin fonts donated by Bitstream Very liberal license, see %{url} %prep %setup -q -n %{archivename}-%{version} %build %install [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT install -d -m 0755 $RPM_BUILD_ROOT%{prefix} install -m 0644 *.ttf $RPM_BUILD_ROOT/%{prefix}/ # "touch" all fonts.dir, fonts.alias, etc files we've got flagged as %ghost # but which are not present in the RPM_BUILD_ROOT when RPM looks for files touch $RPM_BUILD_ROOT%{prefix}/{fonts.{alias,dir,scale,cache-1},XftCache,encodings.dir} %clean [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT %post { # Legacy font handling #%{_bindir}/ttmkfdir is a requirement anyway -- NiM %{_bindir}/ttmkfdir -d %{prefix} -o %{prefix}/fonts.scale %{_x11bindir}/mkfontdir -e %{_x11encdir} -e %{_x11encdir}/large %{prefix} %{_sbindir}/chkfontpath -q -a %{prefix} # Modern font handling # These commands will be executed on upgrade by their respective packages if [ -x %{_bindir}/fc-cache ] ; then %{_bindir}/fc-cache -f ; fi if [ -x %{_bindir}/redhat-update-gnome-font-install ] ; then %{_bindir}/redhat-update-gnome-font-install fi if [ -x %{_bindir}/redhat-update-gnome-font-install2 ] ; then %{_bindir}/redhat-update-gnome-font-install2 fi } &> /dev/null || : %postun # Rehash the font dir to keep only stuff manually installed { if [ "$1" = "0" ]; then if [ $(find %{prefix} -follow -type f -iname "*.ttf" -printf "\b\b\b\btrue") ] ; then %{_bindir}/ttmkfdir -d %{prefix} -o %{prefix}/fonts.scale %{_x11bindir}/mkfontdir -e %{_x11encdir} -e %{_x11encdir}/large %{prefix} else chkfontpath -q -r %{prefix} fi if [ -x %{_bindir}/fc-cache ] ; then %{_bindir}/fc-cache -f ; fi if [ -x %{_bindir}/redhat-update-gnome-font-install ] ; then %{_bindir}/redhat-update-gnome-font-install fi if [ -x %{_bindir}/redhat-update-gnome-font-install2 ] ; then %{_bindir}/redhat-update-gnome-font-install2 fi fi } &> /dev/null || : %files %defattr(0644,root,root,0755) %doc *.TXT local.conf %dir %{prefix} %{prefix}/*.ttf %ghost %{prefix}/fonts.dir %ghost %{prefix}/fonts.scale %config(noreplace) %{prefix}/fonts.alias %ghost %{prefix}/fonts.cache-1 %ghost %{prefix}/XftCache %ghost %{prefix}/encodings.dir %changelog * Sat Apr 27 2003 Nicolas Mailhot <Nicolas.Mailhot at laPoste.net> 0:1.10-1 - apply suggested fixes * Thu Apr 17 2003 Nicolas Mailhot <Nicolas.Mailhot at laPoste.net> 0:1.10-0 - initial packaging
Attachment:
signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=