;;;; ;;;; types.stk -- The package class ;;;; ;;;; Copyright © 2007 Erick Gallesio - I3S-CNRS/ESSI ;;;; ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by ;;;; the Free Software Foundation; either version 2 of the License, or ;;;; (at your option) any later version. ;;;; ;;;; This program is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;;; GNU General Public License for more details. ;;;; ;;;; You should have received a copy of the GNU General Public License ;;;; along with this program; if not, write to the Free Software ;;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ;;;; USA. ;;;; ;;;; Author: Erick Gallesio [eg@essi.fr] ;;;; Creation date: 13-Jan-2007 23:24 (eg) ;;;; Last file update: 5-Jun-2007 15:13 (eg) ;;;; ;; ---------------------------------------------------------------------- ;; structure package ... ;; ---------------------------------------------------------------------- (define-struct package name version release language category path url md5 description author failures dependencies provides tuning suffix) (define (new-package name :key version release language category path url md5 description author failures dependencies provides tuning suffix) (unless path ;; Build a path in the cache for this package (set! path (make-path (stklos-pkg-cache-directory) (format "~a-~a~a.tar.gz" name version (if release (- release) ""))))) (when (string? language) (set! language (string->symbol language))) (unless suffix (set! suffix (case language ((stklos ".stk")) (else ".scm")))) (make-package name version release language category path url md5 description author failures dependencies provides tuning suffix)) ;; ---------------------------------------------------------------------- ;; structure tuning ... ;; ---------------------------------------------------------------------- (define-struct tuning name version release host path url md5) (define (new-tuning name :key version release host path url md5) (unless path ;; Build a path in the cache for this tuning (set! path (make-path (stklos-pkg-cache-directory) (format "~a_~a-~a~a.tar.gz" name host version (if release (- release) ""))))) (make-tuning name version release host path url md5))