libk  Check-in [c231d33808]

Overview
Comment:add Arch Build System build script
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c231d33808b3e977c9e4ea4cb17c9e43421ef3c1c0f0bb02f2676e0aff30c55e
User & Date: lexi on 2020-03-04 00:03:34
Other Links: manifest | tags
Context
2020-03-04
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
2020-03-03
18:10
add target display check-in: ebe506a75e user: lexi tags: trunk
Changes

Added dist/PKGBUILD version [7b18c1e325].































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
pkgname=libk
pkgver=live
pkgrel=1
pkgdesc='a modern base library for C to replace libc'
url='https://c.comint.su/libk'
license=(AGPL)
source=('https://c.comint.su/libk/tarball/trunk/libk.tar.gz')
md5sums=(SKIP)
arch=(i686 x86_64 aarch64 armv7l)
depends=()
makedepends=(binutils bash yasm)

build() {
	export os=lin library=both
	case $(uname -m) in
		# i have no idea why, but the "arch" environment variable name
		# appears tainted somehow, and gets blanked between here and
		# the call to the build script. ugly hack but it works
		i386|i686) kind=x86; export bits=32;;
		   x86_64) kind=x86; export bits=64;;
		   armv7l) kind=arm; export bits=32;;
		  aarch64) kind=arm; export bits=64;;

		*) echo "(error) your architecture is currently not supported by the libk project"
		   return 1;;
	esac
	if pacman -T cmark; then
		export doc=yes
	else
		echo "(warning) cmark not installed; docs will not be built"
		export doc=no
	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/" 
}