]> git.pld-linux.org Git - packages/glibc.git/blobdiff - glibc.spec
- release 2
[packages/glibc.git] / glibc.spec
index 4361a9b98ef22222cf15d4ffff9ce65337d17202..b5a91ce5a58a5f42ed81b40a5ff84cd742e38819 100644 (file)
@@ -8,12 +8,12 @@ Summary:      GNU libc
 Summary(de):   GNU libc
 Summary(fr):   GNU libc
 Summary(pl):   GNU libc
-Summary(ru):   GNU libc ×ÅÒÓÉÉ 2.2
+Summary(ru):   GNU libc ×ÅÒÓÉÉ 2.3
 Summary(tr):   GNU libc
-Summary(uk):   GNU libc ×ÅÒÓ¦§ 2.2
+Summary(uk):   GNU libc ×ÅÒÓ¦§ 2.3
 Name:          glibc
-Version:       2.2.5
-Release:       9
+Version:       2.3.1
+Release:       2
 Epoch:         6
 License:       LGPL
 Group:         Libraries
@@ -24,7 +24,8 @@ Source3:      nscd.sysconfig
 Source4:       nscd.logrotate
 Source5:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-man-pages.tar.bz2
 Source6:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
-Source7:       postshell.c
+# borrowed from util-linux
+Source7:       sln.8
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-versions.awk_fix.patch
 Patch2:                %{name}-pld.patch
@@ -32,14 +33,15 @@ Patch3:             %{name}-crypt-blowfish.patch
 Patch4:                %{name}-string2-pointer-arith.patch
 Patch5:                %{name}-linuxthreads-lock.patch
 Patch6:                %{name}-pthread_create-manpage.patch
-Patch7:                %{name}-sparc-linux-chown.patch
-Patch8:                %{name}-ldconfig-bklinks.patch
 Patch9:                %{name}-paths.patch
 Patch10:       %{name}-vaargs.patch
 Patch11:       %{name}-getaddrinfo-workaround.patch
-Patch12:       %{name}-use-int-not-arpa.patch
-Patch13:       %{name}-divdi3.patch
+Patch12:       %{name}-postshell.patch
+Patch13:       %{name}-pl.po-update.patch
+Patch14:       %{name}-missing-nls.patch
 URL:           http://www.gnu.org/software/libc/
+BuildRequires: binutils >= 2.13.90.0.2
+BuildRequires: gcc >= 3.2
 BuildRequires: gd-devel >= 2.0.1
 BuildRequires: gettext-devel >= 0.10.36
 BuildRequires: libpng-devel
@@ -53,13 +55,16 @@ Obsoletes:  %{name}-common
 Obsoletes:     %{name}-debug
 Obsoletes:     ldconfig
 Autoreq:       false
-Prereq:                basesystem
+PreReq:                basesystem
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Conflicts:     kernel < %{min_kernel}
 Conflicts:     man-pages < 1.43
 Conflicts:     ld.so < 1.9.9-10
 
 %define                debugcflags     -O1 -g
+%define                configuredir    %{u2p:%{_builddir}}/%{name}-%{version}/
+#define                parallelmkflags PARALLELMFLAGS="-j 4"   
+%define                parallelmkflags %{nil}  
 
 %description
 Contains the standard libraries that are used by multiple programs on
@@ -189,8 +194,8 @@ Summary(pl):        Demon zapami
 Summary(ru):   ëÜÛÉÒÕÀÝÉÊ ÄÅÍÏΠÓÅÒ×ÉÓÏ× ÉÍÅÎ
 Summary(uk):   ëÅÛÕÀÞÉÊ ÄÅÍÏΠÓÅצӦנ¦ÍÅÎ
 Group:         Networking/Daemons
-Prereq:                /sbin/chkconfig
-Prereq:                rc-scripts >= 0.2.0
+PreReq:                /sbin/chkconfig
+PreReq:                rc-scripts >= 0.2.0
 Requires:      %{name} = %{version}
 Requires(post):        fileutils
 
@@ -238,7 +243,7 @@ jakiej
 %package -n iconv
 Summary:       Convert encoding of given files from one encoding to another
 Summary(pl):   Program do konwersji plików tekstowych z jednego kodowania do innego
-Group:         Daemons
+Group:         Applications/Text
 Requires:      %{name} = %{version}
 
 %description -n iconv
@@ -432,44 +437,45 @@ Zabawka.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
-%patch7 -p1
-#%patch8 -p1
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
+%patch14 -p1
 
 chmod +x scripts/cpp
 
 %build
+mkdir builddir
+cd builddir
+# avoid stripping ld.so by -s in rpmldflags
 LDFLAGS=" " ; export LDFLAGS
-if [ -f %{_pkgconfigdir}/libpng12.pc ] ; then
-       CPPFLAGS="`pkg-config libpng12 --cflags`"
-fi
 %configure2_13 \
        --enable-add-ons=linuxthreads \
        --enable-kernel="%{?kernel:%{kernel}}%{!?kernel:%{min_kernel}}" \
        --enable-profile \
        --disable-omitfp
+# problem compiling with --enable-bounded (must be reported to libc-alpha)
 
