libk  Check-in [b6c435e95a]

Overview
Comment:tweak build infrastructure: global install script now respects prefix in all cases; update PKGBUILD to use install script correctly
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b6c435e95a5804b025268fde7ec83b88215018ed3559d2091a80f86b4c98d46d
User & Date: lexi on 2020-03-04 12:47:31
Other Links: manifest | tags
Context
2020-05-20
14:27
add libk-config check-in: cfbfa7fcca user: lexi tags: trunk
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
Changes

Modified dist/PKGBUILD from [35af299ffd] to [fbbd050911].

    32     32   	fi
    33     33   
    34     34   	cd "$srcdir/libk"
    35     35   	arch=$kind ./build.sh
    36     36   }
    37     37   
    38     38   package() {
    39         -	export fakeroot=yes prefix="$pkgdir" build="$srcdir/$pkgname/out"
    40         -	"$srcdir/$pkgname/install.sh"
    41         -	# if test "$doc" = yes; then
    42         -	# 	install -D "$srcdir/$pkgname/out/doc/html/"* -t "$pkgdir/usr/share/doc/libk/pdf/" 
    43         -	# 	install -D "$srcdir/$pkgname/out/doc/pdf/"* -t "$pkgdir/usr/share/doc/libk/html/" 
    44         -	# 	install -D "$srcdir/$pkgname/out/doc/man/"* -t "$pkgdir/usr/share/man/man3/" 
    45         -	# fi
    46         -    #
    47         -	# install -D "$srcdir/$pkgname"/out/{libk.{so,a},kboot.o} -t "$pkgdir/usr/lib/" 
    48         -	# install -D "$srcdir/$pkgname/out/k/"* -t "$pkgdir/usr/include/k/" 
           39  +	export prefix="$pkgdir/usr" build="$srcdir/$pkgname/out"
           40  +	cd "$srcdir/$pkgname" && install.sh
    49     41   }

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

     1      1   #!/usr/bin/env bash
     2      2   source global/common.sh
     3      3   
     4      4   # TODO: provide "modular" install option to avoid the traditional
     5      5   # linux directory hierarchy on systems where this doesn't make sense.
     6      6   
     7         -check "prefix" "a directory to install to"
            7  +check prefix 'a directory to install to'
     8      8   build="${build:-out}"
     9      9   
    10     10   bindir="${bindir:-$prefix/bin}"
    11     11   libdir="${libdir:-$prefix/lib}"
    12         -
    13         -if test "$prefix" = "/" -o "$fakeroot" = yes; then
    14         -	say "installing docs and headers into usr instad of /"
    15         -	sharedir="${sharedir:-$prefix/usr/share}"
    16         -	incdir="${incdir:-$prefix/usr/include}"
    17         -else
    18         -	incdir="${incdir:-$prefix/include}"
    19         -	sharedir="${sharedir:-$prefix/share}"
    20         -fi
           12  +incdir="${incdir:-$prefix/include}"
           13  +sharedir="${sharedir:-$prefix/share}"
    21     14   
    22     15   say "commencing install"
    23     16   say " - prefix: $prefix"
    24     17   say " - destinations:"
    25         -say "   * binaries: $bindir"
    26         -say "   * libraries: $libdir"
    27         -say "   * headers: $incdir"
    28         -say "   * shared files: $sharedir"
           18  +say "   - binaries → $bindir"
           19  +say "   - libraries → $libdir"
           20  +say "   - headers → $incdir"
           21  +say "   - shared files → $sharedir"
    29     22   
    30     23   mkdir -p "$bindir" "$libdir" "$incdir" "$sharedir"
    31     24   
    32     25   # Libraries
    33     26   # These may or may not exist, depending on what library build is done, so check
    34     27   say "installing libraries"
    35     28   test -e "$build/libk.a"  && install -Dm644 -t "$libdir" "$build/libk.a"