- HTML Admin-Manual
- PDF Admin-Manual
- HTML ITSM-Manual
- PDF ITSM-Manual
- HTML Developer-Manual
- PDF Developer-Manual
- HTML Developer-API
Table of Contents
If you want to create an OPM package (.opm) you need to create a spec file (.sopm) which includes the properties of the package.
The OPM package is XML based. You can create/edit the .sopm via a text or xml editor. It contains meta data, a file list and database options.
The required framework version (2.3.x means e.g. 2.3.1 or 2.3.9) (required).
<Framework>2.3.x</Framework>
Can also be used several times.
<Framework>2.3.x</Framework>
<Framework>2.2.x</Framework>
<Framework>2.1.x</Framework>
The license of the package (required).
<License>GNU GENERAL PUBLIC LICENSE Version 2, June 1991</License>
The package change log (optional).
<ChangeLog Version="1.1.2" Date="2007-02-15 18:45:21">Added some feature.</ChangeLog>
<ChangeLog Version="1.1.1" Date="2007-02-15 16:17:51">New package.</ChangeLog>
The package description in different languages (required).
<Description Lang="en">A web calendar.</Description>
<Description Lang="de">Ein Web Kalender.</Description>
Packages that must be installed beforehand (optional). If PackageRequired is used, a version of the required package must be specified.
<PackageRequired Version="1.0.3">SomeOtherPackage</PackageRequired>
<PackageRequired Version="5.3.2">SomeotherPackage2</PackageRequired>
Perl modules that must be installed beforehand (optional).
<ModuleRequired Version="1.03">Encode</ModuleRequired>
<ModuleRequired Version="5.32">MIME::Tools</ModuleRequired>
This is a list of files included in the package (optional).
<Filelist>
<File Permission="644" Location="Kernel/Config/Files/Calendar.pm"/>
<File Permission="644" Location="Kernel/System/CalendarEvent.pm"/>
<File Permission="644" Location="Kernel/Modules/AgentCalendar.pm"/>
<File Permission="644" Location="Kernel/Language/de_AgentCalendar.pm"/>
</Filelist>
Database entries that have to be created when a package is installed (optional).
<DatabaseInstall>
<TableCreate Name="calendar_event">
<Column Name="id" Required="true" PrimaryKey="true" AutoIncrement="true" Type="BIGINT"/>
<Column Name="title" Required="true" Size="250" Type="VARCHAR"/>
<Column Name="content" Required="false" Size="250" Type="VARCHAR"/>
<Column Name="start_time" Required="true" Type="DATE"/>
<Column Name="end_time" Required="true" Type="DATE"/>
<Column Name="owner_id" Required="true" Type="INTEGER"/>
<Column Name="event_status" Required="true" Size="50" Type="VARCHAR"/>
</TableCreate>
</DatabaseInstall>
You also can choose <DatabaseInstall Type="post"> or <DatabaseInstall Type="pre"> to define the time of execution separately (post is default). For more info see chapter "Package Life Cycle".
Information on which actions have to be performed in case of an upgrade (subject to version tag), (optional). Example (if already installed package version is below 1.3.4 (e. g. 1.2.6), defined action will be performed):
<DatabaseUpgrade>
<TableCreate Name="calendar_event_involved" Version="1.3.4">
<Column Name="event_id" Required="true" Type="BIGINT"/>
<Column Name="user_id" Required="true" Type="INTEGER"/>
</TableCreate>
</DatabaseUpgrade>
You also can choose <DatabaseUpgrade Type="post"> or <DatabaseUpgrade Type="pre"> to define the time of execution separately (post is default). For more info see chapter "Package Life Cycle".
Information on what actions have to be performed if the package is reinstalled, (optional).
<DatabaseReinstall></DatabaseReinstall>
You also can choose <DatabaseReinstall Type="post"> or <DatabaseReinstall Type="pre"> to define the time of execution separately (post is default). For more info see chapter "Package Life Cycle".
Uninstall (if a package gets uninstalled), (optional).
<DatabaseUninstall>
<TableDrop Name="calendar_event" />
</DatabaseUninstall>
You also can choose <DatabaseUninstall Type="post"> or <DatabaseUninstall Type="pre"> to define the time of execution separately (post is default). For more info see chapter "Package Life Cycle".
To show a "pre" or "post" install introdution in installation dialog.
<IntroInstall Type="post" Lang="en" Title="Some Title">
Some Info formated in dtl/html....
</IntroInstall>
You can also use the "Format" attribute to define if you want to use "html" (which is default) or "plain" to use automatically a "<pre></pre>" tag wenn intro is shown (to use the new lines and spaces of the content).
To show a "pre" or "post" uninstall introdution in uninstallation dialog.
<IntroUninstall Type="post" Lang="en" Title="Some Title">
Some Info formated in dtl/html....
</IntroUninstall>
You can also use the "Format" attribute to define if you want to use "html" (which is default) or "plain" to use automatically a "<pre></pre>" tag wenn intro is shown (to use the new lines and spaces of the content).
To show a "pre" or "post" reinstall introdution in reinstallation dialog.
<IntroReinstall Type="post" Lang="en" Title="Some Title">
Some Info formated in dtl/html....
</IntroReinstall>
You can also use the "Format" attribute to define if you want to use "html" (which is default) or "plain" to use automatically a "<pre></pre>" tag wenn intro is shown (to use the new lines and spaces of the content).
To show a "pre" or "post" upgrade introdution in upgrading dialog.
<IntroUpgrade Type="post" Lang="en" Title="Some Title">
Some Info formated in dtl/html....
</IntroUpgrade>
You can also use the "Format" attribute to define if you want to use "html" (which is default) or "plain" to use automatically a "<pre></pre>" tag wenn intro is shown (to use the new lines and spaces of the content).
To execute perl code if the package is installed (optional).
<CodeInstall>
# example
if (1) {
print STDERR "Some info to STDERR\n";
}
# log example
$Self->{LogObject}->Log(
Priority => 'notice',
Message => "Some Message!",
)
# database example
$Self->{DBObject}->Do(SQL => "SOME SQL");
</CodeInstall>
You also can choose <CodeInstall Type="post"> or <CodeInstall Type="pre"> to define the time of execution separately (post is default). For more info see chapter "Package Life Cycle".
To execute perl code if the package is uninstalled (optional). On "pre" or "post" time of package uninstallation.
<CodeUninstall>
# example
if (1) {
print STDERR "Some info to STDERR\n";
}
</CodeUninstall>
You also can choose <CodeUninstall Type="post"> or <CodeUninstall Type="pre"> to define the time of execution separately (post is default). For more info see chapter "Package Life Cycle".
To execute perl code if the package is reinstalled (optional).
<CodeReinstall>
# example
if (1) {
print STDERR "Some info to STDERR\n";
}
</CodeReinstall>
You also can choose <CodeReinstall Type="post"> or <CodeReinstall Type="pre"> to define the time of execution separately (post is default). For more info see chapter "Package Life Cycle".
To execute perl code if the package is upgraded (subject to version tag), (optional). Example (if already installed package version is below 1.3.4 (e. g. 1.2.6), defined action will be performed):
<CodeUpgrade Version="1.3.4">
# example
if (1) {
print STDERR "Some info to STDERR\n";
}
</CodeUpgrade>
You also can choose <CodeUpgrade Type="post"> or <CodeUpgrade Type="pre"> to define the time of execution separately (post is default).