Index: dist/PKGBUILD ================================================================== --- dist/PKGBUILD +++ dist/PKGBUILD @@ -34,16 +34,8 @@ 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/" + export prefix="$pkgdir/usr" build="$srcdir/$pkgname/out" + cd "$srcdir/$pkgname" && install.sh } Index: install.sh ================================================================== --- install.sh +++ install.sh @@ -2,32 +2,25 @@ 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" +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 +incdir="${incdir:-$prefix/include}" +sharedir="${sharedir:-$prefix/share}" say "commencing install" say " - prefix: $prefix" say " - destinations:" -say " * binaries: $bindir" -say " * libraries: $libdir" -say " * headers: $incdir" -say " * shared files: $sharedir" +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