Fixes for gnome-print spec file
- From: Chipzz <chipzz ULYSSIS Org>
- To: <chema ximian com>
- Cc: <gleblanc cu-portland edu>, <gnome-packaging-list gnome org>
- Subject: Fixes for gnome-print spec file
- Date: Thu, 3 May 2001 06:27:29 +0200 (CEST)
Fixes for the gnome-print spec file... Mainly use a scriptlet instead of
run-gnome-font-install
Chipzz AKA
Jan Van Buggenhout
--
--------------------------------------------------------------------------
UNIX isn't dead - It just smells funny
Chipzz ULYSSIS Org
--------------------------------------------------------------------------
--- gnome-print-0.28~/gnome-print.spec.in Tue Mar 6 23:17:26 2001
+++ gnome-print-0.28/gnome-print.spec.in Thu May 3 06:47:14 2001
@@ -1,10 +1,4 @@
# Note that this is NOT a relocatable package
-#
-# *** NOTE ****
-# This gnome-print.spec file is not beeing maintaned by the gnome-print
-# team. Patches are welcomed, but the only "official" gnome-print release
-# is the tarball.
-#
%define ver @VERSION@
%define RELEASE 1
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
@@ -15,16 +9,17 @@
Version: %ver
Release: %rel
Copyright: LGPL
-Group: System Environment/Base
-Source: ftp://ftp.gnome.org/pub/GNOME/sources/gnome-print/gnome-print-%{ver}.tar.gz
+Group: System Environment/Base
+Source: ftp://ftp.gnome.org/pub/GNOME/sources/gnome-print/gnome-print-%{ver}.tar.gz
+Patch0: gnome-print-installfonts.patch
BuildRoot: /var/tmp/gnome-print-%{ver}-root
-DocDir: %{prefix}/doc
-PreReq: gnome-libs >= 1.0
-PreReq: libxml >= 1.8.5
-PreReq: gtk+ >= 1.2.8
-PreReq: ghostscript
-PreReq: ghostscript-fonts >= 4.03
-PreReq: urw-fonts
+Requires: gnome-libs >= 1.0
+Requires: libxml >= 1.8.5
+Requires: urw-fonts
+Requires: ghostscript-fonts >= 4.03
+Prereq: /sbin/ldconfig
+PreReq: ghostscript
+Packager: Jan Van Buggenhout <Chipzz ULYSSIS Org>
%description
You should install the gnome-print package if you intend on using any of
@@ -43,6 +38,12 @@
to use the GNOME desktop enviornment.
%changelog
+* Mon Dec 11 2000 Jan Van Buggenhout <Chipzz ULYSSIS Org>
+- Changed the post install to use a scriptlet instead of
+ run-gnome-font-install. This file really shouldn't be part
+ of the rpm.
+ It's still ugly, is there a clean solution to this at all?
+
* Mon Dec 11 2000 Chema Celorio <chema celorio com>
- Added note about this file not beeing maintaned and updated
the old description.
@@ -64,6 +65,7 @@
%prep
%setup -q
+%patch0 -p1
%build
# Needed for snapshot releases.
@@ -90,9 +92,13 @@
make prefix=$RPM_BUILD_ROOT%{prefix} install
# This is ugly
#
-install -m 644 run-gnome-font-install $RPM_BUILD_ROOT%{prefix}/share/fonts
cd fonts
install -m 644 *.font $RPM_BUILD_ROOT%{prefix}/share/fonts
+cat > $RPM_BUILD_ROOT%{prefix}/share/fonts/fontmap2 << EOF
+<?xml version="1.0"?>
+<fontmap version="2.0">
+</fontmap>
+EOF
%clean
rm -rf $RPM_BUILD_ROOT
@@ -102,8 +108,31 @@
echo "%{prefix}/lib" >> /etc/ld.so.conf
fi
/sbin/ldconfig
-perl %{prefix}/share/fonts/run-gnome-font-install \
- %{prefix}/bin/gnome-font-install %{prefix}/share %{prefix}/share
+
+gs_fontpath=`gs -h 2>/dev/null |
+{
+ while read l
+ do
+ if test "$l" = "Search path:" ; then add=ok; continue; fi
+ if test -n "$add" ; then case $l in .*|/*) echo -n "$l " ;; esac; fi
+ done
+} | sed -e 's/ : /:/g' -e 's/ $//'`
+
+IFS=: ; for fd in $gs_fontpath ; do case $fd in /*) test -d $fd && fp="$fp $fd" ;; esac ; done
+
+IFS=" "; for fd in \
+/usr/share/ghostscript/fonts /usr/lib/ghostscript/fonts /usr/share/fonts/default/Type1 /usr/share/fonts/default/ghostscript \
+/usr/local/share/ghostscript/fonts /usr/local/lib/ghostscript/fonts /usr/local/share/fonts/default/Type1 /usr/local/share/fonts/default/ghostscript \
+/usr/share/ghostscript/fonts /usr/freeware/share/ghostscript/fonts ; \
+do case $fd in /*) test -d $fd && fp="$fp $fd" ;; esac ; done
+
+for f in $fp; do i="" ; for g in $fontpath; do if test "$f" = "$g" ; then i=$f; break; fi; done; test -z $i && fontpath="$fontpath $f"; done
+
+options="--afm-path=%{prefix}/share/fonts/afms --pfb-path=%{prefix}/share/fonts/pfbs --target=%{prefix}/share/fonts/fontmap2"
+for fd in $fontpath; do options="$options --assignment=ghostscript,$fd"; done
+options="$options --fontmap-path=%{prefix}/share/fonts"
+
+gnome-font-install $options >/dev/null
%postun
/sbin/ldconfig
@@ -115,13 +144,10 @@
%{prefix}/bin/*
%{prefix}/lib/lib*.so.*
%{prefix}/share/fonts/afms/adobe/*
-%{prefix}/share/fonts/fontmap2
+%config %{prefix}/share/fonts/fontmap2
%{prefix}/share/fonts/*.font
-%{prefix}/share/fonts/run-gnome-font-install
-%{prefix}/share/locale/*/*/*
-%config %{prefix}/share/gnome-print/%{version}/profiles/PostscriptOptimized.profile
-%config %{prefix}/share/gnome-print/%{version}/profiles/pdf.profile
-%config %{prefix}/share/gnome-print/%{version}/profiles/fax-g3.profile
+%{prefix}/share/locale/*/LC_MESSAGES/*.mo
+%config %{prefix}/share/gnome-print/%{version}/profiles/*.profile
%files devel
%defattr(-, root, root)
diff -ur gnome-print~/installer/Makefile.am gnome-print/installer/Makefile.am
--- gnome-print~/installer/Makefile.am Thu May 3 06:58:19 2001
+++ gnome-print/installer/Makefile.am Thu May 3 07:00:12 2001
@@ -13,5 +13,3 @@
$(LIBGNOMEPRINT_LIBS) \
$(INTLLIBS)
-install-data-local: gnome-font-install
- $(PERL) $(top_srcdir)/run-gnome-font-install ./gnome-font-install $(datadir) $(top_srcdir)
diff -ur gnome-print~/installer/Makefile.in gnome-print/installer/Makefile.in
--- gnome-print~/installer/Makefile.in Thu May 3 06:58:19 2001
+++ gnome-print/installer/Makefile.in Thu May 3 07:01:47 2001
@@ -418,8 +418,7 @@
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-install-data-local: gnome-font-install
- $(PERL) $(top_srcdir)/run-gnome-font-install ./gnome-font-install $(datadir) $(top_srcdir)
+install-data-local:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]