libk  Check-in [0a42ee4e26]

Overview
Comment:update install script
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0a42ee4e26e997d1f020ea02234fa14a1b9949f92b139c09140cd2d6501dd6c4
User & Date: lexi on 2020-03-04 06:59:41
Other Links: manifest | tags
Context
2020-03-04
12:47
tweak build infrastructure: global install script now respects prefix in all cases; update PKGBUILD to use install script correctly check-in: b6c435e95a user: lexi tags: trunk
06:59
update install script check-in: 0a42ee4e26 user: lexi tags: trunk
00:03
add Arch Build System build script check-in: c231d33808 user: lexi tags: trunk
Changes

Modified dist/PKGBUILD from [7b18c1e325] to [35af299ffd].

32
33
34
35
36
37
38


39
40
41
42
43
44
45
46
47
	fi

	cd "$srcdir/libk"
	arch=$kind ./build.sh
}

package() {


	if test "$doc" = yes; then
		install -D "$srcdir/$pkgname/out/doc/html/"* -t "$pkgdir/usr/share/doc/libk/pdf/" 
		install -D "$srcdir/$pkgname/out/doc/pdf/"* -t "$pkgdir/usr/share/doc/libk/html/" 
		install -D "$srcdir/$pkgname/out/doc/man/"* -t "$pkgdir/usr/share/man/man3/" 
	fi

	install -D "$srcdir/$pkgname"/out/{libk.{so,a},kboot.o} -t "$pkgdir/usr/lib/" 
	install -D "$srcdir/$pkgname/out/k/"* -t "$pkgdir/usr/include/k/" 
}







>
>
|
|
|
|
|
|
|
|

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
	fi

	cd "$srcdir/libk"
	arch=$kind ./build.sh
}

package() {
	export fakeroot=yes prefix="$pkgdir" build="$srcdir/$pkgname/out"
	"$srcdir/$pkgname/install.sh"
	# if test "$doc" = yes; then
	# 	install -D "$srcdir/$pkgname/out/doc/html/"* -t "$pkgdir/usr/share/doc/libk/pdf/" 
	# 	install -D "$srcdir/$pkgname/out/doc/pdf/"* -t "$pkgdir/usr/share/doc/libk/html/" 
	# 	install -D "$srcdir/$pkgname/out/doc/man/"* -t "$pkgdir/usr/share/man/man3/" 
	# fi
    #
	# install -D "$srcdir/$pkgname"/out/{libk.{so,a},kboot.o} -t "$pkgdir/usr/lib/" 
	# install -D "$srcdir/$pkgname/out/k/"* -t "$pkgdir/usr/include/k/" 
}

Modified install.sh from [df12302eb0] to [e3ee508d22].

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
#!/usr/bin/env bash
source global/common.sh




check "prefix" "a directory to install to"
build="${build:-out}"

bindir="$prefix/bin"
libdir="$prefix/lib"

if [ "$prefix" = "/" ]; then
	say "installing docs and headers into usr instad of /"
	sharedir="$prefix/usr/share"
	incdir="$prefix/usr/include"
else
	incdir="$prefix/include"
	sharedir="$prefix/share"
fi

say "Starting install."









# Libraries
# These may or may not exist, depending on what library build is done, so check
say "Installing libraries..."
[ -e "$build/libk.a" ] && install -Dm644 -t "$libdir" "$build/libk.a"
[ -e "$build/libk.so" ] && install -Dm644 -t "$libdir" "$build/libk.so"
[ -e "$build/boot.o" ] && install -Dm644 -t "$libdir/libk" "$build/boot.o"

# Binaries
say "Installing binaries..."
install -Dm755 -t "$bindir" "$build/kcore.testbin"
install -Dm755 -t "$bindir" "$build/kcli.testbin"
install -Dm755 -t "$bindir" "$build/kgraft.attach"

# Includes
say "Installing includes..."
for inc in "$build"/k/*; do
	install -Dm644 -t "$incdir/k" "$inc"
done

# Documentation
say "Installing documentation..."
for man in "$build"/doc/man/*; do
	install -Dm644 -t "$sharedir/man" "$man"
done
for html in "$build"/doc/html/*; do
	install -Dm644 -t "$sharedir/doc/libk/html" "$html"
done
for pdf in "$build"/doc/pdf/*; do
	install -Dm644 -t "$sharedir/doc/libk/pdf" "$pdf"
done
say "Install done!"



>
>
>



|
|

|

|
|

|
|


|
>
>
>
>
>
>
>
>



|
|
|
|


|
|
<



|





|









|
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
#!/usr/bin/env bash
source global/common.sh

# TODO: provide "modular" install option to avoid the traditional
# linux directory hierarchy on systems where this doesn't make sense.

check "prefix" "a directory to install to"
build="${build:-out}"

bindir="${bindir:-$prefix/bin}"
libdir="${libdir:-$prefix/lib}"

if test "$prefix" = "/" -o "$fakeroot" = yes; then
	say "installing docs and headers into usr instad of /"
	sharedir="${sharedir:-$prefix/usr/share}"
	incdir="${incdir:-$prefix/usr/include}"
else
	incdir="${incdir:-$prefix/include}"
	sharedir="${sharedir:-$prefix/share}"
fi

say "commencing install"
say " - prefix: $prefix"
say " - destinations:"
say "   * binaries: $bindir"
say "   * libraries: $libdir"
say "   * headers: $incdir"
say "   * shared files: $sharedir"

mkdir -p "$bindir" "$libdir" "$incdir" "$sharedir"

# Libraries
# These may or may not exist, depending on what library build is done, so check
say "installing libraries"
test -e "$build/libk.a"  && install -Dm644 -t "$libdir" "$build/libk.a"
test -e "$build/libk.so" && install -Dm644 -t "$libdir" "$build/libk.so"
test -e "$build/kboot.o" && install -Dm644 -t "$libdir" "$build/kboot.o"

# Binaries
say "installing binaries"
# *.testbin files should not be installed

install -Dm755 -t "$bindir" "$build/kgraft.attach"

# Includes
say "installing headers"
for inc in "$build"/k/*; do
	install -Dm644 -t "$incdir/k" "$inc"
done

# Documentation
say "installing documentation"
for man in "$build"/doc/man/*; do
	install -Dm644 -t "$sharedir/man" "$man"
done
for html in "$build"/doc/html/*; do
	install -Dm644 -t "$sharedir/doc/libk/html" "$html"
done
for pdf in "$build"/doc/pdf/*; do
	install -Dm644 -t "$sharedir/doc/libk/pdf" "$pdf"
done
say "install complete"