Subversion Repositories SvarDOS

Rev

Rev 1903 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
286 mateuszvis 1
 
893 bttr 2
                        %h*** SVARDOS PACKAGE FORMAT ***
3
 
286 mateuszvis 4
Package files provide an easy way to manage software on SvarDOS. These
5
packages must adhere to a strict convention so they can be handled properly
6
by the SvarDOS package manager.
7
 
8
 
9
%hPackage filenames
10
 
11
Packages names must follow some basic rules. They shall be max. 8 letters long
12
(but should not be too short either, since a 1 or 2-letters package name might
13
be confusing), and must not be composed of characters other than a-b, 0-9 and
14
'_'. This for backward compatibility with short file names (8+3) and ISO 9660
15
file systems (used on CDROMs). The package filename is always followed by the
893 bttr 16
.svp ("SvarDOS Package") extension.
286 mateuszvis 17
 
18
 
19
%hPackage files
20
 
21
SvarDOS uses ZIP files as its package file format. This format has been chosen
22
because ZIP files under DOS have become the de facto way to distribute
23
collections of files. Also, the ZIP file format is well documented, well
24
supported, and in the public domain.
25
 
26
Here below is the recommended command line that can be used to create a
893 bttr 27
package for a program named EXAMPLE labelled as version "1.2.34" using
895 bttr 28
Info-ZIP's Zip:
286 mateuszvis 29
 
893 bttr 30
  zip -9rkDX example-1.2.34.svp subdir1 subdir2 ... subdirN
286 mateuszvis 31
 
32
If you are using 7za to create your packages, then use this:
33
 
893 bttr 34
  7za a -mm=deflate -mx=9 -tzip example-1.2.34.svp subdir1 subdir2 ... subdirN
286 mateuszvis 35
 
1903 mateusz.vi 36
If you have access to the advzip pogram, you may use it to squeeze the archive
37
slightly more (esp. interesting for CORE packages since these are distributed
38
on floppy disks):
39
 
1904 mateusz.vi 40
  advzip -zpk4 -i 100 example-1.2.34.svp
1903 mateusz.vi 41
 
893 bttr 42
Note: The version in the filename is just an information for packagers so they
43
don't need to look into each package to know what version to expect there. In
44
LSM versions you might have non-filesystem-compatible stuff like "10/11/11" so
45
we don't want to enforce any kind of correlation.
286 mateuszvis 46
 
893 bttr 47
 
286 mateuszvis 48
%hPackage directory structure
49
 
50
The directory structure of a package depends on the type of packages.
51
For "core" packages, we have this:
52
 
53
  APPINFO            Put the program's LSM file here
1663 mateusz.vi 54
  BIN                Binaries, such as EXE, COM and LNG files
1903 mateusz.vi 55
  DOC\PKGNAME.TXT    Documentation, if it is a single file
56
  DOC\PKGNAME\*      Documentation, if more than one file
1663 mateusz.vi 57
  NLS\PKGNAME        Localization files in the legacy, multifile (CATS) format
286 mateuszvis 58
 
59
Non-core packages use a slightly different directory organization. For
60
example, if we were to consider a package FOO, we might end up with the
61
following structure:
62
 
63
  APPINFO\FOO.LSM    Package meta file for the FOO program
64
  PROGS\FOO\FOO.EXE  The program's executable
65
  PROGS\FOO\FOO.TXT  Some documentation
66
  PROGS\FOO\FILE.DAT Data file used by the FOO program
67
 
685 bttr 68
Note the PROGS directory above. This is the category to which the package
69
belongs. The package installer might change this directory at install time,
286 mateuszvis 70
depending on the user's preferences. Possible categories are listed below:
71
 
72
Category | Description
73
DEVEL    | Development tools (mostly compilers)
74
DRIVERS  | Drivers
75
GAMES    | Games
76
PROGS    | User programs, tools...
77
 
