Dynamically pull in list of unicode map & codepage files to package from the template...
authorShirish Kalele <kalele@samba.org>
Thu, 13 Apr 2000 18:08:57 +0000 (18:08 +0000)
committerShirish Kalele <kalele@samba.org>
Thu, 13 Apr 2000 18:08:57 +0000 (18:08 +0000)
packaging/Solaris/makepkg.sh

index 5e379dd332a580309bafebf44e0c5d5257e9a4f5..32dae80ce0d2d533adfce53857b4772ed10b1938 100755 (executable)
@@ -15,7 +15,6 @@ add_dynamic_entries()
   echo "#\n# Codepages \n#"
   echo d none samba/lib/codepages 0755 root other
 
-  CODEPAGELIST="437 737 850 852 861 932 866 949 950 936 1251"
   # Check if make_smbcodepage exists
   if [ ! -f $DISTR_BASE/source/bin/make_smbcodepage ]; then
     echo "Could not find $DISTR_BASE/source/bin/make_smbcodepage to generate codepages.\n\
@@ -23,9 +22,26 @@ Please create the binaries before packaging." >&2
     exit 1
   fi
 
-  for p in $CODEPAGELIST; do
-    $DISTR_BASE/source/bin/make_smbcodepage c $p $DISTR_BASE/source/codepages/codepage_def.$p $DISTR_BASE/source/codepages/codepage.$p
-    echo f none samba/lib/codepages/codepage.$p=source/codepages/codepage.$p 0644 root other
+  # PUll in the codepage_def list from source/codepages/codepage_def.*
+  list=`find $DISTR_BASE/source/codepages -name "codepage_def.*" | sed 's|^.*codepage_def\.\(.*\)|\1|'`
+  for cpdef in $list
+  do
+    $DISTR_BASE/source/bin/make_smbcodepage c $cpdef $DISTR_BASE/source/codepages/codepage_def.$cpdef $DISTR_BASE/source/codepages/codepage.$cpdef
+    echo f none samba/lib/codepages/codepage.$cpdef=source/codepages/codepage.$cpdef 0644 root other
+  done
+
+  # Create unicode maps 
+  if [ ! -f $DISTR_BASE/source/bin/make_unicodemap ]; then
+    echo "Missing $DISTR_BASE/source/bin/make_unicodemap. Aborting." >&2
+    exit 1
+  fi
+
+  # Pull in all the unicode map files from source/codepages/CP*.TXT
+  list=`find $DISTR_BASE/source/codepages -name "CP*.TXT" | sed 's|^.*CP\(.*\)\.TXT|\1|'`
+  for umap in $list
+  do
+    $DISTR_BASE/source/bin/make_unicodemap $umap $DISTR_BASE/source/codepages/CP$umap.TXT $DISTR_BASE/source/codepages/unicode_map.$umap
+    echo f none samba/lib/codepages/unicode_map.$umap=source/codepages/unicode_map.$umap 0644 root other
   done
 
   # Add the binaries, docs and SWAT files