1 |
pappy 07/11/27 19:06:28 |
2 |
|
3 |
Added: gxslibc-2.6.1.ebuild |
4 |
Log: |
5 |
adding preliminary versions of ebuild, patch, profile for GXS glibc and documentation about linkers |
6 |
|
7 |
Revision Changes Path |
8 |
1.1 extreme-security/integration/branches/pappy001/gxslibc/ebuild/gxslibc-2.6.1.ebuild |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/extreme-security/integration/branches/pappy001/gxslibc/ebuild/gxslibc-2.6.1.ebuild?rev=1.1&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/extreme-security/integration/branches/pappy001/gxslibc/ebuild/gxslibc-2.6.1.ebuild?rev=1.1&content-type=text/plain |
12 |
|
13 |
Index: gxslibc-2.6.1.ebuild |
14 |
=================================================================== |
15 |
# Copyright 1999-2007 Gentoo Foundation |
16 |
# Distributed under the terms of the GNU General Public License v2 |
17 |
# $Header: /var/cvsroot/gentoo-projects/extreme-security/integration/branches/pappy001/gxslibc/ebuild/gxslibc-2.6.1.ebuild,v 1.1 2007/11/27 19:06:28 pappy Exp $ |
18 |
# |
19 |
# the main installation routine and patches |
20 |
# from http://www.linuxfromscratch.org/hlfs |
21 |
# plus a little extra loving for ssp compat |
22 |
# and ssp extreme security protection: sspx |
23 |
|
24 |
DESCRIPTION="GXS GNU libc6" |
25 |
HOMEPAGE="http://www.gentoo.org/proj/en/extreme-security/" |
26 |
|
27 |
KERNELVER="2.6.0" |
28 |
GXSVER="0.01" |
29 |
|
30 |
GXS_MIRROR="http://dev.extreme-security.net:22080/gxs001" |
31 |
GNU_MIRROR="http:///dev.extreme-security.net:22080/mirror/ftp.gnu.org/gnu" |
32 |
|
33 |
SRC_URI="${SRC_URI} ${GNU_MIRROR}/glibc/glibc-${PV}.tar.bz2" |
34 |
SRC_URI="${SRC_URI} ${GXS_MIRROR}/patches/glibc-${PV}-gxs-${GXSVER}.bz2" |
35 |
|
36 |
LICENSE="LGPL-2" |
37 |
SLOT="0" |
38 |
KEYWORDS="x86 amd64 -*" |
39 |
IUSE="" |
40 |
|
41 |
pkg_setup() { |
42 |
export CHOST="i686-pc-linux-gnu" |
43 |
export CFLAGS="-O2 -pipe" |
44 |
export CXXFLAGS="${CFLAGS}" |
45 |
|
46 |
export CPPFLAGS="" |
47 |
export ASFLAGS="" |
48 |
export LDFLAGS="" |
49 |
|
50 |
if [[ "x${MAKEOPTS}y" == "xy" ]] |
51 |
then |
52 |
export MAKEOPTS="-j2" |
53 |
fi |
54 |
|
55 |
einfo "using CHOST:${CHOST} " \ |
56 |
"C(XX)FLAGS:${CFLAGS}:${CXXFLAGS} " \ |
57 |
"MAKEOPTS:${MAKEOPTS}" |
58 |
} |
59 |
|
60 |
src_compile() { |
61 |
cd "${WORKDIR}/glibc-${PV}" |
62 |
|
63 |
patch --silent -p1 < \ |
64 |
"${WORKDIR}/glibc-${PV}-gxs-${GXSVER}" || \ |
65 |
die "gxs patch" |
66 |
|
67 |
mkdir -p "${WORKDIR}/glibc-build" |
68 |
cd "${WORKDIR}/glibc-build" |
69 |
|
70 |
"${WORKDIR}/glibc-${PV}/configure" \ |
71 |
--target="${CHOST}" \ |
72 |
--prefix=/usr \ |
73 |
--enable-bind-now \ |
74 |
--without-gd \ |
75 |
--disable-profile \ |
76 |
--enable-add-ons=nptl \ |
77 |
--without-selinux \ |
78 |
--with-tls \ |
79 |
--with-__thread \ |
80 |
--enable-kernel="${KERNELVER}" \ |
81 |
--without-cvs || die "configuration failed" |
82 |
|
83 |
make || die "compile failed" |
84 |
} |
85 |
|
86 |
src_install() { |
87 |
cd "${WORKDIR}/glibc-build" |
88 |
|
89 |
make install_root="${D}" install || die "make install failed" |
90 |
|
91 |
# NOTE: for installing all glibc locales in the binpackage, |
92 |
# NOTE: make install_root="${D}" localedata/install-locales |
93 |
|
94 |
insinto /etc |
95 |
|
96 |
local configfiles="${WORKDIR}/glibc-${PV}/gentoo" |
97 |
|
98 |
# install the locale-gen helper utility and config file |
99 |
dosbin "${configfiles}/locale/locale-gen" || \ |
100 |
die "locale-gen helper script could not be installed" |
101 |
|
102 |
doins "${configfiles}/locale/locale.gen" || \ |
103 |
die "locale.gen config file could not be installed" |
104 |
|
105 |
# install the nscd startup script |
106 |
doinitd "${configfiles}/etc/nscd" || \ |
107 |
die "nscd run level startup script could not be installed" |
108 |
|
109 |
# install the config files for glibc |
110 |
doins "${configfiles}"/etc/*.conf || \ |
111 |
die "glibc config files could not be installed" |
112 |
|
113 |
# make sure the localtime is not overwritten by glibc emerges |
114 |
rm "${D}/etc/localtime" |
115 |
} |
116 |
|
117 |
# NOTE: the locales are not in the .tbz2 file of the binpackage |
118 |
# NOTE: but will be generated in the postinst routine from here |
119 |
pkg_postinst() { |
120 |
# make sure the file exists on the installed system |
121 |
touch "${ROOT}/ld.so.conf" |
122 |
|
123 |
# install locales (logic taken from sys-libs/glibc) |
124 |
local locale_list="${ROOT}/etc/locale.gen" |
125 |
if [[ -z $(locale-gen --list --config "${locale_list}") ]] |
126 |
then |
127 |
locale_list="${ROOT}/usr/share/i18n/SUPPORTED" |
128 |
fi |
129 |
|
130 |
# find the number of jobs available |
131 |
local x jobs |
132 |
for x in ${MAKEOPTS} ; do [[ "${x}" == -j* ]] && jobs=${x#-j} ; done |
133 |
|
134 |
# generate the locales |
135 |
locale-gen -j ${jobs:-2} --config "${locale_list}" |
136 |
|
137 |
# set the timezone automatically if not found |
138 |
if [[ ! -f "${ROOT}/etc/localtime" ]] |
139 |
then |
140 |
einfo "timezone not found: setting timezone to UTC" |
141 |
cp --remove-destination \ |
142 |
"${ROOT}/usr/share/zoneinfo/UTC" \ |
143 |
"${ROOT}/etc/localtime" |
144 |
fi |
145 |
} |
146 |
|
147 |
|
148 |
|
149 |
|
150 |
-- |
151 |
gentoo-commits@g.o mailing list |