Check-in [76afe82d98]
Overview
Comment:Added support for prerequisities
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | packages
Files: files | file ages | folders
SHA1:76afe82d9824f83ee3661c6dfe418612e0f4f99b
User & Date: rkeene on 2014-11-04 04:23:32
Other Links: manifest | tags
Context
2014-11-05
19:41
More work towards making a build script to build working software check-in: a6c3672582 user: rkeene tags: packages
2014-11-04
04:23
Added support for prerequisities check-in: 76afe82d98 user: rkeene tags: packages
03:36
Added binutils package check-in: ae6503b810 user: rkeene tags: packages
Changes

Modified build from [d401f36a65] to [ab96518e6b].

14
15
16
17
18
19
20


























































21
22
23
24
25
26
27
..
53
54
55
56
57
58
59
60
61
62

63
64
65
66
67
68
69
70
...
210
211
212
213
214
215
216




217
218
219
220
221
222
223
pkg="$(echo "$1" | sed 's@/*$@@;s@^\.*/*@@')"

if [ -z "${pkg}" ]; then
	echo "Usage: build [--cpio] <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)
................................................................................
	glibcdir="/opt/appfs/core.appfs.rkeene.org/glibc/platform/${glibcvers}"
	dynlinker="$(ls "${glibcdir}"/lib/ld-linux*.so.* | tail -n 1)"

	if [ ! -d "${glibcdir}" ]; then
		die 'glibc directory is not available (appfs running/working?)'
	fi

	CFLAGS="-I${glibcdir}/include"
	CPPFLAGS="-I${glibcdir}/include"
	LDFLAGS="-Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}"

	export CFLAGS CPPFLAGS LDFLAGS

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

function prebuild() {
	:
}
................................................................................

# 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







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
|
|
>
|







 







>
>
>
>







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
...
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
pkg="$(echo "$1" | sed 's@/*$@@;s@^\.*/*@@')"

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

	exit 1
fi

function verifyRequiredPackages() {
	local pkg pkgdomain pkgversion
	local pkgdir pkgconfigdir pkgfound

	for pkg in "${require[@]}"; do
		pkgdomain=''
		pkgversion=''

		case "${pkg}" in
			*/*@*)
				pkgdomain="$(echo "${pkg}" | cut -f 2 -d '@')"
				pkgversion="$(echo "${pkg}" | cut -f 2 -d '/' | cut -f 1 -d '@')"
				pkg="$(echo "${pkg}" | cut -f 1 -d '/')"
				;;
			*/*)
				pkgversion="$(echo "${pkg}" | cut -f 2 -d '/')"
				pkg="$(echo "${pkg}" | cut -f 1 -d '/')"
				;;
			*@*)
				pkgdomain="$(echo "${pkg}" | cut -f 2 -d '@')"
				pkg="$(echo "${pkg}" | cut -f 1 -d '@')"
				;;
		esac

		if [ -z "${pkgdomain}" ]; then
			pkgdomain="${domain}"
		fi

		pkgfound='0'
		for pkgdir in "/opt/appfs/${pkgdomain}/${pkg}/platform"/${pkgversion:-*}; do
			pkgconfigdir="${pkgdir}/lib/pkgconfig"

			if [ -d "${pkgdir}" ]; then
				pkgfound='1'
			fi

			CFLAGS="${CFLAGS} -I${pkgdir}/include"
			CPPFLAGS="${CPPFLAGS} -I${pkgdir}/include"
			LDFLAGS="${LDFLAGS} -L${pkgdir}/lib"
			export CFLAGS CPPFLAGS LDFLAGS

			if [ -d "${pkgconfigdir}" ]; then
				PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${pkgconfigdir}"
				export PKG_CONFIG_PATH
			fi

		done

		if [ "${pkgfound}" = '0' ]; then
			die "Package ${pkg}/${pkgversion:-*}@${pkgdomain} not found."
		fi
	done
}

function verifyPrerequisites() {
	:
}

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)
................................................................................
	glibcdir="/opt/appfs/core.appfs.rkeene.org/glibc/platform/${glibcvers}"
	dynlinker="$(ls "${glibcdir}"/lib/ld-linux*.so.* | tail -n 1)"

	if [ ! -d "${glibcdir}" ]; then
		die 'glibc directory is not available (appfs running/working?)'
	fi

	CFLAGS="${CFLAGS} -I${glibcdir}/include"
	CPPFLAGS="${CPPFLAGS} -I${glibcdir}/include"
	LDFLAGS="${LDFLAGS} -Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}"
	PKG_CONFIG_LIBDIR="${glibcdir}/lib/pkgconfig"
	export CFLAGS CPPFLAGS LDFLAGS PKG_CONFIG_LIBDIR

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

function prebuild() {
	:
}
................................................................................

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

# Verify pre-requisites are met
verifyRequiredPackages || die 'Required packages missing'
verifyPrerequisites || die 'Prerequisities failed'

# Start logging
set -x

# Determine properties
determinePrefix

# Start the build

Modified pkgs/binutils from [82677bde0b] to [c2b1e3701b].

1
2
3
4
5
6

#! /usr/bin/env bash

version=2.24
url="http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.gz"
domain=core.appfs.rkeene.org
sha256='4930b2886309112c00a279483eaef2f0f8e1b1b62010e0239c16b22af7c346d4'







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

version=2.24
url="http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.gz"
domain=core.appfs.rkeene.org
sha256='4930b2886309112c00a279483eaef2f0f8e1b1b62010e0239c16b22af7c346d4'
require=(zlib)