forked from semios/ports
Compare commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
2dc9b93b4e | ||
|
|
c1d9eebc2b |
+29
-19
@@ -3,13 +3,6 @@ import os
|
|||||||
from lib import arch, common, make, pkgcomposer
|
from lib import arch, common, make, pkgcomposer
|
||||||
|
|
||||||
|
|
||||||
def do(f):
|
|
||||||
try:
|
|
||||||
f()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def is_abslink(path):
|
def is_abslink(path):
|
||||||
try:
|
try:
|
||||||
return os.readlink(path).startswith("/")
|
return os.readlink(path).startswith("/")
|
||||||
@@ -58,19 +51,36 @@ def autolink_milestones():
|
|||||||
if i.is_file() and os.access(i.path, os.F_OK):
|
if i.is_file() and os.access(i.path, os.F_OK):
|
||||||
make.link(f"share/milestones/{i.name}", "/share/milestones/" + i.name)
|
make.link(f"share/milestones/{i.name}", "/share/milestones/" + i.name)
|
||||||
|
|
||||||
def autolink_fonts():
|
|
||||||
for i in common.treedir("share/fonts"):
|
|
||||||
if i.is_file() and os.access(i.path, os.F_OK):
|
|
||||||
make.link(f"share/fonts/{i.name}", "/share/fonts/" + i.name)
|
|
||||||
|
|
||||||
|
|
||||||
def autolink(composer: pkgcomposer.PkgComposer):
|
def autolink(composer: pkgcomposer.PkgComposer):
|
||||||
os.chdir(composer.workdir + "/bundle/")
|
os.chdir(composer.workdir + "/bundle/")
|
||||||
|
|
||||||
do(autolink_bin)
|
try:
|
||||||
do(autolink_lib)
|
autolink_bin()
|
||||||
do(autolink_include)
|
except:
|
||||||
do(autolink_share_pkgconfig)
|
pass
|
||||||
do(autolink_services)
|
|
||||||
do(autolink_milestones)
|
try:
|
||||||
do(autolink_fonts)
|
autolink_lib()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
autolink_include()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
autolink_share_pkgconfig()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
autolink_services()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
autolink_milestones()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
upstream_version = "3.206"
|
|
||||||
|
|
||||||
version(upstream_version)
|
|
||||||
description("Monospaced variant of the Fira Sans font series")
|
|
||||||
maintainer("sisungo <[email protected]>")
|
|
||||||
source_url("https://carrois.com/downloads/Fira/Fira_Mono_3_2.zip")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
os.chdir("Fonts/FiraMono_OTF_32")
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
|
|
||||||
def declare_seperate(name):
|
|
||||||
def pack(composer):
|
|
||||||
composer.makedirs("share/fonts/FiraMono")
|
|
||||||
composer.add(f"{name}.otf", f"share/fonts/FiraMono/{name}.otf")
|
|
||||||
|
|
||||||
package(name)
|
|
||||||
on_pack(pack)
|
|
||||||
|
|
||||||
declare_seperate("FiraMono-Bold")
|
|
||||||
declare_seperate("FiraMono-Medium")
|
|
||||||
declare_seperate("FiraMono-Regular")
|
|
||||||
|
|
||||||
package("FiraMono-Fonts")
|
|
||||||
dep("FiraMono-Bold")
|
|
||||||
dep("FiraMono-Medium")
|
|
||||||
dep("FiraMono-Regular")
|
|
||||||
on_pack(lambda x: print("Packing FiraMono-Fonts."))
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
upstream_version = "4.301"
|
|
||||||
|
|
||||||
version(upstream_version)
|
|
||||||
description("a humanist sans-serif typeface designed by Carrois Type Design and Mozilla")
|
|
||||||
maintainer("sisungo <[email protected]>")
|
|
||||||
source_url("https://carrois.com/downloads/Fira/Download_Folder_FiraSans_4301.zip")
|
|
||||||
|
|
||||||
|
|
||||||
widths = ["Compressed", "Condensed", "Normal"]
|
|
||||||
styles = ["Italic", "Roman"]
|
|
||||||
weights = ["Bold", "Book", "Eight", "ExtraBold", "ExtraLight", "Four", "Hair", "Heavy", "", "Light", "Medium", "SemiBold", "Thin", "Two", "Ultra", "UltraLight"]
|
|
||||||
|
|
||||||
|
|
||||||
def find_file(width, style, weight):
|
|
||||||
modify = width
|
|
||||||
if width == "Normal":
|
|
||||||
modify = ""
|
|
||||||
filename = f"FiraSans{modify}-{weight}{style}.otf"
|
|
||||||
if os.path.exists(f"{width}/{style}/{filename}"):
|
|
||||||
return filename
|
|
||||||
return None
|
|
||||||
|
|
||||||
def on_pack_by(width, style, weight):
|
|
||||||
def pack(composer):
|
|
||||||
composer.makedirs("share/fonts/FiraSans")
|
|
||||||
filename = find_file(width, style, weight)
|
|
||||||
composer.add(
|
|
||||||
f"{width}/{style}/{filename}",
|
|
||||||
f"share/fonts/FiraSans/{filename}",
|
|
||||||
)
|
|
||||||
on_pack(pack)
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
filename_version = upstream_version.replace('.', '')
|
|
||||||
os.chdir(f"Download_Folder_FiraSans_{filename_version}/Fonts/Fira_Sans_OTF_{filename_version}")
|
|
||||||
|
|
||||||
packages = []
|
|
||||||
for width in widths:
|
|
||||||
for style in styles:
|
|
||||||
for weight in weights:
|
|
||||||
filename = find_file(width, style, weight)
|
|
||||||
if filename:
|
|
||||||
pkgname = filename.replace(".otf", "")
|
|
||||||
package(pkgname)
|
|
||||||
arch_any()
|
|
||||||
on_pack_by(width, style, weight)
|
|
||||||
packages += [pkgname]
|
|
||||||
|
|
||||||
package("FiraSans-Fonts")
|
|
||||||
arch_any()
|
|
||||||
for pkgname in packages:
|
|
||||||
dep(f"{pkgname} (same-version) @any")
|
|
||||||
on_pack(lambda x: print("Packing FiraSans-Fonts."))
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"on_failure": "terminate",
|
||||||
|
"request": {
|
||||||
|
"method": "CreateUser",
|
||||||
|
"params": {
|
||||||
|
"username": "root",
|
||||||
|
"fullname": "System Administrator",
|
||||||
|
"host_uid": { "manual": 0 },
|
||||||
|
"description": "UNIX system administrator",
|
||||||
|
"secure_tags": ["Login", "CreateUser", "RemoveUser", "ReadSecret", "WriteSecret"],
|
||||||
|
"extra_records": {},
|
||||||
|
"defaults": {
|
||||||
|
"CliLoginShell": "/bin/sh"
|
||||||
|
},
|
||||||
|
"home_directory": "/home/root",
|
||||||
|
"groups": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
from lib import rust
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("0.1.0-alpha.1")
|
||||||
|
description("SemiOS system account service & utilities")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_url("https://gitea.semilabs.org/semios/account/archive/0.1.0-alpha.1.tar.gz")
|
||||||
|
|
||||||
|
builddep("shortcut/rust")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
os.makedirs("build_config", exist_ok=True)
|
||||||
|
shutil.copy2("../../init.json", "build_config/init.json")
|
||||||
|
rust.build(["--features", "embed_init_file"])
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack(composer):
|
||||||
|
os.chdir(rust.artifacts_dir())
|
||||||
|
composer.makedir("bin")
|
||||||
|
composer.makedir("libexec")
|
||||||
|
composer.addfile("account", "bin/account")
|
||||||
|
composer.addfile("accountd", "bin/accountd")
|
||||||
|
composer.addfile("auth_password", "libexec/auth_password")
|
||||||
|
|
||||||
|
|
||||||
|
package("account")
|
||||||
|
on_pack(pack)
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
Reference in New Issue
Block a user