Merge pull request 'feat: add package mdnsd' (#81) from sisungo/ports:mdnsd into main
Reviewed-on: #81
This commit was merged in pull request #81.
This commit is contained in:
commit
8f839bf216
1 file changed
+63
@@ -0,0 +1,63 @@
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
|
||||
version("1.2")
|
||||
description("Jeremie Miller's original mdnsd")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_managed("github://troglobit/mdnsd#v1.2", "autotools")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
f"--prefix=/",
|
||||
"--sysconfdir=/var/config/network/mdns.d",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_mdnsd(composer):
|
||||
composer.makedir("bin")
|
||||
composer.add("sbin/mdnsd", "bin/mdnsd")
|
||||
composer.makedirs("share/services")
|
||||
with open("mdnsd.airs", "wt+") as fd:
|
||||
fd.write("[service]\n")
|
||||
fd.write("display-name = \"mDNS Responder\"\n")
|
||||
fd.write("description = \"System multicast DNS responder.\"\n")
|
||||
fd.write("\n")
|
||||
fd.write("[exec]\n")
|
||||
fd.write(f'start = "{get_prefix('mdnsd')}/bin/mdnsd -n /var/config/network/mdns.d"\n')
|
||||
fd.write("\n")
|
||||
fd.write("[env]\n")
|
||||
fd.write("working_dir = \"/\"\n")
|
||||
fd.write("clear_vars = true\n")
|
||||
composer.add("mdnsd.airs", "share/services/mdnsd.airs")
|
||||
|
||||
def pack_mquery(composer):
|
||||
composer.makedir("bin")
|
||||
composer.add("bin/mquery")
|
||||
|
||||
package("libmdnsd")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libmdnsd-dev")
|
||||
dep("libmdnsd (same)")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
package("mquery")
|
||||
dep("libmdnsd (same)")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_mquery)
|
||||
|
||||
package("mdnsd")
|
||||
dep("libmdnsd (same)")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_mdnsd)
|
||||
Reference in new issue
Block a user