How to create an ipk package

There are 20 replies in this Thread which was already clicked 2,745 times. The last Post () by Mahmoud Hussein.

  • E2 OpenPLi 9 is installed in the box. I created a plugin that works and I need to create an ipk from it. The plugin is located in

    Code
    /usr/lib/enigma2/python/Plugins/Extensions/my_plugin/plugin.py
    Code
    /usr/lib/enigma2/python/Plugins/Extensions/my_plugin/plugin.xml
    XML
    <?xml version="1.0" encoding="UTF-8" ?>
    <plugins>
      <plugin name="my_plugin" version="1.0" author="YourName" description="my_plugin" where="extensions">
        <file>plugin.py</file>
      </plugin>
    </plugins>

    Here is how I create an ipk package (I use linux mint to create an ipk).

    Code
    mkdir -p my_plugin/usr/lib/enigma2/python/Plugins/Extensions/my_plugin
    mkdir -p my_plugin/CONTROL
    cp plugin.py plugin.xml my_plugin/usr/lib/enigma2/python/Plugins/Extensions/my_plugin/
    touch my_plugin/CONTROL/control
    Code
    Package: enigma2-plugin-extensions-my_plugin
    Version: 1.0
    Architecture: all
    Maintainer: gusto
    Description: my_plugin
    Code
    cd my_plugin
    tar -czvf data.tar.gz ./usr
    tar -czvf control.tar.gz ./CONTROL
    echo "2.0" > debian-binary
    ar r enigma2-plugin-extensions-my_plugin_1.0_all.ipk control.tar.gz data.tar.gz debian-binary

    The package is created. I copy the package to /tmp in the box and write the installation command.

    Code
    opkg install /tmpk/enigma2-plugin-extensions-my_plugin_1.0_all.ipk

    However, the installation always ends with a message

    Code
    * opkg_prepare_url_for_install: Couldn't find anything to satisfy '/tmpk/enigma2-plugin-extensions-my_plugin_1.0_all.ipk'.
  • Sorry, of course that was a typo (tmpk).

    I keep getting this message

    Code
    * pkg_extract_control_file_to_stream: Failed to extract control file from package '/tmp/enigma2-plugin-extensions-my_plugin_1.0_all.ipk'.
    * pkg_init_from_file: Failed to extract control file from /tmp/enigma2-plugin-extensions-my_plugin_1.0_all.ipk.
  • I only use IPKCreator for windows to make ipk packages



    or


    • Official Post

    I use the e2 receiver (as has been linked to in the message above), i find it builds cleanly, where as i occasionally have issues when using windows.

    If all else fails, attach the plugin in its folder structure to the forum and will build the ipk for you.

  • ipk creator 3 is the simplest way. I find later versions of ipk creator over complicated.
    Google it, you will find it. But also need to install Java on your computer to run that.


    Get your folder structure correct.


    pasted-from-clipboard.png

    Example controi file

    pasted-from-clipboard.png



    Code
    Package: enigma2-plugin-extensions-yourplugin
    Version: 1.00-20241012
    Section: misc
    Priority: optional
    Architecture: all
    Maintainer: you@you.com
    Description: Your Plugin Description


    Get your plugin folder structure correct.

    pasted-from-clipboard.png

    usr

    ∟lib
    ∟enigma2

    ∟python

    ∟Plugins

    ∟Extensions

    ∟yourplugin - all your files live in here

    Then you just run ipk creator 3. Clicking on yourplugin folder as the source. The same yourplugin folder as shown on first image

    ** A person who feels appreciated will always do more than what is expected **

  • I used this IPK creator and it seems to work (also in linux).

    In OpenPLi 9, I can now install the package without problems, but the plugin appears in the box only after restarting E2. How would I achieve that it is not necessary to restart E2?

    Don't package the CONTROL directory

    Code
    tar -czvf control.tar.gz ./CONTROL

    package only the control file.

    Is this command wrong?



    Is it also for linux? I don't use Windows.

  • Attached is one of my simpler plugins as reference.


    You can look at the folder structure to see how I create plugins.


    Then I would just open ipk creator 3 and select my holding folder


    pasted-from-clipboard.png


    IPK creator 3 details will then be populate with info from the control file

    pasted-from-clipboard.png


    Click create IPK. Save it somewhere. Upload it to your enigma2 tmp folder

    Simples

  • I used this IPK creator and it seems to work (also in linux).

    In OpenPLi 9, I can now install the package without problems, but the plugin appears in the box only after restarting E2. How would I achieve that it is not necessary to restart E2?

    Don't package the CONTROL directory

    Code
    tar -czvf control.tar.gz ./CONTROL

    package only the control file.

    Is this command wrong?


    Try removing the CONTROL dir and put the control file in the my_plugin dir where you have the files and then package it like this

    Code
    tar -czvf control.tar.gz ./control
  • Plugin to pack and unpack .ipk files on your box


    on openpli feed

    opkg-tools


    on openATV feed

    ipkg-tools

  • I know I'm OT. Do you also know how to create a .deb package for enigma2 OE 2.5 and OE 2.6?

    Also: do you know how to transform a .ipk plugin for OE 2.0 into a .deb for OE 2.5 or 2.6?

    ** A person who feels appreciated will always do more than what is expected **

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!