achadwick / styrene

A repacking tool that creates usable app bundles for regular Windows users out of MSYS2 binary packages.
GNU General Public License v3.0
40 stars 11 forks source link

Support for Git Sources and Build Commands #16

Open odysseywestra opened 7 years ago

odysseywestra commented 7 years ago

Styrene should have support for git sources and build commands. Having this would allow a packager or developer to be able directly test their code without having to use an external tool like makepkg-mingw and a PKGBUILD file to make the package. Plus it keeps the code duplication down as well. Here is an example for MyPaint:

[mypaint-git]
url = https://github.com/mypaint/mypaint
path = ../  # <-- For example if the cfg file was stored in /styrene.
build-packages =
    {pkg-prefix}setuptools
    {pkg-prefix}build-package-two
    {pkg-prefix}build-package-two
command =
    python setup.py build
    python setup.py install --root="{install-root}" --prefix="{install-prefix}"

[libmypaint-git]
url = ...
path = ...

This would also mean we would need to add new substitutions like install-root and install-prefix so styrene would know where to install the files.

In the bundle field, we should create a dynamic substitution that reflect the source name. That way styrene, can also glean the default metadata off the first like you can do with standard packages.

[bundle]
packages = 
    {mypaint-git}
    {libmypaint-git}
    {pkg-prefix}gtk3