Compare commits

..
1 Commits
Author SHA1 Message Date
sisungo 16a1087785 feat: add package file
Signed-off-by: sisungo <[email protected]>
2026-06-27 18:28:20 +08:00
2 changed files with 43 additions and 1 deletions
+43
View File
@@ -0,0 +1,43 @@
import subprocess
from lib import cpp
from lib.make import *
VERSION = "5.48"
version(VERSION)
source_git("https://github.com/file/file.git", "FILE5_48")
def build():
subprocess.run(["autoreconf", "-fiv"], check=True)
cpp.configure(["--prefix=/", f"--datadir=/share/file"])
cpp.make()
cpp.make_install()
on_build(build)
def pack_magic_db(composer):
composer.add_dir(f"share/file", "share")
package("file-magic-db")
arch_any()
link("share/misc/magic.mgc", "/share/file/misc/magic.mgc")
on_pack(pack_magic_db)
package("libmagic")
dep("semi-libc @same-arch")
dep("file-magic-db (same-version) @any")
cpp.use_auto_pack(["lib"])
package("libmagic-dev")
dep("libmagic (same)")
cpp.use_auto_pack(["dev"])
package("file")
dep("libmagic (same)")
cpp.use_auto_pack(["bin"])
-1
View File
@@ -33,7 +33,6 @@ def build():
"--with-readline=editline",
"--with-tail-call-interp",
"--without-ensurepip",
"--with-ssl-default-suites=openssl",
]
)
cpp.make()