puke: Added manifest generation.

This commit is contained in:
Dylan Araps 2019-05-09 11:30:43 +03:00
parent 9793bdeb7a
commit a4679e83e1
2 changed files with 32 additions and 2 deletions

19
puke
View File

@ -24,6 +24,7 @@ pkg_info() {
[ -f sources ] || die "Sources file not found."
while read -r line; do version=$line; done < version
name=$1
}
pkg_depends() {
@ -70,13 +71,25 @@ pkg_extract() {
}
pkg_build() {
log "Building $1-$version"
log "Building $name-$version"
cd "$build_dir"
set -e
. "$OLDPWD/build"
set +e
cd -
log "Sucessfully built $name-$version"
}
pkg_manifest() {
cd "$pkg_dir"
_() { find . -mindepth 1 "$@" | sed 's/^\.//'; }
_ -not -type d > "$OLDPWD/manifest"
_ -type d | sort -r >> "$OLDPWD/manifest"
cd -
}
args() {
@ -87,7 +100,8 @@ args() {
pkg_depends
pkg_sources
pkg_extract
pkg_build "$2"
pkg_build
pkg_manifest
;;
esac
}
@ -101,6 +115,7 @@ main() {
source_dir=$PWD/sources
build_dir=$PWD/build
pkg_dir=$PWD/pkg
sys_dir=$PWD/sys
args "$@"
}

15
repo/zlib/manifest Normal file
View File

@ -0,0 +1,15 @@
/usr/share/man/man3/zlib.3
/usr/include/zconf.h
/usr/include/zlib.h
/lib/libz.so.1.2.11
/lib/libz.so.1
/lib/libz.so
/lib/libz.a
/lib/pkgconfig/zlib.pc
/usr/share/man/man3
/usr/share/man
/usr/share
/usr/include
/usr
/lib/pkgconfig
/lib