Compare commits

..
4 Commits
3 changed files with 32 additions and 2 deletions
+7 -1
View File
@@ -23,7 +23,13 @@ class PkgComposer:
def write_manifest(self, manifest: dict):
with open(self.workdir + "/PkgManifest.json", "w") as f:
json.dump(manifest, f, indent=4)
json.dump(manifest, f)
def write_links(self, links: list[dict]):
with open(self.workdir + "/_links", "w") as f:
for link in links:
json.dump(link, f)
f.write("\n")
def compose(self):
shutil.make_archive(self.pkgfile, _archive_format, self.workdir)
+24
View File
@@ -0,0 +1,24 @@
import os
from lib import cpp
from lib.make import *
version("2026.4.26")
source_url("https://github.com/onetrueawk/awk/archive/refs/tags/20260426.tar.gz")
def build():
cpp.make()
on_build(build)
def pack(composer):
composer.makedir("bin")
composer.addfile("a.out", "bin/awk")
package("awk")
dep("semi-libc @same-arch")
on_pack(pack)
+1 -1
View File
@@ -107,11 +107,11 @@ def run_build_package(package: str):
"name": pkgname,
"version": pkgver,
"arch": pkgarch,
"links": pkginfo[lib.make._key_links],
"dependencies": pkginfo[lib.make._key_dependencies],
"provides": pkginfo[lib.make._key_provides],
}
composer.write_manifest(manifest)
composer.write_links(pkginfo[lib.make._key_links])
composer.compose()
# Build success