Adding license.

This commit is contained in:
Alex Shinn 2014-07-10 00:34:36 +09:00
parent 6f052f2103
commit 8b39d35dc1
2 changed files with 18 additions and 6 deletions

View file

@ -190,7 +190,8 @@
((null? ls) ((null? ls)
(cons `(library ,@(reverse info)) (cons `(library ,@(reverse info))
(cons `(rename ,dir "") (cons `(rename ,dir "")
(append (map resolve (delete-duplicates dirs equal?)) (append (map resolve
(sort (delete-duplicates dirs equal?)))
files)))) files))))
(else (else
(match (car ls) (match (car ls)
@ -322,11 +323,14 @@
(define (package-test cfg) (define (package-test cfg)
(conf-get cfg '(command package test))) (conf-get cfg '(command package test)))
(define (package-license cfg)
(conf-get cfg '(command package license)))
(define (package-output-version cfg) (define (package-output-version cfg)
(cond ((conf-get cfg '(command package version))) (cond ((conf-get cfg '(command package version)))
((conf-get cfg '(command upload version)))
((conf-get cfg '(command package version-file)) ((conf-get cfg '(command package version-file))
=> (lambda (file) (call-with-input-file file read-line))) => (lambda (file) (call-with-input-file file read-line)))
((conf-get cfg '(command upload version)))
((conf-get cfg '(command upload version-file)) ((conf-get cfg '(command upload version-file))
=> (lambda (file) (call-with-input-file file read-line))) => (lambda (file) (call-with-input-file file read-line)))
(else #f))) (else #f)))
@ -343,10 +347,14 @@
(docs (package-docs cfg spec libs)) (docs (package-docs cfg spec libs))
(desc (package-description cfg spec libs docs)) (desc (package-description cfg spec libs docs))
(test (package-test cfg)) (test (package-test cfg))
(version (package-output-version cfg))) (authors (conf-get-list cfg '(command package authors)))
(maintainers (conf-get-list cfg '(command package maintainers)))
(version (package-output-version cfg))
(license (package-license cfg)))
(let lp ((ls (map (lambda (x) (cons x #f)) libs)) (let lp ((ls (map (lambda (x) (cons x #f)) libs))
(res (res
`(,@(if (pair? docs) `(,@(if license `((license ,license)) '())
,@(if (pair? docs)
`((manual ,@(map `((manual ,@(map
(lambda (x) (lambda (x)
(path-strip-leading-parents (path-strip-leading-parents
@ -355,7 +363,9 @@
'()) '())
,@(if desc `((description ,desc)) '()) ,@(if desc `((description ,desc)) '())
,@(if test `((test ,(path-strip-leading-parents test))) '()) ,@(if test `((test ,(path-strip-leading-parents test))) '())
,@(if version `((version ,version)) '()))) ,@(if version `((version ,version)) '())
,@(if (pair? authors) `((authors ,@authors)) '())
,@(if (pair? maintainers) `((maintainers ,@maintainers)) '())))
(files (files
`(,@docs `(,@docs
,@(if test (list test) '())))) ,@(if test (list test) '()))))

View file

@ -97,10 +97,12 @@
(define verify-spec (define verify-spec
'()) '())
(define package-spec (define package-spec
'((author string) '((authors (list string))
(maintainers (list string))
(recursive? boolean (#\r "recursive") "...") (recursive? boolean (#\r "recursive") "...")
(version string) (version string)
(version-file existing-filename) (version-file existing-filename)
(license symbol)
(doc existing-filename) (doc existing-filename)
(doc-from-scribble boolean) (doc-from-scribble boolean)
(description string) (description string)