diff --git a/.gitignore b/.gitignore index b0f4d2f..4befd12 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ __pycache__ .mypy_cache +.pytest_cache .vscode -out mussels.egg-info diff --git a/mussels/cli.py b/mussels/cli.py index 81190ce..cb7f761 100755 --- a/mussels/cli.py +++ b/mussels/cli.py @@ -41,7 +41,7 @@ logging.basicConfig() module_logger = logging.getLogger("mussels") -coloredlogs.install(level="DEBUG") +coloredlogs.install(level="DEBUG", fmt="%(asctime)s %(name)s %(levelname)s %(message)s") module_logger.setLevel(logging.DEBUG) # @@ -213,7 +213,13 @@ def recipe_show(recipe: str, version: str, verbose: bool): is_flag=True, help="Print out the version dependency graph without actually doing a build. [optional]", ) -def recipe_build(recipe: str, version: str, cookbook: str, dry_run: bool): +@click.option( + "--force", + "-f", + is_flag=True, + help="Re-build a recipe, even if already built. [optional]", +) +def recipe_build(recipe: str, version: str, cookbook: str, dry_run: bool, force: bool): """ Download, extract, build, and install a recipe. """ @@ -222,7 +228,9 @@ def recipe_build(recipe: str, version: str, cookbook: str, dry_run: bool): results = [] - success = my_mussels.build_recipe(recipe, version, cookbook, results, dry_run) + success = my_mussels.build_recipe( + recipe, version, cookbook, results, dry_run, force + ) if success == False: sys.exit(1) @@ -249,8 +257,16 @@ def recipe_build(recipe: str, version: str, cookbook: str, dry_run: bool): is_flag=True, help="Print out the version dependency graph without actually doing a build. [optional]", ) +@click.option( + "--force", + "-f", + is_flag=True, + help="Re-build a recipe, even if already built. [optional]", +) @click.pass_context -def build_alias(ctx, recipe: str, version: str, cookbook: str, dry_run: bool): +def build_alias( + ctx, recipe: str, version: str, cookbook: str, dry_run: bool, force: bool +): """ Download, extract, build, and install a recipe. diff --git a/mussels/collections/Darwin/clamav_deps/0.102-dev/clamav_deps__0_102_dev.py b/mussels/collections/Darwin/clamav_deps/0.102-dev/clamav_deps__0_102_dev.py index 42727eb..4e113f7 100644 --- a/mussels/collections/Darwin/clamav_deps/0.102-dev/clamav_deps__0_102_dev.py +++ b/mussels/collections/Darwin/clamav_deps/0.102-dev/clamav_deps__0_102_dev.py @@ -26,6 +26,7 @@ class Recipe(BaseRecipe): """ name = "clamav_deps" - version = "0.102" + version = "0.102.0" is_collection = True + platform = ["Darwin"] dependencies = ["curl", "json_c", "libxml2", "openssl", "pcre2", "bzip2"] diff --git a/mussels/collections/Windows/clamav_deps/0.102-dev/clamav_deps__0_102_dev.py b/mussels/collections/Windows/clamav_deps/0.102-dev/clamav_deps__0_102_dev.py index 5d444bf..54055a8 100644 --- a/mussels/collections/Windows/clamav_deps/0.102-dev/clamav_deps__0_102_dev.py +++ b/mussels/collections/Windows/clamav_deps/0.102-dev/clamav_deps__0_102_dev.py @@ -26,8 +26,9 @@ class Recipe(BaseRecipe): """ name = "clamav_deps" - version = "0.102" + version = "0.102.0" is_collection = True + platform = ["Windows"] dependencies = [ "curl", "json_c", diff --git a/mussels/mussels.py b/mussels/mussels.py index 4229d61..3e2c17d 100644 --- a/mussels/mussels.py +++ b/mussels/mussels.py @@ -62,7 +62,7 @@ def __init__( self, data_dir: str = os.path.join(str(Path.home()), ".mussels"), log_file: str = os.path.join( - str(Path.home()), ".mussels", "log", "mussels.log" + str(Path.home()), ".mussels", "logs", "mussels.log" ), log_level: str = "DEBUG", ) -> None: @@ -159,8 +159,12 @@ def _read_cookbook(self, cookbook: str, cookbook_path: str) -> bool: sorted_tools: defaultdict = defaultdict(list) # Load the recipes and collections - recipes = read.recipes(os.path.join(cookbook_path, "recipes", platform.system())) - recipes.update(read.recipes(os.path.join(cookbook_path, "collections", platform.system()))) + recipes = read.recipes( + os.path.join(cookbook_path, "recipes", platform.system()) + ) + recipes.update( + read.recipes(os.path.join(cookbook_path, "collections", platform.system())) + ) sorted_recipes = sort_cookbook_by_version(recipes) self.cookbooks[cookbook]["recipes"] = sorted_recipes @@ -252,7 +256,12 @@ def _load_recipes(self) -> bool: return True def _build_recipe( - self, recipe: str, version: str, cookbook: str, toolchain: dict + self, + recipe: str, + version: str, + cookbook: str, + toolchain: dict, + force: bool = False, ) -> dict: """ Build a specific recipe. @@ -318,7 +327,7 @@ def _build_recipe( result["time elapsed"] = time.time() - start return result - if not builder._build(): + if not builder._build(force): self.logger.error(f"FAILURE: {recipe}-{version} build failed!\n") else: self.logger.info(f"Success: {recipe}-{version} build succeeded. :)\n") @@ -451,6 +460,7 @@ def build_recipe( cookbook: str, results: list, dry_run: bool = False, + force: bool = False, ) -> bool: """ Execute a build of a recipe. @@ -488,9 +498,9 @@ def print_results(results: list): recipe_str = f"{recipe}=={version}" if cookbook == "": - recipe_str = f"local:{recipe}" + recipe_str = f"local:{recipe_str}" else: - recipe_str = f"{cookbook}:{recipe}" + recipe_str = f"{cookbook}:{recipe_str}" batches = self._get_build_batches(recipe_str) @@ -615,6 +625,7 @@ def print_results(results: list): recipe_nvc.version, recipe_nvc.cookbook, toolchain, + force, ) results.append(result) if not result["success"]: diff --git a/mussels/recipe.py b/mussels/recipe.py index cd22ed2..8cd3c06 100644 --- a/mussels/recipe.py +++ b/mussels/recipe.py @@ -21,6 +21,7 @@ import datetime from distutils import dir_util +import glob import inspect from io import StringIO import logging @@ -88,6 +89,12 @@ class BaseRecipe(object): required_tools: list = [] # List of tools required by the build commands. # build_script is a dictionary containing build scripts for each build target. + # There are 3 types of scripts and each are optional: + # - "configure": To be run the first time you build, before the "make" script. + # Subsequent builds will not re-configure unless you use `-f` / `--force`. + # - "make": To be run each time you build, if the "configure" script succeeded. + # - "Install": To be run each time you build, if the "make" script succeeded. + # # Variables in "".format() syntax will be evaluated at build time. # Paths must have unix style forward slash (`/`) path separators. # @@ -101,8 +108,17 @@ class BaseRecipe(object): # """, # "x64": """ # """, - # "host": """ - # """, + # "host": { + # "configure": """ + # ./configure + # """, + # "make": """ + # make + # """, + # "install": """ + # make install PREFIX=`pwd`/install + # """, + # }, } builds: dict = {} # Dictionary of build paths. @@ -130,9 +146,9 @@ def __init__(self, toolchain: dict, data_dir: str = ""): self.logsdir = os.path.join(self.data_dir, "logs", "recipes") os.makedirs(self.logsdir, exist_ok=True) - self.workdir = os.path.join(self.data_dir, "work") + self.workdir = os.path.join(self.data_dir, "cache", "work") os.makedirs(self.workdir, exist_ok=True) - self.srcdir = os.path.join(self.data_dir, "src") + self.srcdir = os.path.join(self.data_dir, "cache", "src") os.makedirs(self.srcdir, exist_ok=True) self._init_logging() @@ -197,7 +213,7 @@ def _download_archive(self) -> bool: self.archive_name_change[0], self.archive_name_change[1] ) self.download_path = os.path.join( - os.path.expanduser("~"), "Downloads", self.archive + self.data_dir, "cache", "downloads", self.archive ) # Exit early if we already have the archive. @@ -205,7 +221,11 @@ def _download_archive(self) -> bool: self.logger.debug(f"Archive already downloaded.") return True - self.logger.info(f"Downloading {self.url} to {self.download_path}...") + if not os.path.exists(os.path.join(self.data_dir, "cache", "downloads")): + os.makedirs(os.path.join(self.data_dir, "cache", "downloads")) + + self.logger.info(f"Downloading {self.url}") + self.logger.info(f" to {self.download_path}...") if self.url.startswith("ftp"): try: @@ -281,32 +301,94 @@ def _install(self, build): # Create the target install paths, if it doesn't already exist. os.makedirs(os.path.split(dst_path)[0], exist_ok=True) - # Make sure it actually exists. - if not os.path.exists(src_path): - self.logger.error( - f"Required target files for installation do not exist:\n\t{src_path}" - ) - return False - # Remove prior installation, if exists. if os.path.isdir(dst_path): shutil.rmtree(dst_path) elif os.path.isfile(dst_path): os.remove(dst_path) - self.logger.debug(f"Copying: {src_path}") - self.logger.debug(f" to: {dst_path}") + for src_filepath in glob.glob(src_path): + # Make sure it actually exists. + if not os.path.exists(src_filepath): + self.logger.error( + f"Required target files for installation do not exist:\n\t{src_filepath}" + ) + return False + + self.logger.debug(f"Copying: {src_filepath}") + self.logger.debug(f" to: {dst_path}") - # Now copy the file or directory. - if os.path.isdir(src_path): - dir_util.copy_tree(src_path, dst_path) - else: - shutil.copyfile(src_path, dst_path) + # Now copy the file or directory. + if os.path.isdir(src_filepath): + dir_util.copy_tree(src_filepath, dst_path) + else: + shutil.copyfile(src_filepath, dst_path) self.logger.info(f"{self.name}-{self.version} {build} install succeeded.") return True - def _build(self) -> bool: + def _run_script(self, target, name, script) -> bool: + """ + Run a script in the current working directory. + """ + # Create a build script. + if platform.system() == "Windows": + script_name = f"_{name}.bat" + newline = "\r\n" + else: + script_name = f"_{name}.sh" + newline = "\n" + + with open(os.path.join(os.getcwd(), script_name), "w", newline=newline) as fd: + # Evaluate "".format() syntax in the build script + var_includes = os.path.join(self.installdir, target, "include").replace( + "\\", "/" + ) + var_libs = os.path.join(self.installdir, target, "lib").replace("\\", "/") + var_install = os.path.join(self.installdir).replace("\\", "/") + var_build = os.path.join(self.builds[target]).replace("\\", "/") + var_target = target + + script = script.format( + includes=var_includes, + libs=var_libs, + install=var_install, + build=var_build, + target=var_target, + ) + + # Write the build commands to a file + build_lines = script.splitlines() + for line in build_lines: + fd.write(line.strip() + "\n") + + if platform.system() != "Windows": + st = os.stat(script_name) + os.chmod(script_name, st.st_mode | stat.S_IEXEC) + + # Run the build script. + process = subprocess.Popen( + os.path.join(os.getcwd(), script_name), + shell=True, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + ) + with process.stdout: + for line in iter(process.stdout.readline, b""): + self.logger.debug(line.decode("utf-8").strip()) + process.wait() + if process.returncode != 0: + self.logger.warning(f"{self.name}-{self.version} {target} build failed!") + self.logger.warning(f"Command:") + for line in script.splitlines(): + self.logger.warning(line) + self.logger.warning(f"Exit code: {process.returncode}") + self.logger.error(f'"{name}" script failed for {target} build') + return False + + return True + + def _build(self, force: bool = False) -> bool: """ First, patch source materials if not already patched. Then, for each architecture, run the build commands if the output files don't already exist. @@ -351,137 +433,89 @@ def _build(self) -> bool: ) as patchmark: patchmark.write("patched") - for build in self.build_script: + for target in self.build_script: already_built = True # Check for prior completed build output. self.logger.info( - f"Attempting to build {self.name}-{self.version} for {build}" + f"Attempting to build {self.name}-{self.version} for {target}" ) - self.builds[build] = os.path.join( - self.workdir, f"{os.path.split(self.extracted_source_path)[-1]}-{build}" + self.builds[target] = os.path.join( + self.workdir, target, f"{os.path.split(self.extracted_source_path)[-1]}" ) - if os.path.exists(self.builds[build]): - self.logger.debug("Checking for prior build output...") - for install_path in self.install_paths[build]: - for install_item in self.install_paths[build][install_path]: - self.logger.debug(f"Checking for {install_item}") - - if not os.path.exists( - os.path.join( - self.installdir, - build, - install_path, - os.path.basename(install_item), - ) - ): - self.logger.debug(f"{install_item} not found.") - already_built = False - break - - if already_built == True: - # It looks like there was a successful prior build. Skip. - self.logger.info( - f"{self.name}-{self.version} {build} build output already exists." - ) - continue - else: - # It appears that the previous build is missing the desired build output. - # Maybe the previous build failed? - # Probably should delete the incomplete build directory and try again. - self.logger.debug(f"Removing dirty old {build} build directory:") - self.logger.debug(f" {self.builds[build]}") - shutil.rmtree(self.builds[build]) - - # Make our own copy of the extracted source so we don't dirty the original. - self.logger.debug( - f"Creating new {build} build directory from extracted sources:" - ) - self.logger.debug(f" {self.builds[build]}") - shutil.copytree(self.extracted_source_path, self.builds[build]) - else: - # Make our own copy of the extracted source so we don't dirty the original. - self.logger.debug( - f"Creating {build} build directory from extracted sources:" - ) - self.logger.debug(f"\t{self.builds[build]}") - shutil.copytree(self.extracted_source_path, self.builds[build]) - - # - # Run the build. - # - cwd = os.getcwd() - os.chdir(self.builds[build]) - # Add each tool from the toolchain to the PATH environment variable. for tool in self.toolchain: for path_mod in self.toolchain[tool].path_mods[ self.toolchain[tool].installed - ][build]: + ][target]: os.environ["PATH"] = path_mod + os.pathsep + os.environ["PATH"] - # Create a build script. - if platform.system() == "Windows": - script_name = "build.bat" - newline = "\r\n" - else: - script_name = "build.sh" - newline = "\n" - - with open( - os.path.join(os.getcwd(), script_name), "w", newline=newline - ) as fd: - # Evaluate "".format() syntax in the build script - var_includes = os.path.join(self.installdir, build, "include").replace( - "\\", "/" - ) - var_libs = os.path.join(self.installdir, build, "lib").replace( - "\\", "/" - ) - var_install = os.path.join(self.installdir).replace("\\", "/") - var_build = os.path.join(self.builds[build]).replace("\\", "/") - - self.build_script[build] = self.build_script[build].format( - includes=var_includes, - libs=var_libs, - install=var_install, - build=var_build, + cwd = os.getcwd() + build_path_exists = os.path.exists(self.builds[target]) + + if build_path_exists: + if force: + # Remove previous built, start over. + self.logger.info( + f"--force: Removing previous {target} build directory:" + ) + self.logger.info(f" {self.builds[target]}") + shutil.rmtree(self.builds[target]) + build_path_exists = False + + if not build_path_exists: + os.makedirs(os.path.join(self.workdir, target), exist_ok=True) + + # Make our own copy of the extracted source so we don't dirty the original. + self.logger.debug( + f"Creating new {target} build directory from extracted sources:" ) + self.logger.debug(f" {self.builds[target]}") + shutil.copytree(self.extracted_source_path, self.builds[target]) + + os.chdir(self.builds[target]) + + # Run "configure" script, if exists. + if "configure" in self.build_script[target].keys(): + if not self._run_script( + target, "configure", self.build_script[target]["configure"] + ): + self.logger.error( + f"{self.name}-{self.version} {target} build failed." + ) + os.chdir(cwd) + return False - # Write the build commands to a file - build_lines = self.build_script[build].splitlines() - for line in build_lines: - fd.write(line.strip() + "\n") - - if platform.system() != "Windows": - st = os.stat(script_name) - os.chmod(script_name, st.st_mode | stat.S_IEXEC) - - # Run the build script. - process = subprocess.Popen( - os.path.join(os.getcwd(), script_name), - shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - ) - with process.stdout: - for line in iter(process.stdout.readline, b""): - self.logger.debug(line.decode("utf-8").strip()) - process.wait() - if process.returncode != 0: - self.logger.warning(f"{self.name}-{self.version} {build} build failed!") - self.logger.warning(f"Command:") - for line in self.build_script[build].splitlines(): - self.logger.warning(line) - self.logger.warning(f"Exit code: {process.returncode}") - os.chdir(cwd) - return False + else: + os.chdir(self.builds[target]) + + # Run "make" script, if exists. + if "make" in self.build_script[target].keys(): + if not self._run_script( + target, "make", self.build_script[target]["make"] + ): + self.logger.error( + f"{self.name}-{self.version} {target} build failed." + ) + os.chdir(cwd) + return False + + # Run "install" script, if exists. + if "install" in self.build_script[target].keys(): + if not self._run_script( + target, "install", self.build_script[target]["install"] + ): + self.logger.error( + f"{self.name}-{self.version} {target} build failed." + ) + os.chdir(cwd) + return False - self.logger.info(f"{self.name}-{self.version} {build} build succeeded.") + self.logger.info(f"{self.name}-{self.version} {target} build succeeded.") os.chdir(cwd) - if self._install(build) == False: + if self._install(target) == False: return False return True diff --git a/mussels/recipes/Darwin/bzip2/1.0.7/bzip2__1_0_7.py b/mussels/recipes/Darwin/bzip2/1.0.7/bzip2__1_0_7.py index 3c1ed94..05a714d 100644 --- a/mussels/recipes/Darwin/bzip2/1.0.7/bzip2__1_0_7.py +++ b/mussels/recipes/Darwin/bzip2/1.0.7/bzip2__1_0_7.py @@ -27,31 +27,20 @@ class Recipe(BaseRecipe): name = "bzip2" version = "1.0.7" url = "https://sourceware.org/pub/bzip2/bzip2-1.0.7.tar.gz" - install_paths = { - "host": { - "include": ["install/include/bzlib.h"], - "lib": [os.path.join("install/lib/libbz2.a")], - "bin": [ - os.path.join("install/bin/bunzip2"), - os.path.join("install/bin/bzcat"), - os.path.join("install/bin/bzcmp"), - os.path.join("install/bin/bzdiff"), - os.path.join("install/bin/bzegrep"), - os.path.join("install/bin/bzfgrep"), - os.path.join("install/bin/bzip2"), - os.path.join("install/bin/bzip2recover"), - os.path.join("install/bin/bzless"), - os.path.join("install/bin/bzmore"), - ], - } - } + install_paths = {"host": {"license/bzip2": ["LICENSE"]}} platform = ["Darwin"] dependencies = [] required_tools = ["make", "clang"] build_script = { - "host": """ - ./configure - make - make install PREFIX=`pwd`/install - """ + "host": { + "configure": """ + ./configure + """, + "make": """ + make + """, + "install": """ + make install PREFIX=`pwd`/install + """, + } } diff --git a/mussels/recipes/Darwin/bzip2/1.1.0/bzip2__1_1_0.py b/mussels/recipes/Darwin/bzip2/1.1.0/bzip2__1_1_0.py index 98447d0..f1f6e3d 100644 --- a/mussels/recipes/Darwin/bzip2/1.1.0/bzip2__1_1_0.py +++ b/mussels/recipes/Darwin/bzip2/1.1.0/bzip2__1_1_0.py @@ -24,37 +24,24 @@ class Recipe(BaseRecipe): Recipe to build bzip2. """ - name = "bzip2-dev" + name = "bzip2" version = "1.1.0" url = "https://gitlab.com/federicomenaquintero/bzip2/-/archive/master/bzip2-master.tar.gz" - install_paths = { - "host": { - "include": ["bzlib.h"], - "lib": [ - os.path.join("libbz2.1.1.0.dylib"), - os.path.join("libbz2.1.dylib"), - os.path.join("libbz2.a"), - ], - "bin": [ - os.path.join("bunzip2"), - os.path.join("bzcat"), - os.path.join("bzcmp"), - os.path.join("bzdiff"), - os.path.join("bzegrep"), - os.path.join("bzfgrep"), - os.path.join("bzip2"), - os.path.join("bzip2recover"), - os.path.join("bzless"), - os.path.join("bzmore"), - ], - } - } + install_paths = {"host": {"license/bzip2": ["COPYING"]}} platform = ["Darwin"] dependencies = [] required_tools = ["cmake", "clang"] build_script = { - "host": """ - cmake . - cmake --build . --config Release - """ + "host": { + "configure": """ + cmake . \ + -DCMAKE_INSTALL_PREFIX="{install}/{target}" + """, + "make": """ + cmake --build . --config Release + """, + "install": """ + make install + """, + } } diff --git a/mussels/recipes/Darwin/clamav/0.101.2/clamav__0_101_2.py b/mussels/recipes/Darwin/clamav/0.101.2/clamav__0_101_2.py index 9d7cbd0..1cd5641 100644 --- a/mussels/recipes/Darwin/clamav/0.101.2/clamav__0_101_2.py +++ b/mussels/recipes/Darwin/clamav/0.101.2/clamav__0_101_2.py @@ -30,40 +30,42 @@ class Recipe(BaseRecipe): url = "https://www.clamav.net/downloads/production/clamav-0.101.2.tar.gz" install_paths = { "host": { - "include": [ - os.path.join("libclamav", "clamav.h"), - os.path.join("clamav-types.h"), - ], - "lib": [ - os.path.join("libclamav", "libclamav.dylib"), - os.path.join("libfreshclam", "libfreshclam.dylib"), - os.path.join("libclamunrar", "libclamunrar.dylib"), - os.path.join("libclamunrar_iface", "libclamunrar_iface.dylib"), - os.path.join("mspack", "mspack.dylib"), - ], - "bin": [ - os.path.join("clambc", "clambc"), - os.path.join("clamconf", "clamconf"), - os.path.join("clamd", "clamd"), - os.path.join("clamdscan", "clamdscan"), - os.path.join("clamscan", "clamscan"), - os.path.join("clamsubmit", "clamsubmit"), - os.path.join("freshclam", "freshclam"), - os.path.join("sigtool", "sigtool"), - ], - "etc": [ - os.path.join("etc", "clamd.conf.sample"), - os.path.join("etc", "freshclam.conf.sample"), - ], + "license/clamav": ["COPYING*"], + "etc": ["etc/clamd.conf.sample", "etc/freshclam.conf.sample"], + "share/clamav": ["database/main.cvd", "database/daily.cvd"], } } platform = ["Darwin"] - dependencies = ["curl", "json_c", "libxml2", "openssl", "pcre2", "bzip2"] + dependencies = ["curl", "json_c", "libxml2", "openssl", "pcre2", "bzip2-1.0.7"] required_tools = ["make", "clang"] build_script = { - "host": """ - chmod +x ./configure - ./configure --with-libcurl={install}/host --with-libjson={install}/host --with-xml={install}/host --with-openssl={install}/host --with-pcre={install}/host --with-libbz2-prefix={install}/host --enable-llvm --with-system-llvm=no - make - """ + "host": { + "configure": """ + chmod +x ./configure ./config/install-sh + ./configure \ + --with-libcurl={install}/{target} \ + --with-libjson={install}/{target} \ + --with-xml={install}/{target} \ + --with-openssl={install}/{target} \ + --with-pcre={install}/{target} \ + --with-zlib={install}/{target} \ + --with-libbz2-prefix={install}/{target} \ + --prefix="{install}/{target}" \ + --with-systemdsystemunitdir=no + """, + "make": """ + make + """, + "install": """ + make install + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/clambc" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/clamconf" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/clamdscan" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/clamscan" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/clamsubmit" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/freshclam" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/sigtool" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/sbin/clamd" + """, + } } diff --git a/mussels/recipes/Darwin/clamav/0.102-dev/clamav__0_102_dev.py b/mussels/recipes/Darwin/clamav/0.102-dev/clamav__0_102_dev.py index aec1086..ecc9c22 100644 --- a/mussels/recipes/Darwin/clamav/0.102-dev/clamav__0_102_dev.py +++ b/mussels/recipes/Darwin/clamav/0.102-dev/clamav__0_102_dev.py @@ -26,45 +26,48 @@ class Recipe(BaseRecipe): """ name = "clamav" - version = "0.102" + version = "0.102.0" url = "https://github.com/Cisco-Talos/clamav-devel/archive/dev/0.102.zip" archive_name_change = ("0.102", "clamav-devel-dev-0.102") install_paths = { "host": { - "include": [ - os.path.join("libclamav", "clamav.h"), - os.path.join("clamav-types.h"), - ], - "lib": [ - os.path.join("libclamav", "libclamav.dylib"), - os.path.join("libfreshclam", "libfreshclam.dylib"), - os.path.join("libclamunrar", "libclamunrar.dylib"), - os.path.join("libclamunrar_iface", "libclamunrar_iface.dylib"), - os.path.join("mspack", "mspack.dylib"), - ], - "bin": [ - os.path.join("clambc", "clambc"), - os.path.join("clamconf", "clamconf"), - os.path.join("clamd", "clamd"), - os.path.join("clamdscan", "clamdscan"), - os.path.join("clamscan", "clamscan"), - os.path.join("clamsubmit", "clamsubmit"), - os.path.join("freshclam", "freshclam"), - os.path.join("sigtool", "sigtool"), - ], - "etc": [ - os.path.join("etc", "clamd.conf.sample"), - os.path.join("etc", "freshclam.conf.sample"), - ], + "license/clamav": ["COPYING*"], + "etc": ["etc/clamd.conf.sample", "etc/freshclam.conf.sample"], + "share/clamav": ["database/main.cvd", "database/daily.cvd"], } } platform = ["Darwin"] - dependencies = ["curl", "json_c", "libxml2", "openssl", "pcre2", "bzip2"] + dependencies = ["curl", "json_c", "libxml2", "openssl", "pcre2", "bzip2-1.0.7"] required_tools = ["make", "clang"] build_script = { - "host": """ - chmod +x ./configure - ./configure --with-libcurl={install}/host --with-libjson={install}/host --with-xml={install}/host --with-openssl={install}/host --with-pcre={install}/host --with-libbz2-prefix={install}/host --enable-llvm --with-system-llvm=no - make - """ + "host": { + "configure": """ + chmod +x ./configure ./config/install-sh + ./configure \ + --with-libcurl={install}/{target} \ + --with-libjson={install}/{target} \ + --with-xml={install}/{target} \ + --with-openssl={install}/{target} \ + --with-pcre={install}/{target} \ + --with-zlib={install}/{target} \ + --with-libbz2-prefix={install}/{target} \ + --enable-llvm --with-system-llvm=no \ + --prefix="{install}/{target}" \ + --with-systemdsystemunitdir=no + """, + "make": """ + make + """, + "install": """ + make install + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/clambc" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/clamconf" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/clamdscan" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/clamscan" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/clamsubmit" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/freshclam" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/bin/sigtool" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/sbin/clamd" + """, + } } diff --git a/mussels/recipes/Darwin/curl/1.2.11/curl__1_2_11.py b/mussels/recipes/Darwin/curl/1.2.11/curl__1_2_11.py index 181fbc0..c44b7c6 100644 --- a/mussels/recipes/Darwin/curl/1.2.11/curl__1_2_11.py +++ b/mussels/recipes/Darwin/curl/1.2.11/curl__1_2_11.py @@ -27,34 +27,36 @@ class Recipe(BaseRecipe): name = "curl" version = "7.64.0" url = "https://curl.haxx.se/download/curl-7.64.0.zip" - install_paths = { - "host": { - "include": [os.path.join("include", "curl")], - "lib": [ - os.path.join("lib", "libcurl.dylib"), - ], - }, - } + install_paths = {"host": {"license/curl": ["COPYING"]}} platform = ["Darwin"] dependencies = ["openssl", "nghttp2>=1.0.0", "libssh2", "zlib"] required_tools = ["cmake", "clang"] build_script = { - "host": """ - cmake . \ - -DCMAKE_CONFIGURATION_TYPES=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DCMAKE_USE_OPENSSL=ON \ - -DOPENSSL_INCLUDE_DIR="{includes}" \ - -DOPENSSL_LIBRARIES="{libs}" \ - -DOPENSSL_CRYPTO_LIBRARY="{libs}/libcrypto.1.1.dylib" \ - -DOPENSSL_SSL_LIBRARY="{libs}/libssl.1.1.dylib" \ - -DZLIB_INCLUDE_DIR="{includes}" \ - -DZLIB_LIBRARY_RELEASE="{libs}/libz.a" \ - -DLIBSSH2_INCLUDE_DIR="{includes}" \ - -DLIBSSH2_LIBRARY="{libs}/libssh2.dylib" \ - -DUSE_NGHTTP2=ON \ - -DNGHTTP2_INCLUDE_DIR="{includes}" \ - -DNGHTTP2_LIBRARY="{libs}/libnghttp2.dylib" - cmake --build . --config Release - """, + "host": { + "configure": """ + cmake . \ + -DCMAKE_CONFIGURATION_TYPES=Release \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_USE_OPENSSL=ON \ + -DOPENSSL_INCLUDE_DIR="{includes}" \ + -DOPENSSL_LIBRARIES="{libs}" \ + -DOPENSSL_CRYPTO_LIBRARY="{libs}/libcrypto.1.1.dylib" \ + -DOPENSSL_SSL_LIBRARY="{libs}/libssl.1.1.dylib" \ + -DZLIB_INCLUDE_DIR="{includes}" \ + -DZLIB_LIBRARY_RELEASE="{libs}/libz.a" \ + -DLIBSSH2_INCLUDE_DIR="{includes}" \ + -DLIBSSH2_LIBRARY="{libs}/libssh2.dylib" \ + -DUSE_NGHTTP2=ON \ + -DNGHTTP2_INCLUDE_DIR="{includes}" \ + -DNGHTTP2_LIBRARY="{libs}/libnghttp2.dylib" \ + -DCMAKE_INSTALL_PREFIX="{install}/{target}" + """, + "make": """ + cmake --build . --config Release + """, + "install": """ + make install + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/lib/libcurl.dylib" + """, + } } diff --git a/mussels/recipes/Darwin/json_c/0.13.1/json_c__0_13_1.py b/mussels/recipes/Darwin/json_c/0.13.1/json_c__0_13_1.py index 5af7d36..7e96778 100644 --- a/mussels/recipes/Darwin/json_c/0.13.1/json_c__0_13_1.py +++ b/mussels/recipes/Darwin/json_c/0.13.1/json_c__0_13_1.py @@ -28,38 +28,21 @@ class Recipe(BaseRecipe): name = "json_c" version = "0.13.1" url = "https://s3.amazonaws.com/json-c_releases/releases/json-c-0.13.1.tar.gz" - install_paths = { - "host": { - "include/json-c": [ - os.path.join("arraylist.h"), - os.path.join("bits.h"), - os.path.join("debug.h"), - os.path.join("json.h"), - os.path.join("json_c_version.h"), - os.path.join("json_inttypes.h"), - os.path.join("json_object.h"), - os.path.join("json_object_iterator.h"), - os.path.join("json_pointer.h"), - os.path.join("json_tokener.h"), - os.path.join("json_util.h"), - os.path.join("json_visit.h"), - os.path.join("linkhash.h"), - os.path.join("printbuf.h"), - os.path.join("json_config.h"), - ], - "lib": [ - os.path.join(".libs", "libjson-c.4.dylib"), - os.path.join(".libs", "libjson-c.dylib"), - os.path.join(".libs", "libjson-c.a"), - ], - } - } + install_paths = {"host": {"license/json-c": ["COPYING"]}} platform = ["Darwin"] dependencies = [] required_tools = ["make", "clang"] build_script = { - "host": """ - ./configure - make - """ + "host": { + "configure": """ + ./configure \ + --prefix="{install}/{target}" + """, + "make": """ + make + """, + "install": """ + make install + """, + } } diff --git a/mussels/recipes/Darwin/libssh2/1.8.1/libssh2__1_8_1.py b/mussels/recipes/Darwin/libssh2/1.8.1/libssh2__1_8_1.py index eeb28c6..eb1da85 100644 --- a/mussels/recipes/Darwin/libssh2/1.8.1/libssh2__1_8_1.py +++ b/mussels/recipes/Darwin/libssh2/1.8.1/libssh2__1_8_1.py @@ -18,6 +18,7 @@ from mussels.recipe import BaseRecipe + class Recipe(BaseRecipe): """ Recipe to build libssh2. @@ -26,35 +27,31 @@ class Recipe(BaseRecipe): name = "libssh2" version = "1.8.1" url = "https://www.libssh2.org/download/libssh2-1.8.1.tar.gz" - install_paths = { - "host": { - "include": [ - os.path.join("include", "libssh2.h"), - os.path.join("include", "libssh2_publickey.h"), - os.path.join("include", "libssh2_sftp.h"), - ], - "lib": [ - os.path.join("src", "libssh2.1.0.1.dylib"), - os.path.join("src", "libssh2.1.dylib"), - os.path.join("src", "libssh2.dylib"), - ], - } - } + install_paths = {"host": {"license/libssh2": ["COPYING"]}} platform = ["Darwin"] dependencies = ["openssl>=1.1.0", "zlib"] required_tools = ["cmake", "clang"] build_script = { - "host": """ - cmake . \ - -DCRYPTO_BACKEND=OpenSSL \ - -DBUILD_SHARED_LIBS=ON \ - -DOPENSSL_INCLUDE_DIR="{includes}" \ - -DOPENSSL_LIBRARIES="{libs}" \ - -DOPENSSL_CRYPTO_LIBRARY="{libs}/libcrypto.1.1.dylib" \ - -DOPENSSL_SSL_LIBRARY="{libs}/libssl.1.1.dylib" \ - -DENABLE_ZLIB_COMPRESSION=ON \ - -DZLIB_INCLUDE_DIR="{includes}" \ - -DZLIB_LIBRARY_RELEASE="{libs}/libz.a" - cmake --build . --config Release - """ + "host": { + "configure": """ + cmake . \ + -DCRYPTO_BACKEND=OpenSSL \ + -DBUILD_SHARED_LIBS=ON \ + -DOPENSSL_INCLUDE_DIR="{includes}" \ + -DOPENSSL_LIBRARIES="{libs}" \ + -DOPENSSL_CRYPTO_LIBRARY="{libs}/libcrypto.1.1.dylib" \ + -DOPENSSL_SSL_LIBRARY="{libs}/libssl.1.1.dylib" \ + -DENABLE_ZLIB_COMPRESSION=ON \ + -DZLIB_INCLUDE_DIR="{includes}" \ + -DZLIB_LIBRARY_RELEASE="{libs}/libz.a" \ + -DCMAKE_INSTALL_PREFIX="{install}/{target}" + """, + "make": """ + cmake --build . --config Release + """, + "install": """ + make install + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/lib/libssh2.dylib" + """, + } } diff --git a/mussels/recipes/Darwin/libxml2/2.9.9/libxml2__2_9_9.py b/mussels/recipes/Darwin/libxml2/2.9.9/libxml2__2_9_9.py index b59aa8e..ea8ec77 100644 --- a/mussels/recipes/Darwin/libxml2/2.9.9/libxml2__2_9_9.py +++ b/mussels/recipes/Darwin/libxml2/2.9.9/libxml2__2_9_9.py @@ -28,22 +28,24 @@ class Recipe(BaseRecipe): name = "libxml2" version = "2.9.9" url = "ftp://xmlsoft.org/libxml2/libxml2-2.9.9.tar.gz" - install_paths = { - "host": { - "include": ["libxml.h", os.path.join("include", "libxml")], - "lib": [ - os.path.join(".libs", "libxml2.2.dylib"), - os.path.join(".libs", "libxml2.dylib"), - os.path.join(".libs", "libxml2.a"), - ], - } - } + install_paths = {"host": {"license/libxml2": ["COPYING"]}} platform = ["Darwin"] dependencies = [] required_tools = ["make", "clang"] build_script = { - "host": """ - ./configure zlib=no incdir="{includes}" libdir="{libs}" sodir="{libs}" iconv=no static=no - make - """ + "host": { + "configure": """ + ./configure \ + --with-zlib={install}/{target} \ + --with-iconv=no \ + --prefix="{install}/{target}" + """, + "make": """ + make + """, + "install": """ + make install + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/lib/libxml2.2.dylib" + """, + } } diff --git a/mussels/recipes/Darwin/nghttp2/1.36.0/nghttp2__1_36_0.py b/mussels/recipes/Darwin/nghttp2/1.36.0/nghttp2__1_36_0.py index 25f936b..6bcb1d0 100644 --- a/mussels/recipes/Darwin/nghttp2/1.36.0/nghttp2__1_36_0.py +++ b/mussels/recipes/Darwin/nghttp2/1.36.0/nghttp2__1_36_0.py @@ -28,34 +28,33 @@ class Recipe(BaseRecipe): version = "1.36.0" url = "https://github.com/nghttp2/nghttp2/archive/v1.36.0.zip" archive_name_change = ("v", "nghttp2-") - install_paths = { - "host": { - "include": [os.path.join("lib", "includes", "nghttp2")], - "lib": [ - os.path.join("lib", "libnghttp2.14.17.1.dylib"), - os.path.join("lib", "libnghttp2.14.dylib"), - os.path.join("lib", "libnghttp2.dylib"), - os.path.join("lib", "libnghttp2.a"), - ], - } - } + install_paths = {"host": {"license/nghttp2": ["COPYING"]}} platform = ["Darwin"] dependencies = ["openssl>=1.0.1", "zlib>=1.2.3", "libxml2>=2.9.9"] required_tools = ["cmake", "clang"] build_script = { - "host": """ - cmake . \ - -DCMAKE_CONFIGURATION_TYPES=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DOPENSSL_ROOT_DIR="{install}" \ - -DOPENSSL_INCLUDE_DIR="{includes}" \ - -DOPENSSL_LIBRARIES="{libs}" \ - -DOPENSSL_CRYPTO_LIBRARY="{libs}/libcrypto.1.1.dylib" \ - -DOPENSSL_SSL_LIBRARY="{libs}/libssl.1.1.dylib" \ - -DLIBXML2_INCLUDE_DIR="{includes}" \ - -DLIBXML2_LIBRARY="{libs}/libxml2.dylib" \ - -DZLIB_ROOT="{includes}" \ - -DZLIB_LIBRARY="{libs}/libz.a" - cmake --build . --config Release - """ + "host": { + "configure": """ + cmake . \ + -DCMAKE_CONFIGURATION_TYPES=Release \ + -DBUILD_SHARED_LIBS=ON \ + -DOPENSSL_ROOT_DIR="{install}" \ + -DOPENSSL_INCLUDE_DIR="{includes}" \ + -DOPENSSL_LIBRARIES="{libs}" \ + -DOPENSSL_CRYPTO_LIBRARY="{libs}/libcrypto.1.1.dylib" \ + -DOPENSSL_SSL_LIBRARY="{libs}/libssl.1.1.dylib" \ + -DLIBXML2_INCLUDE_DIR="{includes}" \ + -DLIBXML2_LIBRARY="{libs}/libxml2.dylib" \ + -DZLIB_ROOT="{includes}" \ + -DZLIB_LIBRARY="{libs}/libz.a" \ + -DCMAKE_INSTALL_PREFIX="{install}/{target}" + """, + "make": """ + cmake --build . --config Release + """, + "install": """ + make install + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/lib/libnghttp2.dylib" + """, + } } diff --git a/mussels/recipes/Darwin/openssl/1.1.0j/openssl__1_1_0j.py b/mussels/recipes/Darwin/openssl/1.1.0j/openssl__1_1_0j.py index 3913a6d..1ed41e6 100644 --- a/mussels/recipes/Darwin/openssl/1.1.0j/openssl__1_1_0j.py +++ b/mussels/recipes/Darwin/openssl/1.1.0j/openssl__1_1_0j.py @@ -27,23 +27,25 @@ class Recipe(BaseRecipe): name = "openssl" version = "1.1.0j" url = "https://www.openssl.org/source/openssl-1.1.0j.tar.gz" - install_paths = { - "host": { - "include": [os.path.join("include", "openssl")], - "lib": [ - os.path.join("libssl.1.1.dylib"), - os.path.join("libssl.a"), - os.path.join("libcrypto.1.1.dylib"), - os.path.join("libcrypto.a"), - ], - } - } + install_paths = {"host": {"license/openssl": ["LICENSE"]}} platform = ["Darwin"] dependencies = ["zlib"] required_tools = ["make", "clang"] build_script = { - "host": """ - ./config zlib --with-zlib-include="{includes}" --with-zlib-lib="{libs}" - make - """ + "host": { + "configure": """ + ./config zlib \ + --with-zlib-include="{includes}" \ + --with-zlib-lib="{libs}" \ + --prefix="{install}/{target}" + """, + "make": """ + make + """, + "make": """ + make install + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/lib/libcrypto.1.1.dylib" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/lib/libssl.1.1.dylib" + """, + } } diff --git a/mussels/recipes/Darwin/openssl/1.1.1b/openssl__1_1_1b.py b/mussels/recipes/Darwin/openssl/1.1.1b/openssl__1_1_1b.py index 3790502..9127cf9 100644 --- a/mussels/recipes/Darwin/openssl/1.1.1b/openssl__1_1_1b.py +++ b/mussels/recipes/Darwin/openssl/1.1.1b/openssl__1_1_1b.py @@ -27,25 +27,26 @@ class Recipe(BaseRecipe): name = "openssl" version = "1.1.1b" url = "https://www.openssl.org/source/openssl-1.1.1b.tar.gz" - install_paths = { - "host": { - "include": [os.path.join("include", "openssl")], - "lib": [ - os.path.join("libssl.1.1.dylib"), - os.path.join("libssl.dylib"), - os.path.join("libssl.a"), - os.path.join("libcrypto.1.1.dylib"), - os.path.join("libcrypto.dylib"), - os.path.join("libcrypto.a"), - ], - } - } + install_paths = {"host": {"license/openssl": ["LICENSE"]}} platform = ["Darwin"] dependencies = ["zlib"] required_tools = ["make", "clang"] build_script = { - "host": """ - ./config zlib --with-zlib-include="{includes}" --with-zlib-lib="{libs}" - make - """ + "host": { + "configure": """ + ./config \ + --prefix="{install}/{target}" \ + zlib \ + --with-zlib-include="{includes}" \ + --with-zlib-lib="{libs}" + """, + "make": """ + make + """, + "make": """ + make install + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/lib/libcrypto.1.1.dylib" + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/lib/libssl.1.1.dylib" + """, + } } diff --git a/mussels/recipes/Darwin/pcre2/10.33/pcre2__10_33.py b/mussels/recipes/Darwin/pcre2/10.33/pcre2__10_33.py index 06b234f..9ffabfb 100644 --- a/mussels/recipes/Darwin/pcre2/10.33/pcre2__10_33.py +++ b/mussels/recipes/Darwin/pcre2/10.33/pcre2__10_33.py @@ -27,23 +27,22 @@ class Recipe(BaseRecipe): name = "pcre2" version = "10.33" url = "https://ftp.pcre.org/pub/pcre/pcre2-10.33.zip" - install_paths = { - "host": { - "include": [os.path.join("pcre2.h")], - "lib": [os.path.join("libpcre2-8.dylib")], - } - } + install_paths = {"host": {"license/pcre2": ["COPYING"]}} platform = ["Darwin"] dependencies = ["bzip2", "zlib"] required_tools = ["cmake", "clang"] build_script = { - "host": """ - cmake . \ - -DBUILD_SHARED_LIBS=ON \ - -DZLIB_INCLUDE_DIR="{includes}" \ - -DZLIB_LIBRARY_RELEASE="{libs}/libz.a" \ - -DBZIP2_INCLUDE_DIR="{includes}" \ - -DBZIP2_LIBRARY_RELEASE="{libs}/libbz2.a" - cmake --build . --config Release - """ + "host": { + "configure": """ + chmod +x ./configure ./install-sh + ./configure --prefix="{install}/{target}" --disable-dependency-tracking + """, + "make": """ + make + """, + "install": """ + make install + install_name_tool -add_rpath @executable_path/../lib "{install}/{target}/lib/libpcre2-8.dylib" + """, + } } diff --git a/mussels/recipes/Darwin/zlib/1.2.11/zlib__1_2_11.py b/mussels/recipes/Darwin/zlib/1.2.11/zlib__1_2_11.py index f01c461..d43fcd5 100644 --- a/mussels/recipes/Darwin/zlib/1.2.11/zlib__1_2_11.py +++ b/mussels/recipes/Darwin/zlib/1.2.11/zlib__1_2_11.py @@ -27,24 +27,21 @@ class Recipe(BaseRecipe): name = "zlib" version = "1.2.11" url = "https://www.zlib.net/zlib-1.2.11.tar.gz" - install_paths = { - "host": { - "include": ["zlib.h", "zconf.h"], - "lib": [ - os.path.join("libz.1.2.11.dylib"), - os.path.join("libz.1.dylib"), - os.path.join("libz.dylib"), - os.path.join("libz.a"), - ], - "bin": [os.path.join("minigzip")], - } - } + install_paths = {"host": {"license/zlib": ["README"]}} platform = ["Darwin"] dependencies = [] required_tools = ["cmake", "clang"] build_script = { - "host": """ - cmake . - cmake --build . --config Release - """ + "host": { + "configure": """ + cmake . \ + -DCMAKE_INSTALL_PREFIX="{install}/{target}" + """, + "make": """ + cmake --build . --config Release + """, + "install": """ + make install + """, + } } diff --git a/mussels/recipes/Windows/bzip2/1.0.6/bzip2__1_0_6.py b/mussels/recipes/Windows/bzip2/1.0.6/bzip2__1_0_6.py index da7a3c5..17bda21 100644 --- a/mussels/recipes/Windows/bzip2/1.0.6/bzip2__1_0_6.py +++ b/mussels/recipes/Windows/bzip2/1.0.6/bzip2__1_0_6.py @@ -32,12 +32,14 @@ class Recipe(BaseRecipe): url = "https://downloads.sourceforge.net/project/bzip2/bzip2-1.0.6.tar.gz" install_paths = { "x86": { + "license/bzip2": ["LICENSE"], "include": ["bzlib.h"], - "lib": [os.path.join("libbz2.dll"), os.path.join("libbz2.lib")], + "lib": ["libbz2.dll", "libbz2.lib"], }, "x64": { + "license/bzip2": ["LICENSE"], "include": ["bzlib.h"], - "lib": [os.path.join("libbz2.dll"), os.path.join("libbz2.lib")], + "lib": ["libbz2.dll", "libbz2.lib"], }, } platform = ["Windows"] diff --git a/mussels/recipes/Windows/bzip2/1.0.7/bzip2__1_0_7.py b/mussels/recipes/Windows/bzip2/1.0.7/bzip2__1_0_7.py index a961449..174612c 100644 --- a/mussels/recipes/Windows/bzip2/1.0.7/bzip2__1_0_7.py +++ b/mussels/recipes/Windows/bzip2/1.0.7/bzip2__1_0_7.py @@ -32,12 +32,14 @@ class Recipe(BaseRecipe): url = "https://sourceware.org/pub/bzip2/bzip2-1.0.7.tar.gz" install_paths = { "x86": { + "license/bzip2": ["LICENSE"], "include": ["bzlib.h"], - "lib": [os.path.join("libbz2.dll"), os.path.join("libbz2.lib")], + "lib": ["libbz2.dll", "libbz2.lib"], }, "x64": { + "license/bzip2": ["LICENSE"], "include": ["bzlib.h"], - "lib": [os.path.join("libbz2.dll"), os.path.join("libbz2.lib")], + "lib": ["libbz2.dll", "libbz2.lib"], }, } platform = ["Windows"] diff --git a/mussels/recipes/Windows/bzip2/1.1.0/bzip2__1_1_0.py b/mussels/recipes/Windows/bzip2/1.1.0/bzip2__1_1_0.py index 615506a..56a4b62 100644 --- a/mussels/recipes/Windows/bzip2/1.1.0/bzip2__1_1_0.py +++ b/mussels/recipes/Windows/bzip2/1.1.0/bzip2__1_1_0.py @@ -29,12 +29,14 @@ class Recipe(BaseRecipe): url = "https://gitlab.com/federicomenaquintero/bzip2/-/archive/master/bzip2-master.tar.gzs" install_paths = { "x86": { + "license/bzip2": ["COPYING"], "include": ["bzlib.h"], - "lib": [os.path.join("libbz2.dll"), os.path.join("libbz2.lib")], + "lib": ["libbz2.dll", "libbz2.lib"], }, "x64": { + "license/bzip2": ["COPYING"], "include": ["bzlib.h"], - "lib": [os.path.join("libbz2.dll"), os.path.join("libbz2.lib")], + "lib": ["libbz2.dll", "libbz2.lib"], }, } platform = ["Windows"] diff --git a/mussels/recipes/Windows/clamav/0.101.2/clamav__0_101_2.py b/mussels/recipes/Windows/clamav/0.101.2/clamav__0_101_2.py index ac96734..f47f501 100644 --- a/mussels/recipes/Windows/clamav/0.101.2/clamav__0_101_2.py +++ b/mussels/recipes/Windows/clamav/0.101.2/clamav__0_101_2.py @@ -30,6 +30,7 @@ class Recipe(BaseRecipe): url = "https://www.clamav.net/downloads/production/clamav-0.101.2.tar.gz" install_paths = { "x86": { + "license/clamav": ["COPYING*"], "include": [ os.path.join("libclamav", "clamav.h"), os.path.join("win32", "clamav-types.h"), @@ -61,6 +62,7 @@ class Recipe(BaseRecipe): ], }, "x64": { + "license/clamav": ["COPYING*"], "include": [ os.path.join("libclamav", "clamav.h"), os.path.join("win32", "clamav-types.h"), diff --git a/mussels/recipes/Windows/clamav/0.102-dev/clamav__0_102_dev.py b/mussels/recipes/Windows/clamav/0.102-dev/clamav__0_102_dev.py index 7b8743e..2d14015 100644 --- a/mussels/recipes/Windows/clamav/0.102-dev/clamav__0_102_dev.py +++ b/mussels/recipes/Windows/clamav/0.102-dev/clamav__0_102_dev.py @@ -26,11 +26,12 @@ class Recipe(BaseRecipe): """ name = "clamav" - version = "0.102" + version = "0.102.0" url = "https://github.com/Cisco-Talos/clamav-devel/archive/dev/0.102.zip" archive_name_change = ("0.102", "clamav-devel-dev-0.102") install_paths = { "x86": { + "license/clamav": ["COPYING*"], "include": [ os.path.join("libclamav", "clamav.h"), os.path.join("win32", "clamav-types.h"), @@ -63,6 +64,7 @@ class Recipe(BaseRecipe): ], }, "x64": { + "license/clamav": ["COPYING*"], "include": [ os.path.join("libclamav", "clamav.h"), os.path.join("win32", "clamav-types.h"), @@ -103,7 +105,7 @@ class Recipe(BaseRecipe): "libxml2", "openssl", "pcre2", - "bzip2", + "bzip2-1.0.7", ] required_tools = ["visualstudio>=2017"] build_script = { diff --git a/mussels/recipes/Windows/curl/1.2.11/curl__1_2_11.py b/mussels/recipes/Windows/curl/1.2.11/curl__1_2_11.py index a07ec44..2a149bf 100644 --- a/mussels/recipes/Windows/curl/1.2.11/curl__1_2_11.py +++ b/mussels/recipes/Windows/curl/1.2.11/curl__1_2_11.py @@ -29,6 +29,7 @@ class Recipe(BaseRecipe): url = "https://curl.haxx.se/download/curl-7.65.3.zip" install_paths = { "x86": { + "license/curl": ["COPYING"], "include": [os.path.join("include", "curl")], "lib": [ os.path.join("lib", "Release", "libcurl.dll"), @@ -36,6 +37,7 @@ class Recipe(BaseRecipe): ], }, "x64": { + "license/curl": ["COPYING"], "include": [os.path.join("include", "curl")], "lib": [ os.path.join("lib", "Release", "libcurl.dll"), diff --git a/mussels/recipes/Windows/json_c/0.13.1/json_c__0_13_1.py b/mussels/recipes/Windows/json_c/0.13.1/json_c__0_13_1.py index 3556b84..6ed3278 100644 --- a/mussels/recipes/Windows/json_c/0.13.1/json_c__0_13_1.py +++ b/mussels/recipes/Windows/json_c/0.13.1/json_c__0_13_1.py @@ -29,6 +29,7 @@ class Recipe(BaseRecipe): url = "https://s3.amazonaws.com/json-c_releases/releases/json-c-0.13.1.tar.gz" install_paths = { "x86": { + "license/json-c": ["COPYING"], "include/json-c": [ os.path.join("arraylist.h"), os.path.join("bits.h"), @@ -52,6 +53,7 @@ class Recipe(BaseRecipe): ], }, "x64": { + "license/json-c": ["COPYING"], "include/json-c": [ os.path.join("arraylist.h"), os.path.join("bits.h"), diff --git a/mussels/recipes/Windows/libssh2/1.8.1/libssh2__1_8_1.py b/mussels/recipes/Windows/libssh2/1.8.1/libssh2__1_8_1.py index 093e483..4548f33 100644 --- a/mussels/recipes/Windows/libssh2/1.8.1/libssh2__1_8_1.py +++ b/mussels/recipes/Windows/libssh2/1.8.1/libssh2__1_8_1.py @@ -29,6 +29,7 @@ class Recipe(BaseRecipe): url = "https://www.libssh2.org/download/libssh2-1.8.1.tar.gz" install_paths = { "x86": { + "license/libssh2": ["COPYING"], "include": [ os.path.join("include", "libssh2.h"), os.path.join("include", "libssh2_publickey.h"), @@ -40,6 +41,7 @@ class Recipe(BaseRecipe): ], }, "x64": { + "license/libssh2": ["COPYING"], "include": [ os.path.join("include", "libssh2.h"), os.path.join("include", "libssh2_publickey.h"), diff --git a/mussels/recipes/Windows/libxml2/2.9.9/libxml2__2_9_9.py b/mussels/recipes/Windows/libxml2/2.9.9/libxml2__2_9_9.py index 8a69bea..ca02b16 100644 --- a/mussels/recipes/Windows/libxml2/2.9.9/libxml2__2_9_9.py +++ b/mussels/recipes/Windows/libxml2/2.9.9/libxml2__2_9_9.py @@ -30,6 +30,7 @@ class Recipe(BaseRecipe): url = "ftp://xmlsoft.org/libxml2/libxml2-2.9.9.tar.gz" install_paths = { "x86": { + "license/libxml2": ["COPYING"], "include": ["libxml.h", os.path.join("include", "libxml")], "lib": [ os.path.join("win32", "bin.msvc", "libxml2.dll"), @@ -37,6 +38,7 @@ class Recipe(BaseRecipe): ], }, "x64": { + "license/libxml2": ["COPYING"], "include": ["libxml.h", os.path.join("include", "libxml")], "lib": [ os.path.join("win32", "bin.msvc", "libxml2.dll"), diff --git a/mussels/recipes/Windows/nghttp2/1.36.0/nghttp2__1_36_0.py b/mussels/recipes/Windows/nghttp2/1.36.0/nghttp2__1_36_0.py index ee96510..0fb56a0 100644 --- a/mussels/recipes/Windows/nghttp2/1.36.0/nghttp2__1_36_0.py +++ b/mussels/recipes/Windows/nghttp2/1.36.0/nghttp2__1_36_0.py @@ -30,6 +30,7 @@ class Recipe(BaseRecipe): archive_name_change = ("v", "nghttp2-") install_paths = { "x86": { + "license/nghttp2": ["COPYING"], "include": [os.path.join("lib", "includes", "nghttp2")], "lib": [ os.path.join("lib", "Release", "nghttp2.dll"), @@ -37,6 +38,7 @@ class Recipe(BaseRecipe): ], }, "x64": { + "license/nghttp2": ["COPYING"], "include": [os.path.join("lib", "includes", "nghttp2")], "lib": [ os.path.join("lib", "Release", "nghttp2.dll"), diff --git a/mussels/recipes/Windows/openssl/1.1.0j/openssl__1_1_0j.py b/mussels/recipes/Windows/openssl/1.1.0j/openssl__1_1_0j.py index c841325..a62e72e 100644 --- a/mussels/recipes/Windows/openssl/1.1.0j/openssl__1_1_0j.py +++ b/mussels/recipes/Windows/openssl/1.1.0j/openssl__1_1_0j.py @@ -29,6 +29,7 @@ class Recipe(BaseRecipe): url = "https://www.openssl.org/source/openssl-1.1.0j.tar.gz" install_paths = { "x86": { + "license/openssl": ["LICENSE"], "include": [os.path.join("include", "openssl")], "lib": [ os.path.join("libssl-1_1.dll"), @@ -38,6 +39,7 @@ class Recipe(BaseRecipe): ], }, "x64": { + "license/openssl": ["LICENSE"], "include": [os.path.join("include", "openssl")], "lib": [ os.path.join("libssl-1_1-x64.dll"), diff --git a/mussels/recipes/Windows/openssl/1.1.1b/openssl__1_1_1b.py b/mussels/recipes/Windows/openssl/1.1.1b/openssl__1_1_1b.py index a4b6582..5b4cadd 100644 --- a/mussels/recipes/Windows/openssl/1.1.1b/openssl__1_1_1b.py +++ b/mussels/recipes/Windows/openssl/1.1.1b/openssl__1_1_1b.py @@ -29,6 +29,7 @@ class Recipe(BaseRecipe): url = "https://www.openssl.org/source/openssl-1.1.1b.tar.gz" install_paths = { "x86": { + "license/openssl": ["LICENSE"], "include": [os.path.join("include", "openssl")], "lib": [ os.path.join("libssl-1_1.dll"), @@ -38,6 +39,7 @@ class Recipe(BaseRecipe): ], }, "x64": { + "license/openssl": ["LICENSE"], "include": [os.path.join("include", "openssl")], "lib": [ os.path.join("libssl-1_1-x64.dll"), diff --git a/mussels/recipes/Windows/pcre2/10.33/pcre2__10_33.py b/mussels/recipes/Windows/pcre2/10.33/pcre2__10_33.py index 852de6f..a9cc05d 100644 --- a/mussels/recipes/Windows/pcre2/10.33/pcre2__10_33.py +++ b/mussels/recipes/Windows/pcre2/10.33/pcre2__10_33.py @@ -29,6 +29,7 @@ class Recipe(BaseRecipe): url = "https://ftp.pcre.org/pub/pcre/pcre2-10.33.zip" install_paths = { "x86": { + "license/openssl": ["COPYING"], "include": [os.path.join("pcre2.h")], "lib": [ os.path.join("Release", "pcre2-8.dll"), @@ -36,6 +37,7 @@ class Recipe(BaseRecipe): ], }, "x64": { + "license/openssl": ["COPYING"], "include": [os.path.join("pcre2.h")], "lib": [ os.path.join("Release", "pcre2-8.dll"), diff --git a/mussels/recipes/Windows/pthread_win32/1.11.0/pthreads__1_11_0.py b/mussels/recipes/Windows/pthread_win32/1.11.0/pthreads__1_11_0.py index 97c2952..a65258d 100644 --- a/mussels/recipes/Windows/pthread_win32/1.11.0/pthreads__1_11_0.py +++ b/mussels/recipes/Windows/pthread_win32/1.11.0/pthreads__1_11_0.py @@ -30,10 +30,12 @@ class Recipe(BaseRecipe): url = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-1-11-0-release.tar.gz" install_paths = { "x86": { + "license/pthreads-win32": ["COPYING*"], "include": ["pthread.h", "sched.h"], "lib": ["pthreadVC1.dll", "pthreadVC1.lib"], }, "x64": { + "license/pthreads-win32": ["COPYING*"], "include": ["pthread.h", "sched.h"], "lib": ["pthreadVC1.dll", "pthreadVC1.lib"], }, diff --git a/mussels/recipes/Windows/pthread_win32/2.9.1/pthreads__2_9_1.py b/mussels/recipes/Windows/pthread_win32/2.9.1/pthreads__2_9_1.py index c0750fe..e675240 100644 --- a/mussels/recipes/Windows/pthread_win32/2.9.1/pthreads__2_9_1.py +++ b/mussels/recipes/Windows/pthread_win32/2.9.1/pthreads__2_9_1.py @@ -30,10 +30,12 @@ class Recipe(BaseRecipe): url = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz" install_paths = { "x86": { + "license/pthreads-win32": ["COPYING*"], "include": ["pthread.h", "sched.h"], "lib": ["pthreadVC2.dll", "pthreadVC2.lib"], }, "x64": { + "license/pthreads-win32": ["COPYING*"], "include": ["pthread.h", "sched.h"], "lib": ["pthreadVC2.dll", "pthreadVC2.lib"], }, diff --git a/mussels/recipes/Windows/zlib/1.2.11/zlib__1_2_11.py b/mussels/recipes/Windows/zlib/1.2.11/zlib__1_2_11.py index c5c236e..7388acf 100644 --- a/mussels/recipes/Windows/zlib/1.2.11/zlib__1_2_11.py +++ b/mussels/recipes/Windows/zlib/1.2.11/zlib__1_2_11.py @@ -29,6 +29,7 @@ class Recipe(BaseRecipe): url = "https://www.zlib.net/zlib-1.2.11.tar.gz" install_paths = { "x86": { + "license/zlib": ["README"], "include": ["zlib.h", "zconf.h"], "lib": [ # os.path.join("Release", "zlib1.dll"), @@ -36,6 +37,7 @@ class Recipe(BaseRecipe): ], }, "x64": { + "license/zlib": ["README"], "include": ["zlib.h", "zconf.h"], "lib": [ # os.path.join("Release", "zlib1.dll"), diff --git a/mussels/utils/click.py b/mussels/utils/click.py index 22e4705..575b3bd 100644 --- a/mussels/utils/click.py +++ b/mussels/utils/click.py @@ -35,4 +35,3 @@ def get_command(self, ctx, cmd_name): elif len(matches) == 1: return click.Group.get_command(self, ctx, matches[0]) ctx.fail("Too many matches: %s" % ", ".join(sorted(matches))) -