2014-04-11 11:58:48 +00:00
|
|
|
%scl_files %{expand:
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%dir %_scl_prefix
|
|
|
|
%dir %attr(555,root,root) %{_scl_root}
|
|
|
|
%dir %attr(555,root,root) %{_scl_scripts}
|
|
|
|
%{_scl_scripts}/enable
|
2015-01-21 09:36:07 +00:00
|
|
|
%{_scl_scripts}/%{scl}
|
|
|
|
%{_root_sysconfdir}/scl/modulefiles/%{scl}
|
2014-04-11 11:58:48 +00:00
|
|
|
%{_root_sysconfdir}/scl/prefixes/%scl
|
|
|
|
%{_scl_root}/bin
|
|
|
|
%attr(555,root,root) %{_scl_root}/boot
|
|
|
|
%{_scl_root}/dev
|
2014-12-11 13:09:22 +00:00
|
|
|
%dir %{_sysconfdir}
|
|
|
|
%{_sysconfdir}/X11
|
|
|
|
%{_sysconfdir}/xdg
|
|
|
|
%{_sysconfdir}/opt
|
|
|
|
%{_sysconfdir}/pm
|
|
|
|
%{_sysconfdir}/xinetd.d
|
|
|
|
%{_sysconfdir}/skel
|
|
|
|
%{_sysconfdir}/sysconfig
|
|
|
|
%{_sysconfdir}/pki
|
2014-04-11 11:58:48 +00:00
|
|
|
%{_scl_root}/home
|
|
|
|
%{_scl_root}/lib
|
2017-08-07 16:17:05 +00:00
|
|
|
%ifarch x86_64 ppc ppc64 ppc64le aarch64 sparc sparc64 s390 s390x
|
2014-04-11 11:58:48 +00:00
|
|
|
%{_scl_root}/%{_lib}
|
|
|
|
%endif
|
|
|
|
%{_scl_root}/media
|
|
|
|
%dir %{_scl_root}/mnt
|
|
|
|
%dir %{_scl_root}/opt
|
|
|
|
%attr(555,root,root) %{_scl_root}/proc
|
|
|
|
%attr(550,root,root) %{_scl_root}/root
|
|
|
|
%{_scl_root}/run
|
|
|
|
%{_scl_root}/sbin
|
|
|
|
%{_scl_root}/srv
|
|
|
|
%{_scl_root}/sys
|
|
|
|
%attr(1777,root,root) %{_scl_root}/tmp
|
|
|
|
%dir %{_scl_root}/usr
|
|
|
|
%attr(555,root,root) %{_scl_root}/usr/bin
|
|
|
|
%{_scl_root}/usr/etc
|
|
|
|
%{_scl_root}/usr/games
|
|
|
|
%{_scl_root}/usr/include
|
2014-12-11 13:09:22 +00:00
|
|
|
%dir %attr(555,root,root) %{_scl_root}/usr/lib
|
2017-08-07 16:17:05 +00:00
|
|
|
%ifarch x86_64 ppc ppc64 ppc64le aarch64 sparc sparc64 s390 s390x
|
2014-04-11 11:58:48 +00:00
|
|
|
%attr(555,root,root) %{_scl_root}/usr/%{_lib}
|
|
|
|
%endif
|
|
|
|
%{_scl_root}/usr/libexec
|
|
|
|
%{_scl_root}/usr/local
|
|
|
|
%attr(555,root,root) %{_scl_root}/usr/sbin
|
|
|
|
%dir %{_scl_root}/usr/share
|
|
|
|
%{_scl_root}/usr/share/aclocal
|
|
|
|
%{_scl_root}/usr/share/applications
|
|
|
|
%{_scl_root}/usr/share/augeas
|
|
|
|
%{_scl_root}/usr/share/backgrounds
|
|
|
|
%{_scl_root}/usr/share/desktop-directories
|
|
|
|
%{_scl_root}/usr/share/dict
|
|
|
|
%{_scl_root}/usr/share/doc
|
|
|
|
%attr(555,root,root) %dir %{_scl_root}/usr/share/empty
|
|
|
|
%{_scl_root}/usr/share/games
|
|
|
|
%{_scl_root}/usr/share/ghostscript
|
|
|
|
%{_scl_root}/usr/share/gnome
|
|
|
|
%{_scl_root}/usr/share/icons
|
|
|
|
%{_scl_root}/usr/share/idl
|
|
|
|
%{_scl_root}/usr/share/info
|
2017-03-20 11:08:53 +00:00
|
|
|
%dir %{_scl_root}/usr/share/licenses
|
2014-04-11 11:58:48 +00:00
|
|
|
%dir %{_scl_root}/usr/share/locale
|
|
|
|
%dir %{_scl_root}/usr/share/man
|
|
|
|
%{_scl_root}/usr/share/mime-info
|
|
|
|
%{_scl_root}/usr/share/misc
|
|
|
|
%{_scl_root}/usr/share/omf
|
|
|
|
%{_scl_root}/usr/share/pixmaps
|
|
|
|
%{_scl_root}/usr/share/sounds
|
|
|
|
%{_scl_root}/usr/share/themes
|
|
|
|
%{_scl_root}/usr/share/xsessions
|
|
|
|
%{_scl_root}/usr/share/X11
|
|
|
|
%{_scl_root}/usr/src
|
|
|
|
%{_scl_root}/usr/tmp
|
2014-12-11 13:09:22 +00:00
|
|
|
%dir %{_localstatedir}
|
|
|
|
%{_localstatedir}/adm
|
|
|
|
%{_localstatedir}/cache
|
|
|
|
%{_localstatedir}/db
|
|
|
|
%{_localstatedir}/empty
|
|
|
|
%{_localstatedir}/games
|
|
|
|
%{_localstatedir}/gopher
|
|
|
|
%{_localstatedir}/lib
|
|
|
|
%{_localstatedir}/local
|
|
|
|
%ghost %dir %attr(755,root,root) %{_localstatedir}/lock
|
|
|
|
%ghost %{_localstatedir}/lock/subsys
|
|
|
|
%{_localstatedir}/log
|
|
|
|
%{_localstatedir}/mail
|
|
|
|
%{_localstatedir}/nis
|
|
|
|
%{_localstatedir}/opt
|
|
|
|
%{_localstatedir}/preserve
|
|
|
|
%ghost %attr(755,root,root) %{_localstatedir}/run
|
|
|
|
%dir %{_localstatedir}/spool
|
|
|
|
%attr(755,root,root) %{_localstatedir}/spool/lpd
|
|
|
|
%attr(775,root,mail) %{_localstatedir}/spool/mail
|
|
|
|
%attr(1777,root,root) %{_localstatedir}/tmp
|
|
|
|
%{_localstatedir}/yp
|
2014-04-11 11:58:48 +00:00
|
|
|
}
|
2012-04-23 10:59:49 +00:00
|
|
|
|
|
|
|
%scl_install %{expand:
|
|
|
|
# scl specific stuff
|
2015-01-21 09:36:07 +00:00
|
|
|
mkdir -p %{buildroot}%{_root_sysconfdir}/{rpm,scl/{prefixes,modulefiles}}
|
2012-04-23 10:59:49 +00:00
|
|
|
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config << EOF
|
2014-12-12 14:37:43 +00:00
|
|
|
%%%%scl %scl
|
|
|
|
%{?nfsmountable:%%%%nfsmountable %{nfsmountable}}
|
|
|
|
%{!?nfsmountable:%%%%undefine nfsmountable}
|
2016-03-09 15:25:32 +00:00
|
|
|
%{?rh_layout:%%%%rh_layout %{rh_layout}}
|
|
|
|
%{!?rh_layout:%%%%undefine rh_layout}
|
2012-04-23 10:59:49 +00:00
|
|
|
EOF
|
|
|
|
cat >> %{buildroot}%{_root_sysconfdir}/scl/prefixes/%{scl} << EOF
|
|
|
|
%_scl_prefix
|
|
|
|
EOF
|
2015-01-21 09:36:07 +00:00
|
|
|
ln -s %{_scl_scripts}/%{scl} %{buildroot}%{_root_sysconfdir}/scl/modulefiles/%{scl}
|
2014-12-11 13:09:22 +00:00
|
|
|
# filelist
|
2012-04-23 10:59:49 +00:00
|
|
|
set +x
|
|
|
|
cat >> %{buildroot}/lang-exceptions << EOF
|
|
|
|
af_ZA
|
|
|
|
am_ET
|
|
|
|
ast_ES
|
|
|
|
az_IR
|
|
|
|
bg_BG
|
|
|
|
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
|
|
|
|
en_NZ
|
|
|
|
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
|
|
|
|
fi_FI
|
|
|
|
fr_BE
|
|
|
|
fr_CA
|
|
|
|
fr_CH
|
|
|
|
fr_FR
|
|
|
|
gl_ES
|
|
|
|
he_IL
|
|
|
|
hr_HR
|
|
|
|
hu_HU
|
|
|
|
it_CH
|
|
|
|
it_IT
|
|
|
|
ja_JP
|
|
|
|
ko_KR
|
|
|
|
ks@devanagari
|
|
|
|
lv_LV
|
|
|
|
ms_MY
|
|
|
|
my_MM
|
|
|
|
nb_NO
|
|
|
|
nds_DE
|
|
|
|
nl_BE
|
|
|
|
nl_NL
|
|
|
|
pl_PL
|
|
|
|
pt_BR
|
|
|
|
pt_PT
|
|
|
|
ru_RU
|
|
|
|
sl_SI
|
|
|
|
sq_AL
|
|
|
|
sr_RS
|
|
|
|
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@ijekavian
|
|
|
|
sr@ijekavianlatin
|
|
|
|
sr@latin
|
|
|
|
sr@Latn
|
|
|
|
uz@cyrillic
|
|
|
|
uz@Latn
|
|
|
|
be@latin
|
|
|
|
en@shaw
|
|
|
|
brx
|
|
|
|
brx_IN
|
|
|
|
EOF
|
|
|
|
cat >> %{buildroot}/iso_639.sed << EOF
|
|
|
|
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
|
|
|
|
EOF
|
|
|
|
cat >> %{buildroot}/iso_3166.sed << EOF
|
|
|
|
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
|
|
|
|
EOF
|
2014-12-11 13:09:22 +00:00
|
|
|
mkdir -p %{buildroot}%{_localstatedir}
|
|
|
|
pushd %{buildroot}%{_localstatedir}
|
|
|
|
mkdir -p {adm,empty,gopher,lib/{games,misc,rpm-state},local,lock/subsys,log,nis,preserve,run,spool/{mail,lpd,uucp},tmp,db,cache,opt,games,yp}
|
|
|
|
popd
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}
|
|
|
|
pushd %{buildroot}%{_sysconfdir}
|
|
|
|
mkdir -p {X11/{applnk,fontpath.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},xinetd.d,skel,sysconfig,pki}
|
|
|
|
popd
|
2012-04-23 10:59:49 +00:00
|
|
|
mkdir -p %{buildroot}%{_scl_root}
|
2014-12-11 13:09:22 +00:00
|
|
|
rm -f $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
2014-04-11 11:58:48 +00:00
|
|
|
rm -f $RPM_BUILD_DIR/%{buildsubdir}/filesystem
|
2013-10-09 13:06:01 +00:00
|
|
|
pushd %{buildroot}%{_scl_root}
|
2012-04-23 10:59:49 +00:00
|
|
|
mkdir -p boot dev \\
|
|
|
|
home media mnt opt proc root run/lock srv sys tmp \\
|
2017-03-20 11:08:53 +00:00
|
|
|
usr/{bin,etc,games,include,lib/{games,locale,modules,sse2},libexec,local/{bin,etc,games,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,licenses,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}
|
2017-08-07 16:17:05 +00:00
|
|
|
%ifarch x86_64 ppc ppc64 ppc64le aarch64 sparc sparc64 s390 s390x
|
2013-10-15 14:22:23 +00:00
|
|
|
mkdir -p usr/{%{_lib}/{games,sse2,tls,X11,pm-utils/{module.d,power.d,sleep.d}},local/%{_lib}}
|
|
|
|
%endif
|
2014-12-11 13:09:22 +00:00
|
|
|
ln -snf %{_localstatedir}/tmp usr/tmp
|
|
|
|
ln -snf spool/mail %{buildroot}%{_localstatedir}/mail
|
2012-04-23 10:59:49 +00:00
|
|
|
ln -snf usr/bin bin
|
|
|
|
ln -snf usr/sbin sbin
|
|
|
|
ln -snf usr/lib lib
|
2017-08-07 16:17:05 +00:00
|
|
|
%ifarch x86_64 ppc ppc64 ppc64le aarch64 sparc sparc64 s390 s390x
|
2012-04-23 10:59:49 +00:00
|
|
|
ln -snf usr/%{_lib} %{_lib}
|
2013-10-09 13:06:01 +00:00
|
|
|
%endif
|
2012-04-23 10:59:49 +00:00
|
|
|
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
|
2016-03-07 08:50:43 +00:00
|
|
|
grep -av "^$" %{buildroot}/iso_639.tab | grep -av "^#" | while read a b c d ; do
|
2012-04-23 10:59:49 +00:00
|
|
|
[[ "$d" =~ "^Reserved" ]] && continue
|
|
|
|
[[ "$d" =~ "^No linguistic" ]] && continue
|
|
|
|
locale=$c
|
|
|
|
if [ "$locale" = "XX" ]; then
|
|
|
|
locale=$b
|
|
|
|
fi
|
2014-12-11 13:09:22 +00:00
|
|
|
echo "%lang(${locale}) %{_scl_root}/usr/share/locale/${locale}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
|
|
|
echo "%lang(${locale}) %ghost %config(missingok) %{_scl_root}/usr/share/man/${locale}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
2012-04-23 10:59:49 +00:00
|
|
|
done
|
|
|
|
cat %{buildroot}/lang-exceptions | 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
|
2014-12-11 13:09:22 +00:00
|
|
|
echo "%lang(${locale}) %{_scl_root}/usr/share/locale/${loc}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
|
|
|
echo "%lang(${locale}) %ghost %config(missingok) %{_scl_root}/usr/share/man/${loc}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
2012-04-23 10:59:49 +00:00
|
|
|
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
|
|
|
|
rm -f %{buildroot}/lang-exceptions
|
2014-12-11 13:09:22 +00:00
|
|
|
cat $RPM_BUILD_DIR/%{buildsubdir}/filelist | grep "locale" | while read a b ; do
|
2012-04-23 10:59:49 +00:00
|
|
|
mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES
|
|
|
|
done
|
2014-12-11 13:09:22 +00:00
|
|
|
cat $RPM_BUILD_DIR/%{buildsubdir}/filelist | grep "/share/man" | while read a b c d; do
|
2012-04-23 10:59:49 +00:00
|
|
|
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
|
2014-12-11 13:09:22 +00:00
|
|
|
echo "%{_scl_root}/usr/share/man/$i" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist
|
2012-04-23 10:59:49 +00:00
|
|
|
done
|
2014-12-11 13:09:22 +00:00
|
|
|
ln -s $RPM_BUILD_DIR/%{buildsubdir}/filelist $RPM_BUILD_DIR/%{buildsubdir}/filesystem
|
2012-04-23 10:59:49 +00:00
|
|
|
set -x
|
2013-10-09 13:06:01 +00:00
|
|
|
popd
|
2012-04-23 10:59:49 +00:00
|
|
|
}
|