|
From: Pascal B. <pb...@us...> - 2001-11-28 14:20:50
|
Update of /cvsroot/mpkg/mpkg/src
In directory usw-pr-cvs1:/tmp/cvs-serv17747/src
Modified Files:
deb.c dist.c mpkg.h pkg.c rpm.c
Log Message:
* src/rpm.c (make_rpm): Change dependancy description, with min
and max dependancy.
* src/deb.c (make_deb): Likewise.
(make_deb): Only show max number version dependency, when necessary.
* src/rpm.c (make_rpm): Likewise.
* src/rpm.c (make_rpm): Add tag `prefix' in specification file.
Index: deb.c
===================================================================
RCS file: /cvsroot/mpkg/mpkg/src/deb.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** deb.c 2001/10/26 08:43:58 1.3
--- deb.c 2001/11/28 14:20:46 1.4
***************
*** 168,173 ****
}
else
! fprintf (fp, " (>= %s, <= %s)", d->version[0],
! d->version[1]);
}
--- 168,178 ----
}
else
! {
! if (strcmp (d->version[1], "999.99.99p99") == 0)
! fprintf (fp, " (>= %s)", d->version[0]);
! else
! fprintf (fp, " (>= %s), %s (<= %s)", d->version[0],
! d->product, d->version[1]);
! }
}
Index: dist.c
===================================================================
RCS file: /cvsroot/mpkg/mpkg/src/dist.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** dist.c 2001/11/27 14:27:08 1.7
--- dist.c 2001/11/28 14:20:46 1.8
***************
*** 166,170 ****
/* Add a dependency to the distribution. */
void
! add_depend (dist_t * dist, /* I - Distribution */
char type, /* I - Type of dependency */
const char *line) /* I - Line from file */
--- 166,170 ----
/* Add a dependency to the distribution. */
void
! add_depend (dist_t *dist, /* I - Distribution */
char type, /* I - Type of dependency */
const char *line) /* I - Line from file */
***************
*** 195,201 ****
/*
! * Get the product name string...
*/
-
for (ptr = temp->product; *line && !isspace ((int) *line); line++)
if (ptr < (temp->product + sizeof (temp->product) - 1))
--- 195,200 ----
/*
! * Get the product name string.
*/
for (ptr = temp->product; *line && !isspace ((int) *line); line++)
if (ptr < (temp->product + sizeof (temp->product) - 1))
***************
*** 207,218 ****
LOGVERBOSE (printf (stderr, "Add dependency <%s>(%u).\n",
(char *)temp->product, (int)dist->num_depends));
! /*
! * Get the version strings, if any.
! */
for (i = 0; *line && i < 2; i++)
{
! /*
! * Handle <version, >version, etc.
! */
if (!isdigit ((int) *line))
{
--- 206,214 ----
LOGVERBOSE (printf (stderr, "Add dependency <%s>(%u).\n",
(char *)temp->product, (int)dist->num_depends));
!
! /* Get the version strings, if any. */
for (i = 0; *line && i < 2; i++)
{
! /* Handle <version, >version, etc. */
if (!isdigit ((int) *line))
{
***************
*** 226,236 ****
line++;
}
-
if (!*line)
break;
! /*
! * Grab the version string.
! */
for (ptr = temp->version[i]; *line && !isspace ((int) *line); line++)
if (ptr < (temp->version[i] + sizeof (temp->version[i]) - 1))
--- 222,229 ----
line++;
}
if (!*line)
break;
! /* Grab the version string. */
for (ptr = temp->version[i]; *line && !isspace ((int) *line); line++)
if (ptr < (temp->version[i] + sizeof (temp->version[i]) - 1))
***************
*** 240,246 ****
line++;
! /*
! * Get the version number, if any.
! */
for (lineptr = line; isdigit ((int) *lineptr); lineptr++)
;
--- 233,237 ----
line++;
! /* Get the version number, if any. */
for (lineptr = line; isdigit ((int) *lineptr); lineptr++)
;
***************
*** 258,264 ****
}
! /*
! * Handle assigning default values based on the number of version numbers...
! */
switch (i)
{
--- 249,253 ----
}
! /* Handle assigning default values based on the number of version numbers. */
switch (i)
{
Index: mpkg.h
===================================================================
RCS file: /cvsroot/mpkg/mpkg/src/mpkg.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** mpkg.h 2001/10/25 16:41:07 1.2
--- mpkg.h 2001/11/28 14:20:46 1.3
***************
*** 1,20 ****
! /*
! *
! * Definitions for Meta pkg (mpkg).
! *
! * Copyright 2001 by CubicSoft.
! * Copyright 1999-2001 by Easy Software Products.
! *
! * 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, 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.
! */
#ifndef MPKG_H
# define MPKG_H
--- 1,16 ----
! /* Definitions for Meta pkg (mpkg).
!
! Copyright 2001 by CubicSoft.
! Copyright 1999-2001 by Easy Software Products.
+ 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, 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. */
#ifndef MPKG_H
# define MPKG_H
Index: pkg.c
===================================================================
RCS file: /cvsroot/mpkg/mpkg/src/pkg.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pkg.c 2001/11/14 09:50:18 1.2
--- pkg.c 2001/11/28 14:20:46 1.3
***************
*** 48,56 ****
FILE *fp; /* Control file */
char name[1024]; /* Full product name */
! char filename[1024], /* Destination filename */
! preinstall[1024], /* Pre install script */
! postinstall[1024], /* Post install script */
! preremove[1024], /* Pre remove script */
! postremove[1024]; /* Post remove script */
char current[1024]; /* Current directory */
file_t *file; /* Current distribution file */
--- 48,56 ----
FILE *fp; /* Control file */
char name[1024]; /* Full product name */
! char filename[1024]; /* Destination filename */
! char preinstall[1024]; /* Pre install script */
! char postinstall[1024]; /* Post install script */
! char preremove[1024]; /* Pre remove script */
! char postremove[1024]; /* Post remove script */
char current[1024]; /* Current directory */
file_t *file; /* Current distribution file */
***************
*** 107,110 ****
--- 107,111 ----
fprintf (fp, "VERSION=%s\n", dist->version);
fprintf (fp, "VENDOR=%s\n", dist->vendor);
+ /* FIXME Add option to specify BASEDIR. */
fprintf (fp, "BASEDIR=%s\n", "/");
fprintf (fp, "PSTAMP=mpkg%04d%02d%02d%02d%02d%02d\n",
Index: rpm.c
===================================================================
RCS file: /cvsroot/mpkg/mpkg/src/rpm.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** rpm.c 2001/10/24 12:16:42 1.1.1.1
--- rpm.c 2001/11/28 14:20:46 1.2
***************
*** 104,107 ****
--- 104,110 ----
fprintf (fp, "Vendor: %s\n", dist->vendor);
fprintf (fp, "BuildRoot: %s/%s/buildroot\n", current, directory);
+ /* FIXME Add option to change prefix. */
+ fprintf (fp, "Prefix: /\n");
+
fputs ("Group: Applications\n", fp);
***************
*** 123,127 ****
}
else
! fprintf (fp, " >= %s, <= %s\n", d->version[0], d->version[1]);
}
--- 126,136 ----
}
else
! {
! if (strcmp (d->version[1], "999.99.99p99") == 0)
! fprintf (fp, " >= %s\n", d->version[0]);
! else
! fprintf (fp, " >= %s, %s <= %s\n", d->version[0], d->product,
! d->version[1]);
! }
}
***************
*** 373,381 ****
if (ret) /* FIXME Here there're an error. */ ;
}
-
- /*
- * Remove temporary files...
- */
if (!KeepFiles)
{
--- 382,387 ----
if (ret) /* FIXME Here there're an error. */ ;
}
+ /* Remove temporary files. */
if (!KeepFiles)
{
|