mirror of
https://github.com/clearlinux/autospec.git
synced 2026-08-21 06:26:18 +00:00
Add "make_prepend" code
So the files are now: - prep_prepend %setup %patchN - build_prepend %configure - make_prepend %make - install_prepend %make_install - install_append Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
committed by
William Douglas
parent
ff96db88f6
commit
37503fded9
@@ -147,6 +147,7 @@ Variables included:
|
||||
* ``configure``
|
||||
* ``prep_prepend``
|
||||
* ``build_prepend``
|
||||
* ``make_prepend``
|
||||
* ``install_prepend``
|
||||
* ``install_append``
|
||||
|
||||
@@ -262,6 +263,14 @@ build_prepend
|
||||
placed in the resulting ``.spec``, and is used for situations where
|
||||
fine-grained control is required.
|
||||
|
||||
make_prepend
|
||||
Additional actions that should take place directly after the
|
||||
configuring step and before the ``%make`` macro or equivalent. If
|
||||
autospec is creating AVX2, AVX-512 or 32-bit, these actions will be
|
||||
repeated for each of those builds, before their respective make
|
||||
steps. This will be placed in the resulting ``.spec``, and is used
|
||||
for situations where fine-grained control is required.
|
||||
|
||||
install_prepend
|
||||
Additional actions that should take place directly after
|
||||
``%install`` but before the ``%make_install`` macro (or equivalent).
|
||||
|
||||
@@ -50,6 +50,7 @@ install_macro = "%make_install"
|
||||
disable_static = "--disable-static"
|
||||
prep_prepend = []
|
||||
build_prepend = []
|
||||
make_prepend = []
|
||||
install_prepend = []
|
||||
install_append = []
|
||||
patches = []
|
||||
@@ -549,6 +550,7 @@ def parse_config_files(path, bump, filemanager, version):
|
||||
global disable_static
|
||||
global prep_prepend
|
||||
global build_prepend
|
||||
global make_prepend
|
||||
global install_prepend
|
||||
global install_append
|
||||
global patches
|
||||
@@ -814,6 +816,7 @@ def parse_config_files(path, bump, filemanager, version):
|
||||
prep_prepend = read_conf_file(os.path.join(path, "prep_prepend"))
|
||||
if os.path.isfile(os.path.join(path, "prep_append")):
|
||||
os.rename(os.path.join(path, "prep_append"), os.path.join(path, "build_prepend"))
|
||||
make_prepend = read_conf_file(os.path.join(path, "make_prepend"))
|
||||
build_prepend = read_conf_file(os.path.join(path, "build_prepend"))
|
||||
install_prepend = read_conf_file(os.path.join(path, "install_prepend"))
|
||||
if os.path.isfile(os.path.join(path, "make_install_append")):
|
||||
@@ -843,6 +846,7 @@ def load_specfile(specfile):
|
||||
specfile.disable_static = disable_static
|
||||
specfile.prep_prepend = prep_prepend
|
||||
specfile.build_prepend = build_prepend
|
||||
specfile.make_prepend = make_prepend
|
||||
specfile.install_prepend = install_prepend
|
||||
specfile.install_append = install_append
|
||||
specfile.patches = patches
|
||||
|
||||
@@ -51,6 +51,7 @@ def commit_to_git(path):
|
||||
call("git add %s.tmpfiles" % tarball.name, check=False, stderr=subprocess.DEVNULL, cwd=path)
|
||||
call("git add prep_prepend", check=False, stderr=subprocess.DEVNULL, cwd=path)
|
||||
call("git add build_prepend", check=False, stderr=subprocess.DEVNULL, cwd=path)
|
||||
call("git add make_prepend", check=False, stderr=subprocess.DEVNULL, cwd=path)
|
||||
call("git add install_prepend", check=False, stderr=subprocess.DEVNULL, cwd=path)
|
||||
call("git add install_append", check=False, stderr=subprocess.DEVNULL, cwd=path)
|
||||
call("git add series", check=False, stderr=subprocess.DEVNULL, cwd=path)
|
||||
|
||||
@@ -76,6 +76,7 @@ class Specfile(object):
|
||||
self.cmake_srcdir = ".."
|
||||
self.prep_prepend = []
|
||||
self.build_prepend = []
|
||||
self.make_prepend = []
|
||||
self.install_prepend = []
|
||||
self.install_append = []
|
||||
self.excludes = []
|
||||
@@ -378,6 +379,11 @@ class Specfile(object):
|
||||
|
||||
make <config.parallel_build> <extra_make>
|
||||
"""
|
||||
if self.make_prepend:
|
||||
self._write_strip("## make_prepend content")
|
||||
for line in self.make_prepend:
|
||||
self._write_strip("{}\n".format(line))
|
||||
self._write_strip("## make_prepend end")
|
||||
if build32:
|
||||
self._write_strip("make {}{}{}".format(config.parallel_build, self.extra_make, self.extra32_make))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user