To create an installation package in the form of an RPM file, follow these steps:
create the file structure that would correspond to the future location of language pack files:
|
<PRODUCT_ROOT_DIR>/admin
|
rewrite localization files in these directories.
create the SPEC file describing the process of an RPM package creation.
A SPEC file is obligatory for building an RPM package.
It includes the package description, instructions on the building process,
lists of the files included in the package and lists of third-party applications
that need to be installed. A standard SPEC file should look as follows:
<package name>-<version number>-<release number>.spec.
A SPEC file should include info on the path the application
will be installed by, the correct built number, version number and application
name.
Note: The Provides section must include the psa-locale-<localeID> name.
In this case, the package name is psa_locale_<localeID>-<plesk_version>-<language_pack_release>.rpm.
The example of the SPEC file for a pl-PL language pack
(Polish localization)
|
%define
namesrc pl-PL Summary:
Polish locale %description %files %post %changelog |
In the %post section (the
post installation stage) it's necessary to provide for the connection
of the file, either executable or a script one, responsible for Plesk
database update. Database update provides for adding a record to the locales
table, corresponding to the installed language pack. See the install.sh
file example.
To launch an assembly package, the following command must be executed (on the example of Linux Red Hat):
# rpmbuild --bb --target=noarch /usr/src/redhat/SPECS/<a spec file name for your locale>.spec
At the end of this utility operation, the message on where the created package is located is displayed. For example, in the Red Hat Linux it can be found in the /usr/src/redhat/RPMS/noarch directory.