flatpak-builder icon indicating copy to clipboard operation
flatpak-builder copied to clipboard

Consider adding ability to specify custom autogen command for autotools sources

Open mcatanzaro opened this issue 7 years ago • 4 comments

Consider adding ability to specify custom autogen command for autotools sources. Use-case: today I wanted to build autotools projects that do not distribute generated autotools build files in the release tarballs, i.e. the tarballs are git archives rather than 'make dist' products. Also, these projects do not have toplevel autogen.sh scripts. I was able to use this hack to get it to work:

       {
            "name" : "libsass",
            "sources" : [
                {
                    "type" : "archive",
                    "url" : "https://github.com/sass/libsass/releases/download/3.4.9/libsass-3.4.9.tar.gz",
                    "sha256" : "5588fd93fd03d3aabab5bfa44633b5faff5e7a72bed8f36d3544532495533a97"
                },
                {
                    "type" : "shell",
                    "commands" : [
                        "echo 'autoreconf --force --install' > autogen.sh",
                        "chmod +x autogen.sh"
                    ]
                }
            ]
        },

flatpak-builder could support nicer ways of doing this. JHBuild provides an autogen-sh attribute which accomplishes this, for example, as well as a couple more settings that can be useful. Would be nicer to be able to do something like this instead:

       {
            "name" : "libsass",
            "sources" : [
                {
                    "type" : "archive",
                    "autogen" : "autoreconf",
                    "url" : "https://github.com/sass/libsass/releases/download/3.4.9/libsass-3.4.9.tar.gz",
                    "sha256" : "5588fd93fd03d3aabab5bfa44633b5faff5e7a72bed8f36d3544532495533a97"
                }
            ]
        },

mcatanzaro avatar Feb 20 '18 04:02 mcatanzaro

I was able to use this hack to get it to work:

The proper solution is:

{
   "type": "script",
   "commands": [ "autoreconf -fi" ]
}

TingPing avatar Feb 20 '18 06:02 TingPing

Maybe add an autoreconf property that when set as true will imply rm-configure: true, and will execute autoreconf -fiv.

tinywrkb avatar Jan 16 '22 11:01 tinywrkb

Also encountered this problem today. +1 from me.

outergod avatar Feb 16 '22 13:02 outergod

Agree. This proposal is significantly useful

yihuajack avatar Mar 25 '23 16:03 yihuajack