distro-build/assemble-site: merge native libraries
original commit: 270ca41e4a3f8d78433c5d4426d55519283dbb9c
This commit is contained in:
parent
5425602294
commit
a95ce7aa51
|
@ -9,6 +9,7 @@
|
|||
(define dest-dir (build-path build-dir "site"))
|
||||
|
||||
(define built-dir (build-path build-dir "built"))
|
||||
(define native-dir (build-path build-dir "native"))
|
||||
|
||||
(define installers-dir (build-path "installers"))
|
||||
(define pkgs-dir (build-path "pkgs"))
|
||||
|
@ -24,34 +25,45 @@
|
|||
|
||||
(define (copy dir [build-dir build-dir])
|
||||
(make-directory* dest-dir)
|
||||
(printf "Copying ~s\n" (build-path build-dir dir))
|
||||
(printf "Copying ~a\n" (build-path build-dir dir))
|
||||
(copy-directory/files (build-path build-dir dir)
|
||||
(build-path dest-dir dir)
|
||||
#:keep-modify-seconds? #t))
|
||||
|
||||
(delete-directory/files dest-dir #:must-exist? #f)
|
||||
(copy pkgs-dir built-dir)
|
||||
|
||||
(printf "Building catalog\n")
|
||||
(let ([c-dir (build-path built-dir catalog-dir "pkg")]
|
||||
[d-dir (build-path dest-dir catalog-dir "pkg")])
|
||||
(make-directory* d-dir)
|
||||
(define base-url (string->url (hash-ref config '#:dist-base-url)))
|
||||
(for ([f (in-list (directory-list c-dir))])
|
||||
(define ht (call-with-input-file* (build-path c-dir f) read))
|
||||
(define new-ht
|
||||
(hash-set ht 'source (url->string
|
||||
(combine-url/relative
|
||||
base-url
|
||||
(path->string
|
||||
(build-path
|
||||
"pkgs"
|
||||
(path-add-suffix f #".zip")))))))
|
||||
(call-with-output-file*
|
||||
(build-path d-dir f)
|
||||
(lambda (o)
|
||||
(write new-ht o)
|
||||
(newline o)))))
|
||||
(define (build-catalog built-dir)
|
||||
(printf "Building catalog from ~a\n" built-dir)
|
||||
(let ([c-dir (build-path built-dir "pkgs")]
|
||||
[d-dir (build-path dest-dir "pkgs")])
|
||||
(make-directory* d-dir)
|
||||
(for ([f (directory-list c-dir)])
|
||||
(define c (build-path c-dir f))
|
||||
(define d (build-path d-dir f))
|
||||
(copy-file c d)
|
||||
(file-or-directory-modify-seconds d (file-or-directory-modify-seconds c))))
|
||||
(let ([c-dir (build-path built-dir catalog-dir "pkg")]
|
||||
[d-dir (build-path dest-dir catalog-dir "pkg")])
|
||||
(make-directory* d-dir)
|
||||
(define base-url (string->url (hash-ref config '#:dist-base-url)))
|
||||
(for ([f (in-list (directory-list c-dir))])
|
||||
(define ht (call-with-input-file* (build-path c-dir f) read))
|
||||
(define new-ht
|
||||
(hash-set ht 'source (url->string
|
||||
(combine-url/relative
|
||||
base-url
|
||||
(path->string
|
||||
(build-path
|
||||
"pkgs"
|
||||
(path-add-suffix f #".zip")))))))
|
||||
(call-with-output-file*
|
||||
(build-path d-dir f)
|
||||
(lambda (o)
|
||||
(write new-ht o)
|
||||
(newline o))))))
|
||||
|
||||
(build-catalog built-dir)
|
||||
(build-catalog native-dir)
|
||||
|
||||
(copy installers-dir)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user