Packaging: Difference between revisions

From iPhone Development Wiki
(linking debian packaging manual for install scripts)
(more detail about scripts)
Line 1: Line 1:
Packaging is the step prior to sharing or releasing a tweak/application/tool/library/theme. Here you put all your project files into a single nicely wrapped file that others can install on their devices.
Packaging is the step prior to sharing or releasing a tweak/application/tool/library/theme. Here you put all your project files into a single nicely wrapped file that others can install on their devices.
Cydia is based on Debian APT ([https://en.wikipedia.org/wiki/Advanced_Packaging_Tool Advanced Packaging Tool]), so a lot of general documentation about packaging for APT also applies to packaging for Cydia.


== Tools ==
== Tools ==
Line 14: Line 16:
=== Other files ===
=== Other files ===


''To do: add information about preinst, postinst, extrainst_, prerm, postrm files. Consider [https://ghostbin.com/paste/jukek paste] for base explanation/example. Explain how it fits into Debian packaging (how it interacts with apt/aptitude/dpkg/Cydia). In the Debian packaging manual: [https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html#s-maintscripts basics] and [https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html more info].''
You can add <code>preinst</code>, <code>postinst</code>, <code>extrainst_</code>, <code>prerm</code>, and <code>postrm</code> files to run scripts at various points of the package installation and uninstallation lifecycle. It's important to be conservative with these scripts - as [[Best Practices]] explains, "Do not use postinst/preinst/extrainst_ for file management purposes! Do not store in the package files or directories that your software could create. Do not enforce permissions that your package should contain. dpkg uses an expressive packaging format that has support for permissions, ownership, and links. Use that support!"
 
Documentation about these scripts in the Debian packaging manual: [https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html#s-maintscripts basics] and [https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html more info].
 
''To do: Consider [https://ghostbin.com/paste/jukek this paste] as one example. Explain how it fits into Debian packaging (how it interacts with apt/aptitude/dpkg/Cydia).''


== Troubleshooting ==
== Troubleshooting ==


=== dpkg-deb ===
=== dpkg-deb ===

Revision as of 21:25, 12 December 2014

Packaging is the step prior to sharing or releasing a tweak/application/tool/library/theme. Here you put all your project files into a single nicely wrapped file that others can install on their devices.

Cydia is based on Debian APT (Advanced Packaging Tool), so a lot of general documentation about packaging for APT also applies to packaging for Cydia.

Tools

To do: add existing tools, on which platforms they are available, how to use them.

DEBIAN folder

Control file

To do: add layout of fields, what do they mean, how they are used. Refer to saurik's post and links at the bottom.

If you need to list dependencies or conflicting packages, Debian's packaging manual may be useful (because Cydia packaging is based on Debian packaging): Syntax of relationship fields, Dependencies, Conflicts -- or if you're submitting this package to a default repository, you can just ask your repository maintainer for help with this.

Other files

You can add preinst, postinst, extrainst_, prerm, and postrm files to run scripts at various points of the package installation and uninstallation lifecycle. It's important to be conservative with these scripts - as Best Practices explains, "Do not use postinst/preinst/extrainst_ for file management purposes! Do not store in the package files or directories that your software could create. Do not enforce permissions that your package should contain. dpkg uses an expressive packaging format that has support for permissions, ownership, and links. Use that support!"

Documentation about these scripts in the Debian packaging manual: basics and more info.

To do: Consider this paste as one example. Explain how it fits into Debian packaging (how it interacts with apt/aptitude/dpkg/Cydia).

Troubleshooting

dpkg-deb