| 1 | Summary: GNU C Library |
|---|
| 2 | Name: glibc |
|---|
| 3 | Version: 2.11 |
|---|
| 4 | Release: 1 |
|---|
| 5 | Group: System Environment/Base |
|---|
| 6 | License: GPLv2 |
|---|
| 7 | Distribution: LightCube OS |
|---|
| 8 | Vendor: LightCube Solutions |
|---|
| 9 | URL: http://www.gnu.org/software/libc |
|---|
| 10 | Source0: http://dev.lightcube.us/~jhuntwork/sources/%{name}/%{name}-%{version}.tar.bz2 |
|---|
| 11 | |
|---|
| 12 | Requires: base-files |
|---|
| 13 | BuildRequires: digest(%{SOURCE0}) = 2c990f97e9ff9fb1c3c85fe826e991b9 |
|---|
| 14 | |
|---|
| 15 | %description |
|---|
| 16 | The system C library which defines run-time functions for all |
|---|
| 17 | C-based software installed in the system. |
|---|
| 18 | |
|---|
| 19 | %package devel |
|---|
| 20 | Summary: Headers, object files and utilities for development using C libraries |
|---|
| 21 | Group: Development/Libraries |
|---|
| 22 | Requires: %{name} = %{version}-%{release}, texinfo |
|---|
| 23 | Requires: linux-headers |
|---|
| 24 | |
|---|
| 25 | %description devel |
|---|
| 26 | The %{name}-devel package contains the object files necessary for |
|---|
| 27 | developing programs which use the standard C libraries (which are used |
|---|
| 28 | by nearly all programs). If you are developing programs which will use |
|---|
| 29 | the standard C libraries, your system needs to have these standard |
|---|
| 30 | object files available in order to create the executables. |
|---|
| 31 | |
|---|
| 32 | %prep |
|---|
| 33 | rm -rf glibc-build |
|---|
| 34 | %setup -q -n glibc-%{version} |
|---|
| 35 | |
|---|
| 36 | %build |
|---|
| 37 | sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED |
|---|
| 38 | sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in |
|---|
| 39 | mkdir ../glibc-build |
|---|
| 40 | cd ../glibc-build |
|---|
| 41 | %ifarch i686 |
|---|
| 42 | echo "CFLAGS += -march=i486 -mtune=i686" > configparms |
|---|
| 43 | %endif |
|---|
| 44 | %if "%{_lib}" != "lib" |
|---|
| 45 | echo "slibdir=/lib64" > configparms |
|---|
| 46 | %endif |
|---|
| 47 | ../glibc-%{version}/configure --prefix=/usr \ |
|---|
| 48 | --disable-profile --enable-add-ons \ |
|---|
| 49 | --enable-kernel=2.6.18 --libexecdir=/usr/%{_lib}/glibc \ |
|---|
| 50 | --libdir=/usr/%{_lib} |
|---|
| 51 | make |
|---|
| 52 | |
|---|
| 53 | %install |
|---|
| 54 | install -dv %{buildroot}/etc |
|---|
| 55 | touch %{buildroot}/etc/ld.so.conf |
|---|
| 56 | cd ../glibc-build |
|---|
| 57 | make install_root=%{buildroot} install |
|---|
| 58 | make install_root=%{buildroot} localedata/install-locales |
|---|
| 59 | rm -f %{buildroot}%{_infodir}/dir |
|---|
| 60 | cat > %{buildroot}/etc/nsswitch.conf << "EOF" |
|---|
| 61 | # Begin /etc/nsswitch.conf |
|---|
| 62 | |
|---|
| 63 | passwd: files |
|---|
| 64 | group: files |
|---|
| 65 | shadow: files |
|---|
| 66 | |
|---|
| 67 | hosts: files dns |
|---|
| 68 | networks: files |
|---|
| 69 | |
|---|
| 70 | protocols: files |
|---|
| 71 | services: files |
|---|
| 72 | ethers: files |
|---|
| 73 | rpc: files |
|---|
| 74 | |
|---|
| 75 | # End /etc/nsswitch.conf |
|---|
| 76 | EOF |
|---|
| 77 | cat > %{buildroot}/etc/ld.so.conf << "EOF" |
|---|
| 78 | # Begin /etc/ld.so.conf |
|---|
| 79 | |
|---|
| 80 | /usr/local/lib |
|---|
| 81 | /opt/lib |
|---|
| 82 | |
|---|
| 83 | # End /etc/ld.so.conf |
|---|
| 84 | EOF |
|---|
| 85 | rm -f %{buildroot}/usr/share/info/dir |
|---|
| 86 | %find_lang libc |
|---|
| 87 | |
|---|
| 88 | %post -p /sbin/ldconfig |
|---|
| 89 | %postun -p /sbin/ldconfig |
|---|
| 90 | |
|---|
| 91 | %post devel |
|---|
| 92 | /usr/bin/install-info %{_infodir}/libc.info %{_infodir}/dir |
|---|
| 93 | |
|---|
| 94 | %preun devel |
|---|
| 95 | /usr/bin/install-info --delete %{_infodir}/libc.info %{_infodir}/dir |
|---|
| 96 | |
|---|
| 97 | %clean |
|---|
| 98 | rm -rf %{buildroot} |
|---|
| 99 | rm -rf glibc-build |
|---|
| 100 | |
|---|
| 101 | %files -f ../glibc-build/libc.lang |
|---|
| 102 | %defattr(-,root,root) |
|---|
| 103 | /etc/ld.so.cache |
|---|
| 104 | /etc/ld.so.conf |
|---|
| 105 | /etc/localtime |
|---|
| 106 | /etc/nsswitch.conf |
|---|
| 107 | /etc/rpc |
|---|
| 108 | /%{_lib}/* |
|---|
| 109 | /sbin/* |
|---|
| 110 | /usr/bin/catchsegv |
|---|
| 111 | /usr/bin/gencat |
|---|
| 112 | /usr/bin/getconf |
|---|
| 113 | /usr/bin/getent |
|---|
| 114 | /usr/bin/iconv |
|---|
| 115 | /usr/bin/ldd |
|---|
| 116 | %ifarch i686 |
|---|
| 117 | /usr/bin/lddlibc4 |
|---|
| 118 | %endif |
|---|
| 119 | /usr/bin/locale |
|---|
| 120 | /usr/bin/localedef |
|---|
| 121 | /usr/bin/mtrace |
|---|
| 122 | /usr/bin/pcprofiledump |
|---|
| 123 | /usr/bin/rpcgen |
|---|
| 124 | /usr/bin/sprof |
|---|
| 125 | /usr/bin/tzselect |
|---|
| 126 | /usr/bin/xtrace |
|---|
| 127 | /usr/%{_lib}/glibc |
|---|
| 128 | /usr/%{_lib}/gconv |
|---|
| 129 | /usr/%{_lib}/locale |
|---|
| 130 | /usr/share/locale/locale.alias |
|---|
| 131 | /usr/sbin/* |
|---|
| 132 | /usr/share/zoneinfo/* |
|---|
| 133 | /usr/share/i18n |
|---|
| 134 | |
|---|
| 135 | %files devel |
|---|
| 136 | %defattr(-,root,root) |
|---|
| 137 | /usr/include/* |
|---|
| 138 | /usr/%{_lib}/*.o |
|---|
| 139 | /usr/%{_lib}/*.a |
|---|
| 140 | /usr/%{_lib}/*.so |
|---|
| 141 | /usr/share/info/libc* |
|---|
| 142 | |
|---|
| 143 | %changelog |
|---|
| 144 | * Fri Dec 25 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - |
|---|
| 145 | - Updated to version 2.11, first build on PowerPC |
|---|
| 146 | |
|---|
| 147 | * Fri Oct 23 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - |
|---|
| 148 | - Updated to build with binutils 2.20 and gcc 4.4.2 |
|---|
| 149 | |
|---|
| 150 | * Sat Jul 18 2009 Jeremy Huntwork <jhuntwork@lightcubesolutions.com> - |
|---|
| 151 | - Initial version |
|---|