Hello community,

here is the log from the commit of package ghostscript-cjk for openSUSE:Factory 
checked in at 2012-10-03 07:15:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghostscript-cjk (Old)
 and      /work/SRC/openSUSE:Factory/.ghostscript-cjk.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghostscript-cjk", Maintainer is "dmzh...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghostscript-cjk/ghostscript-cjk.changes  
2011-10-26 15:52:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghostscript-cjk.new/ghostscript-cjk.changes     
2012-10-03 07:15:19.000000000 +0200
@@ -1,0 +2,11 @@
+Mon Oct  1 11:19:49 UTC 2012 - wer...@suse.de
+
+- Remove SuSEconfig.ghostscript-cjk use a %post scriplet instead 
+
+-------------------------------------------------------------------
+Mon Oct  1 11:11:58 UTC 2012 - wer...@suse.de
+
+- determine ghostscript CMap, CIDFont, and Adobe Fonts directories
+  on the fly
+
+-------------------------------------------------------------------

Old:
----
  SuSEconfig.ghostscript-cjk

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghostscript-cjk.spec ++++++
--- /var/tmp/diff_new_pack.fS5wkB/_old  2012-10-03 07:15:20.000000000 +0200
+++ /var/tmp/diff_new_pack.fS5wkB/_new  2012-10-03 07:15:20.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghostscript-cjk
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,30 +15,32 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-# norootforbuild
-
 
 Name:           ghostscript-cjk
-License:        BSD-3-Clause
-Group:          Productivity/Publishing/PS
-AutoReqProv:    on
 Provides:       locale(ghostscript-library:ja;ko;zh)
 Version:        20050315
-Release:        144
-Requires:       ghostscript-library >= 8.15, ft2demos
-Obsoletes:      
CMap-Adobe-Identity,CMap-Adobe-Japan2,CMap-Adobe-Korea1,CMap-Adobe-GB1,CMap-Adobe-CNS1,CMap-Adobe-Japan1
+Release:        0
+Requires:       ft2demos
+Requires:       ghostscript-library >= 8.15
+Obsoletes:      CMap-Adobe-CNS1
+Obsoletes:      CMap-Adobe-GB1
+Obsoletes:      CMap-Adobe-Identity
+Obsoletes:      CMap-Adobe-Japan1
+Obsoletes:      CMap-Adobe-Japan2
+Obsoletes:      CMap-Adobe-Korea1
 Url:            http://www.gyve.org/gs-cjk/
 # Original source is gzipped.
 Source0:        ftp://ftp.gyve.org/pub/gs-cjk/adobe-cmaps-200204.tar.bz2
 Source1:        ftp://ftp.gyve.org/pub/gs-cjk/acro5-cmaps-2001.tar.bz2
 Source2:        http://www.aihara.co.jp/~taiji/tops/install-cid-20020820.tar.gz
-Source10:       SuSEconfig.ghostscript-cjk
 Source11:       cidfont-x11-config
 Source12:       acroread-cidfont-config
 Source13:       ghostscript-cjk-config
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Summary:        Tools for Using CJK TrueType Fonts and CID-Keyed Fonts with 
Ghostscript
+License:        BSD-3-Clause
+Group:          Productivity/Publishing/PS
 
 %description
 CMaps, scripts, and other tools for using CJK TrueType fonts and
@@ -70,8 +72,6 @@
 mkdir -p ${RPM_BUILD_ROOT}/usr/share/ghostscript/ 
 cp -a Resource ${RPM_BUILD_ROOT}/usr/share/ghostscript/
 mkdir -p ${RPM_BUILD_ROOT}/sbin/conf.d/
-install -p -m 755 ${RPM_SOURCE_DIR}/SuSEconfig.ghostscript-cjk \
-                  $RPM_BUILD_ROOT/sbin/conf.d/
 mkdir -p ${RPM_BUILD_ROOT}/usr/sbin
 mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man1
 install -p -m 755 ${RPM_SOURCE_DIR}/ghostscript-cjk-config \
@@ -90,12 +90,20 @@
 %clean
 [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf 
$RPM_BUILD_ROOT;
 
+%post
+LC_ALL=POSIX
+if test -x /usr/sbin/acroread-cidfont-config ; then
+    /usr/sbin/acroread-cidfont-config || :
+fi
+if test -x /usr/sbin/ghostscript-cjk-config ; then
+    /usr/sbin/ghostscript-cjk-config || :
+fi
+
 %files
 %defattr(-, root, root)
 %doc
 %dir /usr/share/ghostscript/
 /usr/share/ghostscript/*
-/sbin/conf.d/SuSEconfig.ghostscript-cjk
 /usr/sbin/ghostscript-cjk-config
 /usr/sbin/cidfont-x11-config
 /usr/sbin/acroread-cidfont-config

++++++ acroread-cidfont-config ++++++
--- /var/tmp/diff_new_pack.fS5wkB/_old  2012-10-03 07:15:20.000000000 +0200
+++ /var/tmp/diff_new_pack.fS5wkB/_new  2012-10-03 07:15:20.000000000 +0200
@@ -44,15 +44,29 @@
 use strict;
 use English;
 use Getopt::Long;
-
+use File::Find;
 
 my $OPT_VERBOSE;
 my $OPT_FORCE;
 my $OPT_REMOVE_FAKES;
 
-my $cmap_dir = "/usr/share/ghostscript/Resource/CMap";
-my $cidfont_dir = "/usr/share/ghostscript/Resource/CIDFont";
-my $acrobat_dir = search_directory ("/usr/lib/Acrobat7/Resource/Font", 
"/usr/X11R6/lib/Acrobat7/Resource/Font");
+my @directories = ("/usr/share/ghostscript", "/usr/lib/Acrobat", 
"/usr/lib/Adobe");
+my $cmap_dir = "";
+my $cidfont_dir = "";
+my $acrobat_dir = "";
+
+sub wanted {
+    return unless -d;
+    if (m@CMap@ && ! $cmap_dir) {
+       $cmap_dir = $File::Find::name if ($File::Find::dir =~ 
m@/usr/share/ghostscript/.*@);
+    }
+    if (m@CIDFont@ && ! $cidfont_dir) {
+       $cidfont_dir = $File::Find::name if ($File::Find::dir =~ 
m@/usr/share/ghostscript/.*@);
+    }
+    if (m@Font@ && ! $acrobat_dir) {
+       $acrobat_dir  = $File::Find::name if ($File::Find::dir =~ 
m@/usr/lib/A.*@);
+    }
+}
 
 my %cidfont_replacements =
   (
@@ -198,6 +212,10 @@
     exit 1;
 }
 
+no warnings;
+find(\&wanted, @directories);
+use warnings;
+
 if (! -d $cmap_dir || ! -d $cidfont_dir || ! -d $acrobat_dir) {
   if ($OPT_VERBOSE) {
     printf "a required directory is missing.\n";
@@ -215,4 +233,3 @@
 fake_cidfonts ();
 
 exit 0;
-

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to