78
Note: "DOC", "NLS", "BIN" and "HELP" directories are strictly reserved to
79
      CORE packages.
80
 
584 mateuszvis 81
 
286 mateuszvis 82
%hLSM meta-data files
83
 
84
Every package MUST contain an LSM file in its "APPINFO" directory. This LSM
85
file is a text file that contains basic information about the package. Its
86
format is very simple, it must contain at least two lines:
87
 
88
  version: x.y.z
89
  description: package description
90
 
1515 mateusz.vi 91
It may optionally contain also a line describing hardware requirements of the
92
package, such as:
93
 
94
  hwreq: 286 fpu cga hgc
95
 
96
The "hwreq" line contains a space-separated list of tokens that represent
97
hardware requirements. Following tokens are possible.
98
 
99
CPU family   : 8086 186 286 386 486 586
100
CPU features : fpu
1521 mateusz.vi 101
Graphic cards: mda cga ega mcga vga svga
1515 mateusz.vi 102
 
1605 mateusz.vi 103
If the package should display an informational message after its installation,
104
then the LSM file may contain one or more "warn" lines. These are displayed by
105
the pkg tool whenever the package is installed or updated. Example:
106
 
107
  version: 1.0
108
  description: logic game with lots of colors
1623 mateusz.vi 109
  hwreq: 386 vga
1605 mateusz.vi 110
  warn: This game will not run properly unless you define a TEMP
111
  warn: environment variable that points at a writeable directory.
112
 
286 mateuszvis 113
Any other lines are ignored by the SvarDOS package manager.
584 mateuszvis 114
 
115
 
116
%hPackage versions
117
 
118
The version present in the LSM file is meant to reflect the version of the
119
packaged software, but it may happen that a package needs to be changed to
120
fix a strictly packaging-related issue (for example a forgotten documentation
121
file or a recompilation of the binary using a better set of flags...). In such
122
case, the version of the software does not change, but the version of the
621 mateuszvis 123
package itself needs to change so users know something changed. That's where
584 mateuszvis 124
"SvarDOS revisions" come in. A version string is basically following such
125
format:
126
 
127
  UPSTREAM_VER[+SVARREV]
128
 
129
UPSTREAM_VER is the exact version string advertised by the software. It may
130
be pretty much anything. This upstream version may be optionally followed by a
621 mateuszvis 131
plus sign and the SvarDOS revision. In the event that the upstream version
584 mateuszvis 132
already contains a plus sign, then SvarDOS revision is delimited with a tilde.
133
 
687 bttr 134
The SvarDOS revision starts at 0 and increments by 1 each time that the given
584 mateuszvis 135
upstream revision is repackaged. The SvarDOS revision restarts whenever the
136
upstream version changes. The SvarDOS revision of 0 is always hidden.
137
 
138
Examples:
139
 
140
FDISK 1.54      <- originally packaged version
141
FDISK 1.54+1    <- package has been changed, but not the upstream version
142
FDISK 1.55      <- upstream version increased, so SvarDOS rev restarts
143
FDISK 1.55+1    <- new version of the package, but still contains FDISK 1.55
144
FDISK 1.55+2    <- another new version of the package, etc
689 mateusz.vi 145
 
146
The entire version string of a package must never exceed 16 characters.
147
 
148
 
149
%hSources
150
 
151
When a packaged software has its sources available, then it is recommended to
152
archive also them. To that effect, put the sources into a ZIP archive that has
893 bttr 153
the same filename as the package, but a *.zip extension (as opposed to the
154
*.svp extension of the proper package). The result would be that the packaged
689 mateusz.vi 155
software would be distributed within two files. Example for FDISK:
156
 
893 bttr 157
fdisk-1.55+2.svp       <- binaries (ZIP archive following the SVP structure)
158
fdisk-1.55+2.zip       <- sources (flat, unstructured ZIP archive)
689 mateusz.vi 159
 
160
The ZIP file must obviously contain the source code that belongs to the exact
161
same version present in the SVP package.