-%{__make}
-
-# this need improvements (like building agains new builded glibc) but works
-%{__cc} -o postshell %{!?debug:-s} %{SOURCE7}
+%{__make} %{parallelmkflags}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_mandir}/man{3,8},/var/log}
 
+cd builddir
+
 env LANGUAGE=C LC_ALL=C \
 %{__make} install \
+       %{parallelmkflags} \
        install_root=$RPM_BUILD_ROOT \
        infodir=%{_infodir} \
        mandir=%{_mandir}
 
 env LANGUAGE=C LC_ALL=C \
-%{__make} install-locales -C localedata \
+%{__make} localedata/install-locales \
+       %{parallelmkflags} \
        install_root=$RPM_BUILD_ROOT
 
 PICFILES="libc_pic.a libc.map
@@ -480,67 +486,105 @@ install $PICFILES                                $RPM_BUILD_ROOT%{_libdir}
 install elf/soinit.os                          $RPM_BUILD_ROOT%{_libdir}/soinit.o
 install elf/sofini.os                          $RPM_BUILD_ROOT%{_libdir}/sofini.o
 
+install elf/postshell                          $RPM_BUILD_ROOT/sbin
+
 mv -f $RPM_BUILD_ROOT/lib/libmemusage.so       $RPM_BUILD_ROOT%{_libdir}
 mv -f $RPM_BUILD_ROOT/lib/libpcprofile.so      $RPM_BUILD_ROOT%{_libdir}
 
-%{__make} -C linuxthreads/man
-install linuxthreads/man/*.3thr                        $RPM_BUILD_ROOT%{_mandir}/man3
+%{__make} -C ../linuxthreads/man
+install ../linuxthreads/man/*.3thr                     $RPM_BUILD_ROOT%{_mandir}/man3
 
 rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/{localtime,posixtime,posixrules}
 
-ln -sf ../../..%{_sysconfdir}/localtime                $RPM_BUILD_ROOT%{_datadir}/zoneinfo/localtime
-ln -sf localtime                               $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixtime
-ln -sf localtime                               $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules
-ln -sf ../..%{_libdir}/libbsd-compat.a         $RPM_BUILD_ROOT%{_libdir}/libbsd.a
+ln -sf %{_sysconfdir}/localtime        $RPM_BUILD_ROOT%{_datadir}/zoneinfo/localtime
+ln -sf localtime               $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixtime
+ln -sf localtime               $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules
+ln -sf libbsd-compat.a         $RPM_BUILD_ROOT%{_libdir}/libbsd.a
 
 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime
 
+# make symlinks across top-level directories absolute
+for l in anl BrokenLocale crypt dl m nsl pthread resolv rt thread_db util ; do
+       rm -f $RPM_BUILD_ROOT%{_libdir}/lib${l}.so
+       ln -sf /lib/`cd $RPM_BUILD_ROOT/lib ; echo lib${l}.so.*` $RPM_BUILD_ROOT%{_libdir}/lib${l}.so
+done
+
 install %{SOURCE2}             $RPM_BUILD_ROOT/etc/rc.d/init.d/nscd
 install %{SOURCE3}             $RPM_BUILD_ROOT/etc/sysconfig/nscd
 install %{SOURCE4}             $RPM_BUILD_ROOT/etc/logrotate.d/nscd
-install nscd/nscd.conf         $RPM_BUILD_ROOT%{_sysconfdir}
-install nss/nsswitch.conf      $RPM_BUILD_ROOT%{_sysconfdir}
+install ../nscd/nscd.conf      $RPM_BUILD_ROOT%{_sysconfdir}
+install ../nss/nsswitch.conf   $RPM_BUILD_ROOT%{_sysconfdir}
 
 bzip2 -dc %{SOURCE5} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 bzip2 -dc %{SOURCE6} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.cache
 > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf
-rm -f %{_mandir}/hu/man7/man.7
+rm -f $RPM_BUILD_ROOT%{_mandir}/hu/man7/man.7
 
 :> $RPM_BUILD_ROOT/var/log/nscd
 
-rm -rf documentation
-install -d documentation
+rm -rf ../documentation
+install -d ../documentation
 
-cp -f linuxthreads/ChangeLog documentation/ChangeLog.threads
-cp -f linuxthreads/Changes documentation/Changes.threads
-cp -f linuxthreads/README documentation/README.threads
-cp -f crypt/README.ufc-crypt documentation/
+cp -f ../linuxthreads/ChangeLog ../documentation/ChangeLog.threads
+cp -f ../linuxthreads/Changes ../documentation/Changes.threads
+cp -f ../linuxthreads/README ../documentation/README.threads
+cp -f ../crypt/README.ufc-crypt ../documentation/
 
-cp -f ChangeLog documentation
+cp -f ../ChangeLog* ../documentation
 
 rm -f $RPM_BUILD_ROOT%{_libdir}/libnss_*.so
 
-gzip -9nf README NEWS FAQ BUGS NOTES PROJECTS documentation/*
-
 # strip ld.so with --strip-debug only (other ELFs are stripped by rpm):
 %{!?debug:strip -g -R .comment -R .note $RPM_BUILD_ROOT/lib/ld-%{version}.so}
 
 # Collect locale files and mark them with %%lang()
-rm -f glibc.lang
+rm -f ../glibc.lang
 for i in $RPM_BUILD_ROOT%{_datadir}/locale/* $RPM_BUILD_ROOT%{_libdir}/locale/* ; do
        if [ -d $i ]; then
                lang=`echo $i | sed -e 's/.*locale\///' -e 's/\/.*//'`
