Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipk build #2

Closed
luxorko opened this issue Jan 28, 2021 · 5 comments
Closed

ipk build #2

luxorko opened this issue Jan 28, 2021 · 5 comments
Labels
question Further information is requested

Comments

@luxorko
Copy link

luxorko commented Jan 28, 2021

my plugin have other folder in "usr/lib/IPTV " do you can updatte script or let me know how to build including that folder

@s3n0
Copy link
Owner

s3n0 commented Jan 29, 2021

Hi.

The default folder for plugins in Enigma is "/usr/lib/enigma2/python/Plugins/Extensions/" so why do you want to change it ?!

It should be enough to change the directory name for your plugin, i.e. instead of "ProjectXY", you write the name of your directory everywhere - which is actually your "IPTV" plugin.

Output as a finished ipk / deb package file, will be located in the "/tmp" folder.

I don't understand exactly what you need to know. Is something not working properly in the IPK build script? Did you at least study it? The script contains a description and info.

Of course, there may be some dependencies, in different types of Enigma - for example, some Enigmas may lack a tool for converting language files (if you require it) "msgfmt" from the "gettext" installation package ... or some Enigma may lack a tool "ar" - for the purpose of attaching files into a common package.

Basic knowledge of Linux is required ! It is also a good idea to study in advance how IPK / DEB packages are created. Otherwise, you will encounter various problems that you will not solve yourself.

If something doesn't work, please write what exactly.

Good luck :)

@luxorko
Copy link
Author

luxorko commented Jan 29, 2021

I read full script and is very easy to understanding even for me without IT school Satelite with enigma2 is my hobby for long time ago.. Im beginning to learn python and stuff around E2.
you wrote:
" The default folder for plugins in Enigma is "/usr/lib/enigma2/python/Plugins/Extensions/" so why do you want to change it ?"
I dont wanna change it. I would like to my plugin will be created 3 different files:
1 - /usr/lib/enigma2/python/Plugins/Extensions/"
2- /etc/iptv/
3 - /usr/script
hope now is clear, let me know if it possible.

Regarding - postints - examples how to check version of "curl" and if not exist or is older install new
My script not work any idea?

#!/bin/sh
opkg update > /dev/null 2>&1
opkg install curl
echo "Restarting ...Enigma2 "
init 4
killall -9 enigma2 > /dev/null 2>&1
init 3
exit 0

Thank you

@s3n0
Copy link
Owner

s3n0 commented Jan 29, 2021

This does not apply to the IPK build shell-script itself. You need to know how the debian installation package works.

In your case, just add the necessary additional folders to the data.tar.gz archive, including the entire directory structure. You will do this in the same way as I made a copy of the plugin directory to the temporary project folder ($project_dir). There, make a copy of your other directories + their contents (files) in the same way. This data.tar.gz archive is then unpacked during the installation of the debian (.deb / .ipk) package, including the preserved attributes.

You can also perform the necessary actions with the files, via the so-called "control shell-scripts" (packaged in the control.tar.gz archive), which are run during the respective installation or uninstallation process (or during some other process).

You can find more info via Google :). For example here:
https://bitsum.com/creating_ipk_packages.htm
https://www.debian.org/doc/debian-policy/ap-flowcharts.html ("control" shell-scripts)
https://raymii.org/s/tutorials/Building_IPK_packages_by_hand.html

You can add another code, according to this code:

#### prepare a copy of $PLUGIN_DIR to $PROJECT_DIR
mkdir -p ${PROJECT_DIR}/${PLUGIN_DIR}
cp -rp ${PLUGIN_DIR}/* ${PROJECT_DIR}/${PLUGIN_DIR}

Add this:

#### prepare a copy of $ANOTHER_DIR to $PROJECT_DIR
ANOTHER_DIR="/etc/iptv"
mkdir -p ${PROJECT_DIR}/${ANOTHER_DIR}
cp -rp ${ANOTHER_DIR}/* ${PROJECT_DIR}/${ANOTHER_DIR}

Of course you have to modify other parts of the code in the script accordingly :). If you want to copy or delete file in the "/usr/script" directory, better is to use some "control" shell-scripts for that purpose.

There are many possibilities. If you are an experienced IT technician, you can handle yourself ;).

@s3n0 s3n0 added the question Further information is requested label Jan 30, 2021
@luxorko
Copy link
Author

luxorko commented Feb 3, 2021

Thank you for reply.
I am NOT guy with IT skill, i am beginner who tray to learn Enigma 2 code
That new script is more confused to me. Sorry.
1- I change my plugin in the one folder in the "extension"
2- Inside the folder i have more scripts (.SH) and i must manually change atributy to "755"
Please advise."control" shell-scripts ?

@s3n0
Copy link
Owner

s3n0 commented Feb 3, 2021

Hi again.

Specifically, you can find a description of the content of the "CONTROL/control" file, i.e. a description of individual fields, here:
https://man7.org/linux/man-pages/man5/deb-control.5.html

I wrote to you some links found on Google. There you can learn what a .deb (.ipk) package is ... and/or how it works, as well as what control-scripts are.

I didn't change anything extra in my IPK-build shell script. I just adjusted the parameters, because not everyone seemed to have to adjust other things in the script. This made it easier for them to edit the script.

If you don't know what the IPK-build script does, you've unfortunately skipped the basics - I mean the basics of Linux Shell. If you know Shell (Bash for example), then reading the script can't be a problem for you. Of course, to edit the shell script you have to use the appropriate editors and not the standard "notepad.exe" in Windows. For example, I use "Notepad++" (https://notepad-plus-plus.org/downloads/).

@s3n0 s3n0 closed this as completed Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants