Create /usr/share/help/* submit/trunk/20130305.075951 submit/trunk/20130306.090327
authorAnas Nashif <anas.nashif@intel.com>
Tue, 5 Mar 2013 07:59:48 +0000 (23:59 -0800)
committerAnas Nashif <anas.nashif@intel.com>
Tue, 5 Mar 2013 07:59:48 +0000 (23:59 -0800)
packaging/filesystem.spec
packaging/iso_3166.sed [deleted file]
packaging/iso_639.sed [deleted file]
packaging/lang-exceptions [deleted file]
packaging/languages [new file with mode: 0644]
packaging/languages.man [new file with mode: 0644]

index 73652c2..d4287e3 100644 (file)
@@ -2,17 +2,14 @@
 %define debug_package %{nil}
 Name:           filesystem
 Version:        3.1
-Release:        2%{?dist}
+Release:        0
 License:        Public Domain
 Summary:        The basic directory layout for a Linux system
 Url:            https://fedorahosted.org/filesystem
-Group:          System Environment/Base
-# Raw source1 URL: https://fedorahosted.org/filesystem/browser/lang-exceptions?format=raw
-Source1:        https://fedorahosted.org/filesystem/browser/lang-exceptions
-Source2:        iso_639.sed
-Source3:        iso_3166.sed
-BuildRequires:  iso-codes
+Group:          System/Base
 Requires(pre): setup
+Source2:        languages
+Source3:        languages.man
 
 
 %description
@@ -27,15 +24,28 @@ rm -f $RPM_BUILD_DIR/filelist
 %build
 
 %install
-install -p -c -m755 %{SOURCE2} %{buildroot}/iso_639.sed
-install -p -c -m755 %{SOURCE3} %{buildroot}/iso_3166.sed
+function create_dir () {
+    local MODE=$1
+    case "$MODE" in
+     \#*) return ;;
+    esac
+    local OWNR=$2
+    local GRUP=$3
+    local NAME=$4
+    local XTRA=$5
+    local BDIR=`dirname $NAME`
+    test -d "$RPM_BUILD_ROOT/$NAME" && { echo "dir $NAME does already exist" ; echo "input out of sequence ?" ; exit 1 ; }
+    test -n "$BDIR" -a ! -d $RPM_BUILD_ROOT$BDIR && create_dir 0755 root root $BDIR
+    mkdir -m $MODE $RPM_BUILD_ROOT/$NAME
+    echo "$XTRA%%dir %%attr($MODE,$OWNR,$GRUP) $NAME" >> $RPM_BUILD_DIR/filelist
+}
 
 cd %{buildroot}
 
 mkdir -p boot dev \
         etc/{X11/{applnk,fontpath.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},xinetd.d,skel,sysconfig,pki} \
         home media mnt opt proc root run/lock srv sys tmp \
-        usr/{bin,etc,games,include,%{_lib}/{games,sse2,tls,X11,pm-utils/{module.d,power.d,sleep.d}},lib/{games,locale,modules,sse2},libexec,local/{bin,etc,games,lib,%{_lib},sbin,src,share/{applications,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x},info},libexec,include,},sbin,share/{aclocal,applications,augeas/lenses,backgrounds,desktop-directories,dict,doc,empty,games,ghostscript/conf.d,gnome,icons,idl,info,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p},mime-info,misc,omf,pixmaps,sounds,themes,xsessions,X11},src,src/kernels,src/debug} \
+        usr/{bin,etc,games,include,%{_lib}/{games,sse2,tls,X11,pm-utils/{module.d,power.d,sleep.d}},lib/{games,locale,modules,sse2},libexec,local/{bin,etc,games,lib,%{_lib},sbin,src,share/{applications,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x},info},libexec,include,},sbin,share/{help/C,aclocal,applications,augeas/lenses,backgrounds,desktop-directories,dict,doc,empty,games,ghostscript/conf.d,gnome,icons,idl,info,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p},mime-info,misc,omf,pixmaps,sounds,themes,xsessions,X11},src,src/kernels,src/debug} \
         var/{adm,empty,gopher,lib/{empty,games,misc,rpm-state},local,lock/subsys,log,nis,preserve,run,spool/{mail,lpd,uucp},tmp,db,cache,opt,games,yp}
 
 ln -snf ../var/tmp usr/tmp
@@ -45,60 +55,21 @@ ln -snf usr/sbin sbin
 ln -snf usr/lib lib
 ln -snf usr/%{_lib} %{_lib}
 
-sed -n -f %{buildroot}/iso_639.sed /usr/share/xml/iso-codes/iso_639.xml \
-  >%{buildroot}/iso_639.tab
-sed -n -f %{buildroot}/iso_3166.sed /usr/share/xml/iso-codes/iso_3166.xml \
-  >%{buildroot}/iso_3166.tab
-
-grep -v "^$" %{buildroot}/iso_639.tab | grep -v "^#" | while read a b c d ; do
-    [[ "$d" =~ "^Reserved" ]] && continue
-    [[ "$d" =~ "^No linguistic" ]] && continue
-
-    locale=$c
-    if [ "$locale" = "XX" ]; then
-        locale=$b
-    fi
-    echo "%lang(${locale})     /usr/share/locale/${locale}" >> $RPM_BUILD_DIR/filelist
-    echo "%lang(${locale}) %ghost %config(missingok) /usr/share/man/${locale}" >>$RPM_BUILD_DIR/filelist
-done
-cat %{SOURCE1} | grep -v "^#" | grep -v "^$" | while read loc ; do
-    locale=$loc
-    locality=
-    special=
-    [[ "$locale" =~ "@" ]] && locale=${locale%%%%@*}
-    [[ "$locale" =~ "_" ]] && locality=${locale##*_}
-    [[ "$locality" =~ "." ]] && locality=${locality%%%%.*}
-    [[ "$loc" =~ "_" ]] || [[ "$loc" =~ "@" ]] || special=$loc
-
-    # If the locality is not official, skip it
-    if [ -n "$locality" ]; then
-        grep -q "^$locality" %{buildroot}/iso_3166.tab || continue
-    fi
-    # If the locale is not official and not special, skip it
-    if [ -z "$special" ]; then
-        egrep -q "[[:space:]]${locale%%_*}[[:space:]]" \
-           %{buildroot}/iso_639.tab || continue
-    fi
-    echo "%lang(${locale})     /usr/share/locale/${loc}" >> $RPM_BUILD_DIR/filelist
-    echo "%lang(${locale})  %ghost %config(missingok) /usr/share/man/${loc}" >> $RPM_BUILD_DIR/filelist
-done
-
-rm -f %{buildroot}/iso_639.tab
-rm -f %{buildroot}/iso_639.sed
-rm -f %{buildroot}/iso_3166.tab
-rm -f %{buildroot}/iso_3166.sed
-
-cat $RPM_BUILD_DIR/filelist | grep "locale" | while read a b ; do
-    mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES
-done
-
-cat $RPM_BUILD_DIR/filelist | grep "/share/man" | while read a b c d; do
-    mkdir -p -m 755 %{buildroot}/$d/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}
-done
-
-for i in man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}; do
-   echo "/usr/share/man/$i" >>$RPM_BUILD_DIR/filelist
-done
+# Create the locale directories:
+while read LANG ; do
+  echo "%lang(${LANG}) %ghost %config(missingok) /usr/share/locale/${LANG}" >>$RPM_BUILD_DIR/filelist
+  create_dir 0755 root root /usr/share/locale/$LANG/LC_MESSAGES
+  create_dir 0755 root root /usr/share/help/$LANG
+done < %{SOURCE2}
+# Create the locale directories for man:
+while read LANG ; do
+  create_dir 0755 root root /usr/share/man/$LANG
+  for sec in 1 2 3 4 5 6 7 8 9 n; do
+    create_dir 0755 root root /usr/share/man/$LANG/man$sec 
+##"%lang(${LANG}) %ghost %config(missingok)"
+  done
+done < %{SOURCE3}
+
 
 %pretrans -p <lua>
 --#
@@ -172,6 +143,7 @@ posix.symlink("../run/lock", "/var/lock")
 %dir /usr/share
 /usr/share/aclocal
 /usr/share/applications
+/usr/share/help/C
 /usr/share/augeas
 /usr/share/backgrounds
 /usr/share/desktop-directories
diff --git a/packaging/iso_3166.sed b/packaging/iso_3166.sed
deleted file mode 100644 (file)
index 705dbdb..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-1,/<iso_3166_entries/b
-
-# on each new iso-code process the current one
-\!\(<iso_3166_entry\|</iso_3166_entries>\)!{
-    x
-    s/^$//
-    # we are on the first iso-code--nothing to process here
-    t
-    # process and write to output
-    s/\s\+/ /g
-    s/<iso_3166_entry//
-    s!/\s*>!!
-    # use '%' as a separator of parsed and unparsed input
-    s/\(.*\)alpha_2_code="\([^"]\+\)"\(.*\)/\2 % \1 \3/
-    s/\([^%]\+\)%\(.*\)alpha_3_code="\([^"]\+\)"\(.*\)/\1% \2 \4/
-    #  clear subst. memory for the next t
-    t clear
-    :clear
-    s/\([^%]\+\)%\(.*\)numeric_code="\([^"]\+\)"\(.*\)/\1% \2 \4/
-    t name
-    # no 3166 code--write xx
-    s/%/\tXX %/
-    :name
-    s/\([^%]\+\)%\(.*\)name="\([^"]\+\)"\(.*\)/\1\t\3/
-    s/ \t/\t/g
-    p
-    b
-    :noout
-}
-
-H
diff --git a/packaging/iso_639.sed b/packaging/iso_639.sed
deleted file mode 100644 (file)
index e7e4d05..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-1,/<iso_639_entries/b
-
-# on each new iso-code process the current one
-\!\(<iso_639_entry\|</iso_639_entries>\)!{
-    x
-    s/^$//
-    # we are on the first iso-code--nothing to process here
-    t
-    # process and write to output
-    s/\s\+/ /g
-    s/<iso_639_entry//
-    s!/\s*>!!
-    # use '%' as a separator of parsed and unparsed input
-    s/\(.*\)iso_639_2T_code="\([^"]\+\)"\(.*\)/\2 % \1 \3/
-    s/\([^%]\+\)%\(.*\)iso_639_2B_code="\([^"]\+\)"\(.*\)/\1\t\3 % \2 \4/
-    #  clear subst. memory for the next t
-    t clear
-    :clear
-    s/\([^%]\+\)%\(.*\)iso_639_1_code="\([^"]\+\)"\(.*\)/\1\t\3 % \2 \4/
-    t name
-    # no 639-1 code--write xx
-    s/%/\tXX %/
-    :name
-    s/\([^%]\+\)%\(.*\)name="\([^"]\+\)"\(.*\)/\1\t\3/
-    s/ \t/\t/g
-    p
-    b
-    :noout
-}
-
-H
diff --git a/packaging/lang-exceptions b/packaging/lang-exceptions
deleted file mode 100644 (file)
index 641695a..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-# This file contains a list of locality-specifc locales for which we ship
-# translations.
-#
-# The easiest way to generate this file is something along the lines of:
-#
-# repoquery -qal | awk -F '/' '/^\/usr\/share\/locale\/[a-z]*[_@]+/ { print $5 }' | sort -u
-# 
-# and then sorting out the various invalid entires. (all_languages, locales
-# with charset definitions (.UTF-8, etc.))
-af_ZA
-am_ET
-ast_ES
-az_IR
-bn_IN
-ca@valencia
-ca_ES
-ca_ES@valencian
-cs_CZ
-de_AT
-de_CH
-de_DE
-default
-el_GR
-en_AU
-en_CA
-en_GB
-en_US
-es_AR
-es_CL
-es_CO
-es_CR
-es_DO
-es_EC
-es_ES
-es_GT
-es_HN
-es_MX
-es_NI
-es_PA
-es_PE
-es_PR
-es_SV
-es_UY
-es_VE
-et_EE
-eu_ES
-fa_IR
-fr_BE
-fr_CA
-fr_CH
-fr_FR
-he_IL
-hr_HR
-hu_HU
-it_CH
-it_IT
-ja_JP
-ko_KR
-ks@devanagari
-my_MM
-nb_NO
-nds_DE
-nl_BE
-nl_NL
-pl_PL
-pt_BR
-pt_PT
-ru_RU
-sl_SI
-sq_AL
-sv_SE
-uk_UA
-ur_PK
-zh_CN
-zh_CN.GB2312
-zh_HK
-zh_TW
-zh_TW.Big5
-en@boldquot
-en@quot
-nds@NFE
-sr@ije
-sr@latin
-sr@Latn
-uz@cyrillic
-uz@Latn
-be@latin
diff --git a/packaging/languages b/packaging/languages
new file mode 100644 (file)
index 0000000..3692507
--- /dev/null
@@ -0,0 +1,128 @@
+ar
+as
+ast
+be
+be@latin
+bg
+bn
+bn_IN
+ca
+ca@valencia
+cs
+cs_CZ
+da
+de
+de_AT
+de_CH
+de_DE
+dz
+el
+el_GR
+en
+en@IPA
+en@boldquot
+en@quot
+en@shaw
+en_AU
+en_CA
+en_GB
+en_NZ
+en_US
+eo
+es
+es_AR
+es_CL
+es_CO
+es_CR
+es_DO
+es_EC
+es_ES
+es_GT
+es_HN
+es_MX
+es_NI
+es_PA
+es_PE
+es_PR
+es_SV
+es_UY
+es_VE
+et
+et_EE
+eu
+fa
+fi
+fi_FI
+fr
+fr_CA
+fr_CH
+fr_FR
+ga
+gl
+gu
+he
+hi
+hr
+hu
+ia
+id
+is
+it
+it_CH
+it_IT
+ja
+ja_JP.EUC
+ja_JP.SJIS
+ja_JP.eucJP
+kk
+km
+kn
+ko
+lt
+lv
+mai
+mk
+ml
+mr
+nb
+nb_NO
+nds
+nds_DE
+ne
+nl
+nl_BE
+nn
+nn_NO
+or
+pa
+pl
+pl_PL
+pt
+pt_BR
+pt_PT
+ro
+ru
+ru_RU
+ru_UA.koi8u
+sk
+sl
+sl_SI
+sq
+sr
+sr@ije
+sr@latin
+sv
+ta
+te
+th
+tr
+tr_TR
+ug
+uk
+uk_UA
+vi
+wa
+zh
+zh_CN
+zh_HK
+zh_TW
diff --git a/packaging/languages.man b/packaging/languages.man
new file mode 100644 (file)
index 0000000..c729553
--- /dev/null
@@ -0,0 +1,21 @@
+ca
+cs
+da
+de
+el
+eo
+es
+fr
+hu
+it
+ja
+nl
+pl
+pt
+pt_BR
+ru
+sk
+sv
+zh
+zh_CN
+zh_TW