Check-in [07e806db4e]
Overview
Comment:Added package building branch
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | packages
Files: files | file ages | folders
SHA1: 07e806db4e87e864c4191a55839f04ca82bdc06c
User & Date: rkeene on 2014-09-18 04:43:37
Other Links: branch diff | manifest | tags
Context
2014-09-18
04:44
Removed extraneous set -x check-in: d4ba91a7e9 user: rkeene tags: packages
04:43
Added package building branch check-in: 07e806db4e user: rkeene tags: packages
2014-09-16
18:21
Removed blank line check-in: 17bbfdc417 user: rkeene tags: trunk
Changes

Added packages/build version [e94c49a608].















































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
#! /usr/bin/env bash

pkg="$(echo "$1" | sed 's@/*$@@;s@^\.*/*@@')"

if [ -z "${pkg}" ]; then
	echo "Usage: build <package>" 2>&1

	exit 1
fi

function determineOsArch() {
	os="$(uname -s | dd conv=lcase 2>/dev/null)"
	arch="$(uname -m | dd conv=lcase 2>/dev/null)"

	case "${arch}" in
		i?86)
			arch='ix86'
			;;
	esac
}

function determinePrefix() {
	determineOsArch

	prefixsuffix="${pkg}/${os}-${arch}/${version}"
	prefix="/opt/appfs/${domain}/${prefixsuffix}"
	destdir="$(pwd)/INST"

	mkdir "${destdir}" || die
}

function preconfigure() {
	:
}

function postconfigure() {
	:
}

function configure() {
	dynlinker=/opt/appfs/
DYNLINKER=/uri/0install/sw.oc9.org/`readlink /uri/0install/sw.oc9.org/lib/ld-linux.so.2 | sed s@^\.\./@@`
LDFLAGS="-march=i486 ${ZEXTRALIB} -L/uri/0install/sw.oc9.org/lib -Wl,--rpath -Wl,/uri/0install/sw.oc9.org/lib -Wl,--dynamic-linker -Wl,${DYNLINKER}"
CXXINCLUDES=/uri/0install/sw.oc9.org/include/c++/`ls -1 /uri/0install/sw.oc9.org/include/c++ | sed  's@.*@&. |&@;s@\(|.*\)\(\.\)@\1,@g;s@^@.@;s@\.@..@g;s@\.\([0-9]\)\.@.00\1\.@g;s@\.\([0-9][0-9]\)\.@.0\1.@g;s
@\.\.@.@g;s@^\.@@;s@\.$@@' | sort | tail -1 | cut -f 2- -d '|' | sed s@,@.@g`

echo "CFLAGS='-march=i486 ${ZEXTRAINC} -I/uri/0install/sw.oc9.org/include'"
echo "CXXFLAGS='-march=i486 ${ZEXTRAINC} -I${CXXINCLUDES} -I${CXXINCLUDES}/i486-pc-linux-gnu'"
echo "CPPFLAGS='${ZEXTRAINC} -I/uri/0install/sw.oc9.org/include -I${CXXINCLUDES} -I${CXXINCLUDES}/i486-pc-linux-gnu'"
echo "LDFLAGS='${LDFLAGS}'"
echo "CC='gcc'"
echo "PATH='${ZEXTRAPATH}:/uri/0install/sw.oc9.org/bin:`fix_path ${PATH} sw.oc9.org`'" | fix_path
echo "LD_RUN_PATH='${ZBUILDPATH}:/uri/0install/sw.oc9.org/lib:`fix_path ${LD_RUN_PATH} sw.oc9.org`'" | fix_path
echo "LD_LIBRARY_PATH='/uri/0install/sw.oc9.org/lib:`fix_path ${LD_LIBRARY_PATH} sw.oc9.org`'" | fix_path
echo "PKG_CONFIG_PATH='${ZBUILDPATH}/lib/pkgconfig:/uri/0install/sw.oc9.org/lib/pkgconfig:`fix_path ${PKG_CONFIG_PATH} sw.oc9.org`'" | fix_path
echo "MANPATH='${ZBUILDPATH}/man:/uri/0install/sw.oc9.org/man:`fix_path ${MANPATH} sw.oc9.org`'" | fix_path
echo "export CFLAGS CPPFLAGS LDFLAGS PATH LD_LIBRARY_PATH LD_RUN_PATH PKG_CONFIG_PATH MANPATH CC"

	./configure --prefix="${prefix}" --sysconfdir=/etc --localstatedir=/var
}

function prebuild() {
	:
}

function postbuild() {
	:
}

