@@ -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"])
|
||||
Reference in New Issue
Block a user