Compare commits

..
4 Commits
3 changed files with 33 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)
+25
View File
@@ -0,0 +1,25 @@
import os
from lib import cpp
from lib.make import *
version("19")
source_url("https://github.com/aligrudi/neatvi/archive/refs/tags/19.tar.gz")
def build():
cpp.make([f"CC={os.environ['CC']}"])
on_build(build)
def pack(composer):
composer.makedir("bin")
composer.addfile("vi", "bin/vi")
package("neatvi")
provide("vi")
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