aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-29 14:09:47 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-29 14:09:47 +0000
commit936462e357b9ef0cbc91f2e7a89d1e96c4619503 (patch)
treeba6dc9f3b92095e02ee6a55ea34a0ecd0c97f03d
parent5cd42f98ca9f6bc5d37798090a5d13c03f6b7383 (diff)
downloadcpt-936462e357b9ef0cbc91f2e7a89d1e96c4619503.tar.gz
kiss-new: Build packages.
FossilOrigin-Name: 644fb1ecfd9baa49270220cb97a390986750f984a444b3dc0b95fa38d28d1ca2
-rwxr-xr-xkiss-new24
1 files changed, 23 insertions, 1 deletions
diff --git a/kiss-new b/kiss-new
index 166d144..64833b8 100755
--- a/kiss-new
+++ b/kiss-new
@@ -311,6 +311,28 @@ pkg_build() {
for pkg; do pkg_extract "$pkg"; done
log "Extracted all sources."
+
+ log "Building packages..."
+ for pkg; do
+ # Find the package's repository files. This needs to keep
+ # happening as we can't store this data in any kind of data
+ # structure.
+ repo_dir=$(pkg_search "$pkg")
+
+ # Move to the build directory and call the build script.
+ (cd "$mak_dir/$pkg"; "$repo_dir/build" "$pkg_dir") ||
+ die "[$pkg]: Build failed."
+
+ # Copy the repository files to the package directory.
+ # This acts as the database entry.
+ cp -Rf "$repo_dir" "$pkg_db"
+
+ log "[$pkg]: Sucessfully built package."
+
+ # Create the manifest file early and make it empty.
+ # This ensure that the manifest is added to the manifest...
+ : > "$pkg_db/$pkg/manifest"
+ done
}
pkg_checksums() {
@@ -375,7 +397,7 @@ setup_caching() {
die "Couldn't create build directory ($mak_dir)."
# Package directory.
- mkdir -p "${pkg_dir:=$cac_dir/pkg-$pid}" ||
+ mkdir -p "${pkg_db:=${pkg_dir:=$cac_dir/pkg-$pid}/var/db/$kiss}" ||
die "Couldn't create package directory ($pkg_dir)."
# Tar directory.