https://bugs.freedesktop.org/show_bug.cgi?id=63197
Priority: medium
Bug ID: 63197
Assignee: [email protected]
Summary: avoid packing stuff into zips during build
Severity: normal
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: Other
Status: NEW
Version: unspecified
Component: Libreoffice
Product: LibreOffice
Because adding a file to the installation through the scp2 configuration is an
incredibly overcomplicated process, we often resort to packing a set of files
into a zip, that is then replaced by the installer by its contents. Now,
http://cgit.freedesktop.org/libreoffice/core/commit/?id=e9b947a6665170f96ba4182d81a630da74ea96a2
adds the ability to use a filelist in the same way (and enhances Package to
create the filelists automatically). This allows us to replace most uses of Zip
by a Package.
What needs to be done to successfully convert a Zip to a Package:
1. (gbuild) Convert the Zip_foo.mk to Package_foo.mk:
- change destination paths of all files to the same ones they have in the
installation. One can find the path (with some labour) in scp2: every File and
Directory record has an entry that points to its parent directory; it is called
Dir for Files and ParentID for Directories. The name of a Directory is in its
DosName entry. By starting at the File record of the zip file and going through
the directories up till the root directory of the installation, one can
reconstruct the path.
- use gb_Package_set_outdir to place the files under $INSTDIR, where they
are expected.
2. (scp2) Change the scp2 record:
- change filename to <package-name>.filelist
- replace ARCHIVE by FILELIST in Styles
- change Dir to FILELIST_DIR.
For testing, remove the zip from $(OUTDIR)/pck, run "make dev-install" and make
sure the files are in the installation at the places they should be.
This actually sounds more complicated than it is :-) With a bit of practice a
conversion of one Zip will not take more that a few minutes. There are two
example conversions for inspiration:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=221cd46f47f40c892e554b0848978bda3d9957e1
and
http://cgit.freedesktop.org/libreoffice/core/commit/?id=a593069ff9f64dd94e8210b0cff03b65fe059b40
.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs