- HTML Admin-Manual
- PDF Admin-Manual
- HTML ITSM-Manual
- PDF ITSM-Manual
- HTML Developer-Manual
- PDF Developer-Manual
- HTML Developer-API
Table of Contents
- Package Spec File
- Name
- Version
- Framework
- Vendor
- URL
- License
- ChangeLog
- Description
- BuildHost
- BuildDate
- PackageRequired
- OS (^M)
- Filelist
- DatabaseInstall
- DatabaseUpgrade
- DatabaseReinstall
- DatabaseUninstall
- CodeInstall
- CodeUninstall
- CodeReinstall
- CodeUpgrade
- IntroInstall(Pre|Post)
- IntroUninstall(Pre|Post)
- IntroReinstall(Pre|Post)
- IntroUpgrade(Pre|Post)
- Example .sopm
- Package Build
If you want to create an OPM package (.opm) you need to create a spec file (.sopm) which includes the properties of the package.
- Name
- Version
- Framework
- Vendor
- URL
- License
- ChangeLog
- Description
- BuildHost
- BuildDate
- PackageRequired
- OS (^M)
- Filelist
- DatabaseInstall
- DatabaseUpgrade
- DatabaseReinstall
- DatabaseUninstall
- CodeInstall
- CodeUninstall
- CodeReinstall
- CodeUpgrade
- IntroInstall(Pre|Post)
- IntroUninstall(Pre|Post)
- IntroReinstall(Pre|Post)
- IntroUpgrade(Pre|Post)
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.0.x means e.g. 2.0.1 or 2.0.9) (required).
<Framework>2.0.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>
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>
Information on which actions have to be performed in case of an upgrade (subject to version tag), (optional). Example (if installed package version is below 1.3.4, 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>
Information on what actions have to be performed if the package is reinstalled, (optional).
<DatabaseReinstall></DatabaseReinstall>
Uninstall (if a package gets uninstalled), (optional).
<DatabaseUninstall>
<TableDrop Name="calendar_event" />
</DatabaseUninstall>
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>
To execute perl code if the package is uninstalled (optional).
<CodeUninstall>
# example
if (1) {
print STDERR "Some info to STDERR\n";
}
</CodeUninstall>
To execute perl code if the package is reinstalled (optional).
<CodeReinstall>
# example
if (1) {
print STDERR "Some info to STDERR\n";
}
</CodeReinstall>
To execute perl code if the package is upgraded (optional).
<CodeUpgrade>
# example
if (1) {
print STDERR "Some info to STDERR\n";
}
</CodeUpgrade>
To show a pre or post install introdution in installation dialog.
<IntroInstallPre Title="Some Title" Lang="en">
Some Info formated in dtl/html....
</IntroInstallPre>
To show a pre or post uninstall introdution in uninstallation dialog.
<IntroUninstallPre Title="Some Title" Lang="en">
Some Info formated in dtl/html....
</IntroUninstallPre>
To show a pre or post reinstall introdution in reinstallation dialog.
<IntroReinstallPre Title="Some Title" Lang="en">
Some Info formated in dtl/html....
</IntroReinstallPre>