termux / termux-create-package

Python script to create Termux packages easily.
https://termux.com
Apache License 2.0
419 stars 94 forks source link

Add function to run scripts/commands during installation #27

Closed Yisus7u7 closed 3 years ago

Yisus7u7 commented 3 years ago

Hello, I use termux-create-package and termux-apt-repo on my cell phone, everything is excellent, very versatile and easy to use, but I would like you to add the function of running a script during installation, to install things like example, python dependencies, or ask the user for a configuration, if you add it I would thank you very much, thank you for your time

theaungmyatmoe commented 3 years ago

Necessary dependencies will install when you install package , you just need to define depends key and value .

{
    "depends": ["bash"],
}
Yisus7u7 commented 3 years ago

Can you give me an example?

theaungmyatmoe commented 3 years ago

depnds key of value array ["bash","php"] automatically install necessary dependencies during installation via apt (or) dpkg if they are not installed.

{
    "name": "lamp",
    "version": "1.1.0",
    "homepage": "http://github.com/amm834/meow",
    "maintainer": "@amm834",
    "description": " 🐘👀 - lamp is a web servers manager ✨",
    "arch":"i686",
    "depends": ["bash","php"], // see this line
    "files" : {
        "lamp":"bin/lamp"
    }
}
Yisus7u7 commented 3 years ago

Ahh, I know that, but what I mean is that I run a script with commands during installation

theaungmyatmoe commented 3 years ago

They will install when you install package.

Yisus7u7 commented 3 years ago

Hmm ok

agnostic-apollo commented 3 years ago

You can also run additional commands in postinst script.

Note that Depends dependencies will not be installed if you install .deb file with dpkg -i command but they will be installed when its installed with aptor pkg.