forked from semios/ports
44 lines
920 B
Python
44 lines
920 B
Python
import os
|
|
|
|
from lib import cpp
|
|
from lib.make import *
|
|
|
|
|
|
version("2.8")
|
|
description("A parallel implementation of gzip for modern multi-processor, multi-core machines")
|
|
maintainer("sisungo <[email protected]>")
|
|
source_url("http://zlib.net/pigz/pigz-2.8.tar.gz")
|
|
|
|
builddep("shortcut/c")
|
|
builddep("shortcut/autotools")
|
|
builddep("libz-ng-dev @target")
|
|
builddep("pkgconf")
|
|
|
|
|
|
def build():
|
|
cc=os.environ.get("CC", "cc")
|
|
cpp.make([f"CC={cc}"])
|
|
|
|
on_build(build)
|
|
|
|
|
|
def pack(composer):
|
|
composer.makedir("bin")
|
|
composer.add("pigz", "bin/pigz")
|
|
composer.add("unpigz", "bin/unpigz")
|
|
|
|
def pack_docs(composer):
|
|
composer.makedirs("share/man/man1")
|
|
composer.add("pigz.1", "share/man/man1")
|
|
|
|
package("pigz")
|
|
dep("semi-libc @same-arch")
|
|
dep("libz-ng @same-arch")
|
|
provide("gzip")
|
|
link("bin/pigz", "/bin/gzip")
|
|
link("bin/unpigz", "/bin/gunzip")
|
|
cpp.use_auto_pack(["bin"])
|
|
|
|
package("pigz-docs")
|
|
on_pack(pack_docs)
|