function build() {
	grep "DESTDIR" Makefile || die "Don't know how to build this software"

	make
}

function preinstall() {
	:
}

function postinstall() {
	:
}

function install() {
	make install DESTDIR="${destdir}"
}

function cleanup() {
	cd "${workdir}" || exit 1
	cd .. || exit 1
	rm -rf "${workdir}"
}

function die() {
	local message

	message="$1"

	if [ -n "${message}" ]; then
		echo "error: ${message}" >&2
	fi

	cleanup

	exit 1
}

cd "$(dirname "$(which "$0")")" || exit 1

if [ -f 'build.conf' ]; then
	. 'build.conf'
fi

if [ -d "pkgs/${pkg}" ]; then
	pkgdir="pkgs/${pkg}"
	pkgfile="${pkgdir}/info"
else
	pkgfile="pkgs/${pkg}"
	pkgdir="${pkgfile}"
fi
pkgdate="$(find "${pkgdir}" -type f -printf '%TY%Tm%Td%TH%TM.%TS\n' | cut -f 1-2 -d '.' | sort -n | tail -n 1)"

. "${pkgfile}"

archivedir="$(pwd)/ARCHIVE"
workdir="workdir-$$${RANDOM}${RANDOM}${RANDOM}"
mkdir "${workdir}" "${archivedir}"
cd "${workdir}" || exit 1
workdir="$(pwd)"

# Download
## Cleanup
rm -f src.new src

## Fetch file
wget -O src.new "${url}" || exit 1

## Verify signature
### XXX:TODO

## Move file into place
mv src.new src

# Decompress archive
## Determine type of archive
case "${url}" in
	*.tar.xz|*.tar.xz'?'*|*.txz)
		decompress='xz'
		;;
	*.tar.gz|*.tar.gz'?'*|*.tgz)
		decompress='gzip'
		;;
	*.tar.bz2|*.tar.bz2'?'*|*.tbz2)
		decompress='bzip2'
		;;
	*.zip|*.zip'?'*)
		decompress='unzip'
		;;
	*)
		echo "Unknown compression method: ${url}" >&2

		exit 1
		;;
esac

## Do decompression
case "${decompress}" in
	unzip)
		unzip 'src' || die 'Unable to uncompress archive'
		;;
	*)
		"${decompress}" -dc src | tar -xf - || die 'Unable to uncompress archive'
		;;
esac

## Cleanup source
rm -f src

# If we just have one directory, use that directory
dir="$(echo *)"
if [ -e "${dir}" ]; then
	mv "${dir}"/* .
fi

# Start logging
set -x

# Determine properties
determinePrefix

# Start the build
preconfigure || die 'preconfigure failed'
configure || die 'configure failed'
postconfigure || die 'postconfigure failed'

prebuild || die 'prebuild failed'
build || die 'build failed'
postbuild || die 'postbuild failed'

preinstall || die 'preinstall failed'
install || die 'install failed'
postinstall || die 'postinstall failed'

(
	appdir="$(appfsinstalldir)/${prefixsuffix}"
	mkdir -p "${appdir}"

	cd "${destdir}/${prefix}" || exit 1
	cp -rp * "${appdir}"
	find "${appdir}" -print0 | xargs -0 touch -t "${pkgdate}"
)

cleanup

exit 0

Added packages/build.conf version [501534cf12].





























>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
domain=rkeene.org
function appfsinstalldir() {
	case "${domain}" in
		rkeene.org)
			echo "/web/rkeene/appfs/applications"
			;;
		appfs.rkeene.org)
			echo "/web/customers/appfs.rkeene.org/appfs/applications"
			;;
		core.appfs.rkeene.org)
			echo "/web/static/core.appfs.rkeene.org/appfs/applications"
			;;
	esac
}

Added packages/pkgs/glibc version [50a79e3634].

































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /usr/bin/env bash

version=2.20
url="http://ftp.gnu.org/gnu/glibc/glibc-${version}.tar.xz"
domain=core.appfs.rkeene.org
sha256=''

function configure() {
        set -x
	mkdir BUILD
	cd BUILD

	../configure --prefix="${prefix}" --sysconfdir=/etc --localstatedir=/var || return 1

	echo '# Ignore: DESTDIR' >> Makefile
}

Added packages/pkgs/readline version [28079f5c74].













>
>
>
>
>
>
1
2
3
4
5
6
#! /usr/bin/env bash

version=6.3
url="https://ftp.gnu.org/gnu/readline/readline-${version}.tar.gz"
domain=core.appfs.rkeene.org
sha256=''