+               twochar=1
+               # list of long %%lang values we do support
+               for j in de_AT de_BE de_CH de_LU ja_JP.SJIS ko_KR.utf8 pt_BR \
+                        zh_CN zh_CN.gbk zh_HK zh_TW ; do
+                       if [ $j = "$lang" ]; then
+                               twochar=
+                       fi
+               done
+               if [ -n "$twochar" ]; then
+                       if [ `echo $lang | sed "s,_.*,,"` = "zh" ]; then
+                               lang=`echo $lang | sed "s,\..*,,"`
+                       else
+                               lang=`echo $lang | sed "s,_.*,,"`
+                       fi 
+               fi      
                dir=`echo $i | sed "s#$RPM_BUILD_ROOT##"`
-               echo "%lang($lang) $dir" >> glibc.lang
+               echo "%lang($lang) $dir" >> ../glibc.lang
+       fi
+done
+for i in af az bg de_AT el en eo es_ES et eu fi gr he hr hu id is ja_JP.SJIS \
+         lt lv ms nn pt ro ru sl sr ta uk wa zh_CN ; do
+       if [ ! -d $RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_MESSAGES ]; then
+               install -d $RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_MESSAGES
+               lang=`echo $i | sed -e 's/_.*//'`
+               echo "%lang($lang) %{_datadir}/locale/$i" >> ../glibc.lang
        fi
 done
+install %{SOURCE7} $RPM_BUILD_ROOT%{_mandir}/man8
 
-install -m755 postshell $RPM_BUILD_ROOT/sbin
+# shutup check-files
+rm -f $RPM_BUILD_ROOT/%{_mandir}/README.*
+rm -f $RPM_BUILD_ROOT/%{_mandir}/diff.*
+rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
+# we don't support kernel without ptys support
+rm -f $RPM_BUILD_ROOT/%{_libdir}/pt_chown
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+# don't run iconvconfig in %%postun -n iconv because iconvconfig doesn't exist
+# when %%postun is run
+
 %post  -p /sbin/postshell
 /sbin/ldconfig
 -/sbin/telinit u
@@ -552,8 +596,7 @@ rm -rf $RPM_BUILD_ROOT
 %post  memusage -p /sbin/ldconfig
 %postun memusage -p /sbin/ldconfig
 
-%post iconv -p %{_sbindir}/iconvconfig
-# not run iconvconfig in %%postun iconv because iconvconfig don't exist when %%postun is runned
+%post -n iconv -p %{_sbindir}/iconvconfig
 
 %post devel
 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
@@ -580,7 +623,7 @@ fi
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc {README,NEWS,FAQ,BUGS}.gz
+%doc README NEWS FAQ BUGS
 
 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/ld.so.conf
 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/nsswitch.conf
@@ -615,6 +658,7 @@ fi
 %{_datadir}/zoneinfo
 
 %dir %{_libdir}/locale
+%{_libdir}/locale/locale-archive
 
 %{_mandir}/man1/[^lsg]*
 %{_mandir}/man1/getent.1*
@@ -681,7 +725,7 @@ fi
 
 %files devel
 %defattr(644,root,root,755)
-%doc documentation/* {NOTES,PROJECTS}.gz
+%doc documentation/* NOTES PROJECTS
 %attr(755,root,root) %{_bindir}/gencat
 %attr(755,root,root) %{_bindir}/getconf
 %attr(755,root,root) %{_bindir}/*prof*
@@ -691,9 +735,14 @@ fi
 
 %{_infodir}/libc.info*
 
-%attr(755,root,root) %{_libdir}/lib*.so
+%attr(755,root,root) %{_libdir}/lib[^m]*.so
+%attr(755,root,root) %{_libdir}/libm.so
 %attr(755,root,root) %{_libdir}/*crt*.o
+%{_libdir}/libbsd-compat.a
+%{_libdir}/libbsd.a
 %{_libdir}/libc_nonshared.a
+%{_libdir}/libg.a
+%{_libdir}/libieee.a
 %{_libdir}/librpcsvc.a
 
 %{_mandir}/man1/getconf*
@@ -747,13 +796,9 @@ fi
 %defattr(644,root,root,755)
 %{_libdir}/libanl.a
 %{_libdir}/libBrokenLocale.a
-%{_libdir}/libbsd-compat.a
-%{_libdir}/libbsd.a
 %{_libdir}/libc.a
 %{_libdir}/libcrypt.a
 %{_libdir}/libdl.a
-%{_libdir}/libg.a
-%{_libdir}/libieee.a
 %{_libdir}/libm.a
 %{_libdir}/libmcheck.a
 %{_libdir}/libnsl.a
This page took 0.053016 seconds and 4 git commands to generate.