Compare commits

..
247 Commits
Author SHA1 Message Date
sisungo 9c8e57004d feat: add package freetype
Signed-off-by: sisungo <[email protected]>
2026-08-18 20:52:52 +08:00
sisungo c1e3a8dc05 Merge pull request 'feat: add package rust' (#153) from sisungo/semios-packages:rust into master
Reviewed-on: semios/semios-packages#153
2026-08-15 21:52:09 +08:00
sisungo 79014b6738 Merge pull request 'feat: add package cargo' (#156) from sisungo/semios-packages:cargo into master
Reviewed-on: semios/semios-packages#156
2026-08-15 21:51:48 +08:00
sisungo 92377baf1a Merge pull request 'fix: bad dependencies for git' (#155) from sisungo/semios-packages:git-fixdep into master
Reviewed-on: semios/semios-packages#155
2026-08-15 21:51:22 +08:00
sisungo 63bba02bb4 Merge pull request 'feat: add package packaging-py' (#158) from sisungo/semios-packages:packaging-py into master
Reviewed-on: semios/semios-packages#158
2026-08-15 21:50:59 +08:00
sisungo f699f26f3b Merge pull request 'feat: add package installer-py' (#161) from sisungo/semios-packages:installer-py into master
Reviewed-on: semios/semios-packages#161
2026-08-15 21:50:37 +08:00
sisungo 32f128e5fb Merge pull request 'feat: add package build-py' (#160) from sisungo/semios-packages:build-py into master
Reviewed-on: semios/semios-packages#160
2026-08-15 21:49:58 +08:00
sisungo 64c313003f Merge pull request 'feat: add python packaging lib' (#159) from sisungo/semios-packages:python-pkg into master
Reviewed-on: semios/semios-packages#159
2026-08-15 21:36:27 +08:00
sisungo 633bf71cb1 feat: add package installer-py
Signed-off-by: sisungo <[email protected]>
2026-08-15 21:08:10 +08:00
sisungo 8a1a62599d feat: add package build-py
Signed-off-by: sisungo <[email protected]>
2026-08-15 21:02:38 +08:00
sisungo b368f771d2 feat: add package packaging-py
Signed-off-by: sisungo <[email protected]>
2026-08-15 20:53:42 +08:00
sisungo d05fce73dc feat: add python packaging lib
Signed-off-by: sisungo <[email protected]>
2026-08-15 20:49:02 +08:00
sisungo ed596468e4 Merge pull request 'fix: autostrip breaks hard links' (#157) from sisungo/semios-packages:fix-inode into master
Reviewed-on: semios/semios-packages#157
2026-08-15 12:49:38 +08:00
sisungo a405253451 fix: autostrip breaks hard links
Signed-off-by: sisungo <[email protected]>
2026-08-15 12:47:13 +08:00
sisungo ad3a7e8372 fix: git build dependencies are invalid
Signed-off-by: sisungo <[email protected]>
2026-08-14 21:24:28 +08:00
sisungo 21dedb3568 feat: add package cargo
Signed-off-by: sisungo <[email protected]>
2026-08-14 19:11:44 +08:00
sisungo 9c432fcabb fix: bad dependencies for git
Signed-off-by: sisungo <[email protected]>
2026-08-14 17:10:36 +08:00
sisungo fd5cde82bb feat: add package rust
Signed-off-by: sisungo <[email protected]>
2026-08-14 16:55:50 +08:00
sisungo e2094c34d7 Merge pull request 'feat: change llvm triple to unknown- vendor' (#154) from sisungo/semios-packages:llvm-fix into master
Reviewed-on: semios/semios-packages#154
2026-08-14 10:09:12 +08:00
sisungo b09d172ff9 feat: change llvm triple to unknown- vendor
Signed-off-by: sisungo <[email protected]>
2026-08-14 10:08:12 +08:00
sisungo 89744adb38 Merge pull request 'feat: add package htop' (#143) from sisungo/semios-packages:htop into master
Reviewed-on: semios/semios-packages#143
2026-08-10 11:38:10 +08:00
sisungo fc753703c4 feat: add package htop
Signed-off-by: sisungo <[email protected]>
2026-08-10 11:18:38 +08:00
sisungo 132ed2d8b3 Merge pull request 'feat: add package maintainers' (#142) from sisungo/semios-packages:maintainers into master
Reviewed-on: semios/semios-packages#142
2026-08-10 09:54:41 +08:00
sisungo 41d0b79083 feat: add package maintainers
Signed-off-by: sisungo <[email protected]>
2026-08-10 09:53:45 +08:00
sisungo 232aa0b690 Merge pull request 'feat: add package packie' (#54) from sisungo/semios-packages:packie into master
Reviewed-on: semios/semios-packages#54
2026-08-09 22:32:19 +08:00
sisungo 65dd900ea4 feat: add package packie
Signed-off-by: sisungo <[email protected]>
2026-08-09 21:23:01 +08:00
sisungo ea440a2465 Merge pull request 'fix: llvm build configuration has invalid fields' (#141) from sisungo/semios-packages:llvmfix into master
Reviewed-on: semios/semios-packages#141
2026-08-09 14:22:52 +08:00
sisungo e7d77b63b3 fix: llvm build configuration has invalid fields
Signed-off-by: sisungo <[email protected]>
2026-08-09 13:01:40 +08:00
sisungo 2f7053488b Merge pull request 'feat: add package bash' (#135) from sisungo/semios-packages:bash into master
Reviewed-on: semios/semios-packages#135
2026-08-08 10:26:41 +08:00
sisungo cb9842b371 Merge pull request 'feat: add description to packages' (#140) from sisungo/semios-packages:description into master
Reviewed-on: semios/semios-packages#140
2026-08-08 10:20:03 +08:00
sisungo 25525068bd Merge pull request 'fix: atombuild delayed copying resolv.conf' (#139) from sisungo/semios-packages:atomfix into master
Reviewed-on: semios/semios-packages#139
2026-08-08 10:19:48 +08:00
sisungo 2a7def094d feat: add package bash
Signed-off-by: sisungo <[email protected]>
2026-08-08 01:45:44 +08:00
sisungo 91b153d21b feat: add description to packages
Signed-off-by: sisungo <[email protected]>
2026-08-08 01:37:30 +08:00
sisungo fb5f90e0bb fix: atombuild delayed copying resolv.conf
Signed-off-by: sisungo <[email protected]>
2026-08-04 21:26:10 +08:00
sisungo 0238507da1 Merge pull request 'feat: add package semios-assembly' (#138) from sisungo/semios-packages:semios-assembly into master
Reviewed-on: semios/semios-packages#138
2026-08-04 10:09:57 +08:00
sisungo 21bb0c0416 feat: add package semios-assembly
Signed-off-by: sisungo <[email protected]>
2026-08-04 08:36:25 +08:00
sisungo 614aae909b Merge pull request 'feat: add package alsa-utils' (#125) from sisungo/semios-packages:alsa-utils into master
Reviewed-on: semios/semios-packages#125
2026-08-03 19:45:16 +08:00
sisungo 71ae4dd1cb Merge pull request 'feat: add package util-linux' (#134) from sisungo/semios-packages:util-linux into master
Reviewed-on: semios/semios-packages#134
2026-08-03 19:44:53 +08:00
sisungo 19d58033f0 Merge pull request 'fix: kmod is missing links' (#136) from sisungo/semios-packages:kmodfix into master
Reviewed-on: semios/semios-packages#136
2026-08-03 19:44:35 +08:00
sisungo 7c61d7ca8b Merge pull request 'fix: llvm is not well packaged' (#137) from sisungo/semios-packages:llvm-split into master
Reviewed-on: semios/semios-packages#137
2026-08-03 19:42:42 +08:00
sisungo 3b613fc446 fix: llvm is not well packaged
Signed-off-by: sisungo <[email protected]>
2026-08-03 18:52:58 +08:00
sisungo cfb2a07fa4 fix: kmod is missing links
Signed-off-by: sisungo <[email protected]>
2026-07-24 16:26:27 +08:00
sisungo a7afab336b feat: add package util-linux
Signed-off-by: sisungo <[email protected]>
2026-07-24 15:49:11 +08:00
sisungo e0af0577bf Merge pull request 'feat: add package dbus' (#127) from sisungo/semios-packages:dbus into master
Reviewed-on: semios/semios-packages#127
2026-07-17 14:54:06 +08:00
sisungo da5c4329bf Merge pull request 'feat: add package glib' (#128) from sisungo/semios-packages:glib into master
Reviewed-on: semios/semios-packages#128
2026-07-17 14:52:12 +08:00
sisungo aa19be566b feat: add package dbus
Signed-off-by: sisungo <[email protected]>
2026-07-17 13:54:24 +08:00
sisungo 05cb5c94c5 feat: add package glib
Signed-off-by: sisungo <[email protected]>
2026-07-17 13:01:21 +08:00
sisungo 65a884ddd4 Merge pull request 'feat (lib): add meson/cmake shortcuts' (#130) from sisungo/semios-packages:shortcut_meson into master
Reviewed-on: semios/semios-packages#130
2026-07-15 16:27:49 +08:00
sisungo 8c41ed811f Merge pull request 'feat: add package meson' (#129) from sisungo/semios-packages:meson into master
Reviewed-on: semios/semios-packages#129
2026-07-15 16:24:09 +08:00
sisungo e421add41d feat (lib): add meson/cmake shortcuts
Signed-off-by: sisungo <[email protected]>
2026-07-14 15:58:55 +08:00
sisungo 1b2f8a2295 feat: add package meson
Signed-off-by: sisungo <[email protected]>
2026-07-14 15:48:08 +08:00
sisungo 2b3204cb9a feat: add package alsa-utils
Signed-off-by: sisungo <[email protected]>
2026-07-12 15:05:03 +08:00
sisungo 02cf225a7e Merge pull request 'feat: add package cmake' (#72) from sisungo/semios-packages:cmake into master
Reviewed-on: semios/semios-packages#72
2026-07-11 22:31:12 +08:00
sisungo 8d99e1d12a feat: add package cmake
Signed-off-by: sisungo <[email protected]>
2026-07-11 16:17:17 +08:00
sisungo 89f0038e99 Merge pull request 'feat: add package curl' (#77) from sisungo/semios-packages:curl into master
Reviewed-on: semios/semios-packages#77
2026-07-11 09:20:49 +08:00
sisungo 0743d92327 feat: add package curl
Signed-off-by: sisungo <[email protected]>
2026-07-11 09:14:55 +08:00
sisungo 7e66f0669d Merge pull request 'feat: add package libpsl' (#78) from sisungo/semios-packages:libpsl into master
Reviewed-on: semios/semios-packages#78
2026-07-11 08:45:25 +08:00
sisungo 557aae6cb5 Merge pull request 'feat: add package bison' (#109) from sisungo/semios-packages:bison into master
Reviewed-on: semios/semios-packages#109
2026-07-11 08:36:12 +08:00
sisungo 178f5820e7 Merge pull request 'feat: add package gnu-m4' (#110) from sisungo/semios-packages:gnu-m4 into master
Reviewed-on: semios/semios-packages#110
2026-07-11 08:33:02 +08:00
sisungo aded8393fe Merge pull request 'feat: update libgcc-compat to 0.2.0' (#117) from sisungo/semios-packages:libgcc-compat-2 into master
Reviewed-on: semios/semios-packages#117
2026-07-11 08:32:46 +08:00
sisungo ea6c4592e9 Merge pull request 'feat: add xz and bz2 to atom basedep' (#118) from sisungo/semios-packages:add_xz_bz into master
Reviewed-on: semios/semios-packages#118
2026-07-11 08:32:31 +08:00
sisungo 6abf94ba6c feat: add package libpsl
Signed-off-by: sisungo <[email protected]>
2026-07-11 05:59:50 +08:00
sisungo a903430180 feat: add xz and bz2 to atom basedep
Signed-off-by: sisungo <[email protected]>
2026-07-11 05:46:14 +08:00
sisungo b3d71e0a3a feat: add package gnu-m4
Signed-off-by: sisungo <[email protected]>
2026-07-11 05:45:21 +08:00
sisungo 6dd8c911a1 feat: update libgcc-compat to 0.2.0
Signed-off-by: sisungo <[email protected]>
2026-07-10 16:30:31 +08:00
sisungo 5c22c479bd Merge pull request 'fix: aws-lc pkg-config is invalid' (#116) from sisungo/semios-packages:aws-lc-a into master
Reviewed-on: semios/semios-packages#116
2026-07-10 16:05:55 +08:00
sisungo 6704ec11ea fix: aws-lc pkg-config is invalid
Signed-off-by: sisungo <[email protected]>
2026-07-10 16:00:19 +08:00
sisungo 8c58073118 Merge pull request 'feat: update multiple packages' (#115) from sisungo/semios-packages:update-pkgs into master
Reviewed-on: semios/semios-packages#115
2026-07-10 09:12:51 +08:00
sisungo eea8869aa5 feat: add package bison
Signed-off-by: sisungo <[email protected]>
2026-07-10 03:05:02 +08:00
sisungo 7e888b8408 feat: update multiple packages
Signed-off-by: sisungo <[email protected]>
2026-07-10 00:59:02 +08:00
sisungo 5729463e2e Merge pull request 'feat: add package less' (#113) from sisungo/semios-packages:less into master
Reviewed-on: semios/semios-packages#113
2026-07-08 20:19:36 +08:00
sisungo 9dc11ca666 Merge pull request 'feat: support cleaning without removing artifacts' (#114) from sisungo/semios-packages:clean-no-artifacts into master
Reviewed-on: semios/semios-packages#114
2026-07-08 20:19:26 +08:00
sisungo e567c27db8 feat: support cleaning without removing artifacts
Signed-off-by: sisungo <[email protected]>
2026-07-08 18:57:44 +08:00
sisungo 4f4ec0468a Merge pull request 'feat: add pkgmanifest recommendations support' (#111) from sisungo/semios-packages:recommends into master
Reviewed-on: semios/semios-packages#111
2026-07-08 17:19:54 +08:00
sisungo ab71a8ae75 Merge pull request 'feat: support adding package to repository' (#112) from sisungo/semios-packages:repo_manage into master
Reviewed-on: semios/semios-packages#112
2026-07-08 17:19:39 +08:00
sisungo 07c93dac59 feat: add package less
Signed-off-by: sisungo <[email protected]>
2026-07-08 17:15:21 +08:00
sisungo 5dece05466 feat: support adding package to repository
Signed-off-by: sisungo <[email protected]>
2026-07-08 16:42:22 +08:00
sisungo c47d1390bc Merge pull request 'feat: add support of atom builds' (#55) from sisungo/semios-packages:atom-build into master
Reviewed-on: semios/semios-packages#55
2026-07-08 13:00:12 +08:00
sisungo b0185d379b feat: add pkgmanifest recommendations support
Signed-off-by: sisungo <[email protected]>
2026-07-08 01:00:53 +08:00
sisungo bd16d6d218 feat: add support of atom builds
Signed-off-by: sisungo <[email protected]>
2026-07-08 00:48:59 +08:00
sisungo d06120bdeb Merge pull request 'fix: pkg-config link is not defined' (#108) from sisungo/semios-packages:pkgconf-fix into master
Reviewed-on: semios/semios-packages#108
2026-07-07 16:12:48 +08:00
sisungo 490c81a6d9 Merge pull request 'fix: bzip2 soname is invalid' (#107) from sisungo/semios-packages:bz2-fix into master
Reviewed-on: semios/semios-packages#107
2026-07-07 16:12:29 +08:00
sisungo b9533a5c6e fix: pkg-config link is not defined
Signed-off-by: sisungo <[email protected]>
2026-07-07 16:12:17 +08:00
sisungo 37da18439b fix: bzip2 soname is invalid
Signed-off-by: sisungo <[email protected]>
2026-07-07 16:10:33 +08:00
sisungo aaab087b4d Merge pull request 'feat: add package git' (#83) from sisungo/semios-packages:git into master
Reviewed-on: semios/semios-packages#83
2026-07-07 12:29:28 +08:00
sisungo e6fb25c31b Merge pull request 'feat: support hard links when packaging' (#106) from sisungo/semios-packages:hardlinks into master
Reviewed-on: semios/semios-packages#106
2026-07-07 12:29:15 +08:00
sisungo 4f06471aa2 feat: support hard links when packaging
Signed-off-by: sisungo <[email protected]>
2026-07-07 12:06:00 +08:00
sisungo f6efa6fd66 Merge pull request 'feat: add package c-ares' (#79) from sisungo/semios-packages:c-ares into master
Reviewed-on: semios/semios-packages#79
2026-07-07 12:00:02 +08:00
sisungo e92240a211 Merge pull request 'feat: add package byacc' (#103) from sisungo/semios-packages:byacc into master
Reviewed-on: semios/semios-packages#103
2026-07-07 11:58:20 +08:00
sisungo c530c16fbf Merge pull request 'feat: add package bc' (#105) from sisungo/semios-packages:bc into master
Reviewed-on: semios/semios-packages#105
2026-07-07 11:58:11 +08:00
sisungo e24723a940 Merge pull request 'feat: add package patch' (#104) from sisungo/semios-packages:patch into master
Reviewed-on: semios/semios-packages#104
2026-07-07 11:57:59 +08:00
sisungo cf9d57202b Merge pull request 'feat: add package flex' (#100) from sisungo/semios-packages:flex into master
Reviewed-on: semios/semios-packages#100
2026-07-07 11:57:43 +08:00
sisungo c0e9573a41 feat: add package bc
Signed-off-by: sisungo <[email protected]>
2026-07-07 11:16:49 +08:00
sisungo 23394f785e feat: add package patch
Signed-off-by: sisungo <[email protected]>
2026-07-07 10:53:07 +08:00
sisungo 3994b0d9a3 feat: add package flex
Signed-off-by: sisungo <[email protected]>
2026-07-07 08:04:26 +08:00
sisungo 3b78c450c5 feat: add package byacc
Signed-off-by: sisungo <[email protected]>
2026-07-07 08:03:32 +08:00
sisungo 0075495c78 Merge pull request 'feat: add package gnu-sed' (#96) from sisungo/semios-packages:gnu-sed into master
Reviewed-on: semios/semios-packages#96
2026-07-06 21:34:13 +08:00
sisungo f0147fafac Merge pull request 'feat: add package sed' (#98) from sisungo/semios-packages:sed2 into master
Reviewed-on: semios/semios-packages#98
2026-07-06 21:34:00 +08:00
sisungo a34f41f1fe Merge pull request 'feat: add package grep' (#99) from sisungo/semios-packages:grep into master
Reviewed-on: semios/semios-packages#99
2026-07-06 21:32:55 +08:00
sisungo db6f7fa8ad Merge pull request 'feat: add package pcre2' (#97) from sisungo/semios-packages:pcre2 into master
Reviewed-on: semios/semios-packages#97
2026-07-06 21:30:21 +08:00
sisungo e9f52ee363 feat: add package grep
Signed-off-by: sisungo <[email protected]>
2026-07-06 20:30:57 +08:00
sisungo 0178b36988 feat: add package sed
Signed-off-by: sisungo <[email protected]>
2026-07-06 20:05:16 +08:00
sisungo 57578dcb05 feat: add package pcre2
Signed-off-by: sisungo <[email protected]>
2026-07-06 19:01:54 +08:00
sisungo 9f623be2e5 feat: add package gnu-sed
Signed-off-by: sisungo <[email protected]>
2026-07-06 15:07:21 +08:00
sisungo f76006e595 Merge pull request 'feat: add package vim' (#92) from sisungo/semios-packages:vim into master
Reviewed-on: semios/semios-packages#92
2026-07-05 10:51:04 +08:00
sisungo fea89673ed feat: add package vim
Signed-off-by: sisungo <[email protected]>
2026-07-05 10:47:55 +08:00
sisungo 487ac4a679 Merge pull request 'feat: improve llvm packaging' (#51) from sisungo/semios-packages:llvm-maintain into master
Reviewed-on: semios/semios-packages#51
2026-07-04 22:33:55 +08:00
sisungo e55d5e74db Merge pull request 'fix: invalid semi-libc version format' (#90) from sisungo/semios-packages:libc-ver into master
Reviewed-on: semios/semios-packages#90
2026-07-04 22:31:17 +08:00
sisungo 868a631c93 fix: invalid semi-libc version format
Signed-off-by: sisungo <[email protected]>
2026-07-04 22:30:05 +08:00
sisungo 92192d5fba Merge pull request 'feat: update semi-libc to v1.2.6-1' (#89) from sisungo/semios-packages:libc-ver into master
Reviewed-on: semios/semios-packages#89
2026-07-04 22:26:55 +08:00
sisungo bbe4604406 feat: update semi-libc to v1.2.6-1
Signed-off-by: sisungo <[email protected]>
2026-07-04 22:26:20 +08:00
sisungo c471a18585 Merge pull request 'feat: add package libopus' (#69) from sisungo/semios-packages:libopus into master
Reviewed-on: semios/semios-packages#69
2026-07-04 20:51:57 +08:00
sisungo c4e694cd42 Merge pull request 'feat: add package alsa-lib' (#68) from sisungo/semios-packages:alsa-lib into master
Reviewed-on: semios/semios-packages#68
2026-07-04 20:50:24 +08:00
sisungo 7300eb7d00 Merge pull request 'feat: add package iproute2' (#67) from sisungo/semios-packages:iproute2 into master
Reviewed-on: semios/semios-packages#67
2026-07-04 20:48:11 +08:00
sisungo aba5fba2e3 Merge pull request 'feat: add package rhash' (#73) from sisungo/semios-packages:rhash into master
Reviewed-on: semios/semios-packages#73
2026-07-04 20:46:53 +08:00
sisungo 3ced6357dc Merge pull request 'feat: add package certutil' (#86) from sisungo/semios-packages:certutil into master
Reviewed-on: semios/semios-packages#86
2026-07-04 19:19:05 +08:00
sisungo b026069a61 Merge pull request 'feat: add package libgcc-compat' (#87) from sisungo/semios-packages:libgcc-compat into master
Reviewed-on: semios/semios-packages#87
2026-07-04 19:18:45 +08:00
sisungo bafd4098a8 Merge pull request 'fix: source_url does not support file://' (#88) from sisungo/semios-packages:sources-file into master
Reviewed-on: semios/semios-packages#88
2026-07-04 19:18:34 +08:00
sisungo ed7d0b5680 fix: source_url does not support file://
Signed-off-by: sisungo <[email protected]>
2026-07-04 19:17:40 +08:00
sisungo 66626cf702 feat: add package libgcc-compat
Signed-off-by: sisungo <[email protected]>
2026-07-04 19:16:36 +08:00
sisungo bfd4548869 feat: add package certutil
Signed-off-by: sisungo <[email protected]>
2026-07-04 19:01:53 +08:00
sisungo e3d032623f feat: improve llvm packaging
Signed-off-by: sisungo <[email protected]>
2026-07-04 18:35:57 +08:00
sisungo abfe30c539 Merge pull request 'feat: add package gettext-tiny' (#84) from sisungo/semios-packages:gettext-tiny into master
Reviewed-on: semios/semios-packages#84
2026-07-04 14:00:09 +08:00
sisungo b0ae1f4bf4 Merge pull request 'feat: add package ca-certificates' (#85) from sisungo/semios-packages:ca-certificates into master
Reviewed-on: semios/semios-packages#85
2026-07-04 13:59:56 +08:00
sisungo 2938e9e969 feat: add package ca-certificates
Signed-off-by: sisungo <[email protected]>
2026-07-04 12:35:05 +08:00
sisungo 50e41c4c36 feat: add package gettext-tiny
Signed-off-by: sisungo <[email protected]>
2026-07-04 11:40:00 +08:00
sisungo b0b40ef774 feat: add package git
Signed-off-by: sisungo <[email protected]>
2026-07-04 11:27:01 +08:00
sisungo df1accfb3e Merge pull request 'feat: add package brotli' (#80) from sisungo/semios-packages:brotli into master
Reviewed-on: semios/semios-packages#80
2026-07-04 10:49:08 +08:00
sisungo 2fa379760a Merge pull request 'feat: add package perl' (#81) from sisungo/semios-packages:perl into master
Reviewed-on: semios/semios-packages#81
2026-07-04 10:48:54 +08:00
sisungo f541a95e49 Merge pull request 'fix: autostrip fails on read-only permissions' (#82) from sisungo/semios-packages:autostrip-perm into master
Reviewed-on: semios/semios-packages#82
2026-07-03 22:45:01 +08:00
sisungo 764a7355f0 fix: autostrip fails on read-only permissions
Signed-off-by: sisungo <[email protected]>
2026-07-03 22:44:19 +08:00
sisungo b7d9d9b7d6 feat: add package perl
Signed-off-by: sisungo <[email protected]>
2026-07-03 22:30:54 +08:00
sisungo f55398575a feat: add package brotli
Signed-off-by: sisungo <[email protected]>
2026-07-03 12:36:35 +08:00
sisungo 3a4307f811 feat: add package c-ares
Signed-off-by: sisungo <[email protected]>
2026-07-03 12:32:14 +08:00
sisungo 2b73f626a1 feat: add package rhash
Signed-off-by: sisungo <[email protected]>
2026-07-03 11:09:53 +08:00
sisungo aef0d22091 Merge pull request 'feat: add links to libarchive-tools' (#71) from sisungo/semios-packages:link-bsdtar-bsdcpio into master
Reviewed-on: semios/semios-packages#71
2026-07-03 09:55:46 +08:00
sisungo 424ff5f6e4 feat: add links to libarchive-tools
Signed-off-by: sisungo <[email protected]>
2026-07-03 09:54:29 +08:00
sisungo 3022b06b20 feat: add package libopus
Signed-off-by: sisungo <[email protected]>
2026-07-02 22:46:48 +08:00
sisungo dac07d40bb feat: add package iproute2
Signed-off-by: sisungo <[email protected]>
2026-07-02 22:44:17 +08:00
sisungo f947e27187 feat: add package alsa-lib
Signed-off-by: sisungo <[email protected]>
2026-07-02 22:40:43 +08:00
sisungo e0cbdf7a1b Merge pull request 'feat: add package bmake' (#65) from sisungo/semios-packages:bmake into master
Reviewed-on: semios/semios-packages#65
2026-07-02 22:36:32 +08:00
sisungo 19659a6b43 Merge pull request 'feat: add prefix support' (#70) from sisungo/semios-packages:prefix into master
Reviewed-on: semios/semios-packages#70
2026-07-02 22:35:46 +08:00
sisungo f7ff9d9742 feat: add prefix support
Signed-off-by: sisungo <[email protected]>
2026-07-02 22:35:03 +08:00
sisungo c9627305c2 Merge pull request 'feat: add package libffi' (#61) from sisungo/semios-packages:libffi into master
Reviewed-on: semios/semios-packages#61
2026-06-29 16:37:04 +08:00
sisungo 69adb4a599 Merge pull request 'feat: add package neatvi' (#60) from sisungo/semios-packages:neatvi into master
Reviewed-on: semios/semios-packages#60
2026-06-29 16:36:49 +08:00
sisungo 7076f76481 Merge pull request 'feat: add package awk' (#64) from sisungo/semios-packages:awk into master
Reviewed-on: semios/semios-packages#64
2026-06-29 16:36:33 +08:00
sisungo 83e967f858 feat: add package bmake
Signed-off-by: sisungo <[email protected]>
2026-06-29 16:23:56 +08:00
sisungo bc23a14b1a feat: add package awk
Signed-off-by: sisungo <[email protected]>
2026-06-29 15:43:38 +08:00
sisungo 5b78c48d8e feat: add package libffi
Signed-off-by: sisungo <[email protected]>
2026-06-29 14:13:56 +08:00
sisungo 36ceb91590 feat: add package neatvi
Signed-off-by: sisungo <[email protected]>
2026-06-29 13:56:33 +08:00
sisungo f24ea2d4bf Merge pull request 'feat: use packie new links format' (#59) from sisungo/semios-packages:new-links-format into master
Reviewed-on: semios/semios-packages#59
2026-06-28 17:12:16 +08:00
sisungo b4aa642b52 feat: use packie new links format
Signed-off-by: sisungo <[email protected]>
2026-06-28 16:31:35 +08:00
sisungo 9eb4453f3a Merge pull request 'feat: update aws-lc OPENSSLDIR' (#58) from sisungo/semios-packages:aws-lc-patch into master
Reviewed-on: semios/semios-packages#58
2026-06-28 11:32:43 +08:00
sisungo 132c47e419 Merge pull request 'feat: add aws-lc support for python' (#57) from sisungo/semios-packages:python into master
Reviewed-on: semios/semios-packages#57
2026-06-28 10:25:56 +08:00
sisungo 596b055467 feat: update aws-lc OPENSSLDIR
Signed-off-by: sisungo <[email protected]>
2026-06-28 03:35:34 +08:00
sisungo cc0a73feff feat: add aws-lc support for python
Signed-off-by: sisungo <[email protected]>
2026-06-28 02:46:31 +08:00
sisungo 4b842d43be Merge pull request 'feat: add package file' (#52) from sisungo/semios-packages:file into master
Reviewed-on: semios/semios-packages#52
2026-06-27 22:00:27 +08:00
sisungo 7f1ee4b598 Merge pull request 'feat: update aws-lc to 5.1.0' (#56) from sisungo/semios-packages:aws-lc-update into master
Reviewed-on: semios/semios-packages#56
2026-06-27 22:00:09 +08:00
sisungo 15eb054209 feat: update aws-lc to 5.1.0
Signed-off-by: sisungo <[email protected]>
2026-06-27 21:31:22 +08:00
sisungo 16a1087785 feat: add package file
Signed-off-by: sisungo <[email protected]>
2026-06-27 18:28:20 +08:00
sisungo d0186dacb5 Merge pull request 'feat: add package python' (#49) from sisungo/semios-packages:python into master
Reviewed-on: semios/semios-packages#49
2026-06-27 13:45:30 +08:00
sisungo 574f8a5996 Merge pull request 'feat: update semi-libc to v1.2.6' (#50) from sisungo/semios-packages:semi-libc-new into master
Reviewed-on: semios/semios-packages#50
2026-06-27 13:44:27 +08:00
sisungo bb3c5b2741 feat: update semi-libc to v1.2.6
Signed-off-by: sisungo <[email protected]>
2026-06-27 13:43:36 +08:00
sisungo e749a4f1f9 feat: add package python
Signed-off-by: sisungo <[email protected]>
2026-06-27 10:46:20 +08:00
sisungo 10ca4e4931 Merge pull request 'feat: add package openssh' (#47) from sisungo/semios-packages:openssh into master
Reviewed-on: semios/semios-packages#47
2026-06-26 19:58:49 +08:00
sisungo e65eee4bf1 Merge pull request 'feat: add package iana-timezone' (#46) from sisungo/semios-packages:iana-timezone into master
Reviewed-on: semios/semios-packages#46
2026-06-26 19:58:39 +08:00
sisungo 7797e7674c Merge pull request 'feat: add package mandoc' (#45) from sisungo/semios-packages:mandoc into master
Reviewed-on: semios/semios-packages#45
2026-06-26 19:58:24 +08:00
sisungo d9b7a01d01 Merge pull request 'feat: add package ncurses' (#48) from sisungo/semios-packages:ncurses into master
Reviewed-on: semios/semios-packages#48
2026-06-26 19:58:08 +08:00
sisungo 232d8c51d6 feat: add package ncurses
Signed-off-by: sisungo <[email protected]>
2026-06-26 18:11:33 +08:00
sisungo 56998f9787 feat: add package openssh
Signed-off-by: sisungo <[email protected]>
2026-06-26 17:07:35 +08:00
sisungo 510eca1ab6 feat: add package iana-timezone
Signed-off-by: sisungo <[email protected]>
2026-06-26 16:43:12 +08:00
sisungo 057330e43f feat: add package mandoc
Signed-off-by: sisungo <[email protected]>
2026-06-26 14:30:24 +08:00
sisungo 0ba3f9a31c Merge pull request 'feat: add package ripgrep' (#41) from sisungo/semios-packages:ripgrep into master
Reviewed-on: semios/semios-packages#41
2026-06-26 14:12:41 +08:00
sisungo 63c3485f5e Merge pull request 'feat: add package sed' (#42) from sisungo/semios-packages:sed into master
Reviewed-on: semios/semios-packages#42
2026-06-26 14:12:26 +08:00
sisungo 9835791b4c Merge pull request 'feat: add package nextvi' (#40) from sisungo/semios-packages:nextvi into master
Reviewed-on: semios/semios-packages#40
2026-06-26 14:12:15 +08:00
sisungo 204f650c63 Merge pull request 'fix: some dependencies are invalid' (#44) from sisungo/semios-packages:fix-deps into master
Reviewed-on: semios/semios-packages#44
2026-06-26 14:12:01 +08:00
sisungo e9fe74358f Merge pull request 'feat: add link to /bin/sh in mksh' (#39) from sisungo/semios-packages:mksh-link into master
Reviewed-on: semios/semios-packages#39
2026-06-26 14:11:48 +08:00
sisungo 962c916ae1 fix: some dependencies are invalid
Signed-off-by: sisungo <[email protected]>
2026-06-26 13:37:12 +08:00
sisungo 248c0bbc66 Merge pull request 'feat: add unix functions to coreutils' (#38) from sisungo/semios-packages:coreutils-unix into master
Reviewed-on: semios/semios-packages#38
2026-06-25 21:52:24 +08:00
sisungo 33d3df6dfc feat: add package nextvi
Signed-off-by: sisungo <[email protected]>
2026-06-25 06:46:24 +08:00
sisungo bffd8e3cdc feat: add link to /bin/sh in mksh
Signed-off-by: sisungo <[email protected]>
2026-06-25 06:19:26 +08:00
sisungo 51368da8ff feat: add package ripgrep
Signed-off-by: sisungo <[email protected]>
2026-06-25 06:14:38 +08:00
sisungo f8f18ce917 feat: add package sed
Signed-off-by: sisungo <[email protected]>
2026-06-25 06:10:15 +08:00
sisungo f7242af3a9 feat: add unix functions to coreutils
Signed-off-by: sisungo <[email protected]>
2026-06-25 05:57:11 +08:00
sisungo a3dbac2b67 Merge pull request 'feat: add dependencies and provisions' (#37) from sisungo/semios-packages:deps into master
Reviewed-on: semios/semios-packages#37
2026-06-23 15:29:18 +08:00
sisungo 383433a365 feat: add dependencies and provisions
Signed-off-by: sisungo <[email protected]>
2026-06-23 15:27:46 +08:00
sisungo 844b40daaa Merge pull request 'fix: architecture environments overrides inherited' (#36) from sisungo/semios-packages:arches into master
Reviewed-on: semios/semios-packages#36
2026-06-22 19:14:50 +08:00
sisungo e568b3f8ee fix: architecture environments overrides inherited
Signed-off-by: sisungo <[email protected]>
2026-06-22 18:32:41 +08:00
sisungo a1ae78330c Merge pull request 'feat: refactor ./x script' (#35) from sisungo/semios-packages:master into master
Reviewed-on: semios/semios-packages#35
2026-06-22 17:41:40 +08:00
sisungo 9ca10cb556 feat: refactor ./x script
Signed-off-by: sisungo <[email protected]>
2026-06-22 17:38:23 +08:00
sisungo 95a92ddae2 Merge pull request 'feat: add package llvm-project' (#25) from sisungo/semios-packages:llvm-project into master
Reviewed-on: semios/semios-packages#25
2026-06-21 20:36:38 +08:00
sisungo e6dd47ca7f feat: add package llvm-project
Signed-off-by: sisungo <[email protected]>
2026-06-21 20:35:56 +08:00
sisungo 2d9586117e Merge pull request 'feat: add package icu4c' (#33) from sisungo/semios-packages:icu4c into master
Reviewed-on: semios/semios-packages#33
2026-06-18 18:59:24 +08:00
sisungo 4df9ac681f Merge pull request 'feat (lib): fix cpp auto-pack symlink error' (#34) from sisungo/semios-packages:cpp_fixup into master
Reviewed-on: semios/semios-packages#34
2026-06-18 18:59:11 +08:00
sisungo a47f241569 Merge pull request 'feat: add package airup' (#32) from sisungo/semios-packages:airup into master
Reviewed-on: semios/semios-packages#32
2026-06-18 18:58:32 +08:00
sisungo df21a97eb1 Merge pull request 'feat (lib): add artifacts_dir to rust' (#31) from sisungo/semios-packages:rust-artifacts into master
Reviewed-on: semios/semios-packages#31
2026-06-18 18:55:08 +08:00
sisungo adea3cc896 feat: add package airup
Signed-off-by: sisungo <[email protected]>
2026-06-18 01:25:39 +08:00
sisungo 8fe867991c feat (lib): fix cpp auto-pack symlink error
Signed-off-by: sisungo <[email protected]>
2026-06-18 01:20:14 +08:00
sisungo 5a36fc628c feat: add package icu4c
Signed-off-by: sisungo <[email protected]>
2026-06-18 01:19:16 +08:00
sisungo 18f624e3c9 feat (lib): add artifacts_dir to rust
Signed-off-by: sisungo <[email protected]>
2026-06-17 20:27:37 +08:00
sisungo 0cc9a5c843 Merge pull request 'feat: add package nghttp2' (#30) from sisungo/semios-packages:nghttp2 into master
Reviewed-on: semios/semios-packages#30
2026-06-13 22:58:44 +08:00
sisungo 187e56dfef feat: add package nghttp2
Signed-off-by: sisungo <[email protected]>
2026-06-13 18:16:40 +08:00
sisungo a24cf0b528 Merge pull request 'fix: coreutils links are invalid' (#29) from sisungo/semios-packages:coreutils-links into master
Reviewed-on: semios/semios-packages#29
2026-06-13 12:46:29 +08:00
sisungo 73b1fcd745 fix: coreutils links are invalid
Signed-off-by: sisungo <[email protected]>
2026-06-13 12:45:37 +08:00
sisungo 878a501804 Merge pull request 'feat: add links to coreutils' (#28) from sisungo/semios-packages:coreutils-links into master
Reviewed-on: semios/semios-packages#28
2026-06-13 12:22:36 +08:00
sisungo eee111823d feat: add links to coreutils
Signed-off-by: sisungo <[email protected]>
2026-06-13 12:21:58 +08:00
sisungo 2dfaea6426 Merge pull request 'fix: autostrip caught wrong binaries' (#27) from sisungo/semios-packages:master into master
Reviewed-on: semios/semios-packages#27
2026-06-13 12:14:31 +08:00
sisungo d61c4ab118 fix: autostrip caught wrong binaries
Signed-off-by: sisungo <[email protected]>
2026-06-13 12:13:59 +08:00
sisungo a3690e710c Merge pull request 'feat: add package kmod' (#24) from sisungo/semios-packages:kmod into master
Reviewed-on: semios/semios-packages#24
2026-06-13 12:03:04 +08:00
sisungo a1f00f3b4f Merge pull request 'feat (lib): add autolink and autostrip' (#26) from sisungo/semios-packages:master into master
Reviewed-on: semios/semios-packages#26
2026-06-13 12:02:48 +08:00
sisungo d4a8040a9c feat (lib): add autolink and autostrip
Signed-off-by: sisungo <[email protected]>
2026-06-13 12:01:43 +08:00
sisungo ddd14ddfda feat: add package kmod
Signed-off-by: sisungo <[email protected]>
2026-06-12 17:40:41 +08:00
sisungo e8234fc32a Merge pull request 'feat: add package bzip2' (#20) from sisungo/semios-packages:bzip2 into master
Reviewed-on: semios/semios-packages#20
2026-06-12 13:16:06 +08:00
sisungo 1c1b8c0a5f Merge pull request 'feat: add package xz' (#21) from sisungo/semios-packages:xz into master
Reviewed-on: semios/semios-packages#21
2026-06-12 13:15:54 +08:00
sisungo 35d6dda90a Merge pull request 'feat (lib): add cpp.meson build' (#22) from sisungo/semios-packages:mesonbuild into master
Reviewed-on: semios/semios-packages#22
2026-06-12 13:15:39 +08:00
sisungo 3b4bd8274b Merge pull request 'feat: add package pkgconf' (#23) from sisungo/semios-packages:pkgconf into master
Reviewed-on: semios/semios-packages#23
2026-06-12 13:15:26 +08:00
sisungo 52237e92c3 Merge pull request 'feat: add package expat' (#19) from sisungo/semios-packages:expat into master
Reviewed-on: semios/semios-packages#19
2026-06-12 13:15:15 +08:00
sisungo 1a88d3cc3f feat: add package pkgconf
Signed-off-by: sisungo <[email protected]>
2026-06-12 12:34:33 +08:00
sisungo cdfa61524c feat (lib): add cpp.meson build
Signed-off-by: sisungo <[email protected]>
2026-06-12 12:33:56 +08:00
sisungo 5c7754c852 feat: add package xz
Signed-off-by: sisungo <[email protected]>
2026-06-12 11:42:33 +08:00
sisungo d415dd8ea5 feat: add package bzip2
Signed-off-by: sisungo <[email protected]>
2026-06-12 11:32:42 +08:00
sisungo 44ac99e6b9 feat: add package expat
Signed-off-by: sisungo <[email protected]>
2026-06-12 11:20:39 +08:00
sisungo 6fba906736 Merge pull request 'feat: add package findutils' (#16) from sisungo/semios-packages:findutils into master
Reviewed-on: semios/semios-packages#16
2026-06-12 11:08:35 +08:00
sisungo 1092471a91 Merge pull request 'feat: add package diffutils' (#17) from sisungo/semios-packages:diffutils into master
Reviewed-on: semios/semios-packages#17
2026-06-12 11:07:52 +08:00
sisungo 64e961c02b Merge pull request 'feat: add package linux' (#18) from sisungo/semios-packages:linux into master
Reviewed-on: semios/semios-packages#18
2026-06-12 11:07:05 +08:00
sisungo 675af1b352 feat: add package linux
Signed-off-by: sisungo <[email protected]>
2026-06-12 11:05:29 +08:00
sisungo 41edafea75 feat: add package diffutils
Signed-off-by: sisungo <[email protected]>
2026-06-11 19:23:57 +08:00
sisungo 909f4b009b feat: add package findutils
Signed-off-by: sisungo <[email protected]>
2026-06-11 19:13:11 +08:00
sisungo 164d9f9006 Merge pull request 'feat: improve package naming' (#15) from sisungo/semios-packages:master into master
Reviewed-on: semios/semios-packages#15
2026-06-11 17:42:30 +08:00
sisungo 2f204dc5ff Merge pull request 'feat: add package sqlite' (#14) from sisungo/semios-packages:sqlite into master
Reviewed-on: semios/semios-packages#14
2026-06-11 17:05:31 +08:00
sisungo 6f46eb5bc9 Merge pull request 'feat: add package linenoise' (#13) from sisungo/semios-packages:linenoise into master
Reviewed-on: semios/semios-packages#13
2026-06-11 16:45:28 +08:00
sisungo b084ee0c6b feat: improve package naming
Signed-off-by: sisungo <[email protected]>
2026-06-11 15:23:32 +08:00
sisungo fc4a14281c feat: add package sqlite
Signed-off-by: sisungo <[email protected]>
2026-06-11 14:53:17 +08:00
sisungo 86139f1ddc feat: add package linenoise
Signed-off-by: sisungo <[email protected]>
2026-06-11 14:16:33 +08:00
sisungo 95483cedaf Merge pull request 'feat: add package libarchive' (#12) from sisungo/semios-packages:libarchive into master
Reviewed-on: semios/semios-packages#12
2026-06-11 13:47:10 +08:00
sisungo fb4af908ba feat: add package libarchive
Signed-off-by: sisungo <[email protected]>
2026-06-11 13:46:40 +08:00
sisungo 828e4dcf6d Merge pull request 'feat: add package zstd' (#11) from sisungo/semios-packages:zstd into master
Reviewed-on: semios/semios-packages#11
2026-06-11 13:34:14 +08:00
sisungo a2fe8796d3 feat: add package zstd
Signed-off-by: sisungo <[email protected]>
2026-06-11 13:33:19 +08:00
sisungo 15b8c28c56 Merge pull request 'feat: add package zlib-ng' (#10) from sisungo/semios-packages:zlib-ng into master
Reviewed-on: semios/semios-packages#10
2026-06-11 13:24:08 +08:00
sisungo 791a621723 feat: add package zlib-ng
Signed-off-by: sisungo <[email protected]>
2026-06-11 13:23:30 +08:00
sisungo 7d16c90042 Merge pull request 'feat: add package aws-lc' (#9) from sisungo/semios-packages:aws-lc into master
Reviewed-on: semios/semios-packages#9
2026-06-10 21:32:54 +08:00
sisungo 91226580aa Merge pull request 'feat: add package ninja' (#8) from sisungo/semios-packages:ninja into master
Reviewed-on: semios/semios-packages#8
2026-06-10 19:08:59 +08:00
sisungo e8c3ebafc7 Merge pull request 'feat: add package gnu-make' (#7) from sisungo/semios-packages:gnu-make into master
Reviewed-on: semios/semios-packages#7
2026-06-10 18:30:08 +08:00
sisungo d159cd0b5b Merge pull request 'feat: add hooks/autopatch' (#6) from sisungo/semios-packages:patches into master
Reviewed-on: semios/semios-packages#6
2026-06-10 18:29:41 +08:00
sisungo f9dba39603 feat: add package aws-lc
Signed-off-by: sisungo <[email protected]>
2026-06-10 07:17:27 +08:00
sisungo d8007af248 feat: add package ninja
Signed-off-by: sisungo <[email protected]>
2026-06-10 05:10:54 +08:00
sisungo bf52025629 feat: add hooks/autopatch
Signed-off-by: sisungo <[email protected]>
2026-06-10 04:53:01 +08:00
100 changed files with 14438 additions and 72 deletions
+13 -2
View File
@@ -1,9 +1,20 @@
from typing import Callable, TypeAlias
from . import autostrip
from lib import pkgcomposer
from . import autolink, autopatch, autostrip
PreBuild: TypeAlias = Callable[[], None]
PostBuild: TypeAlias = Callable[[], None]
PostPack: TypeAlias = Callable[[pkgcomposer.PkgComposer], None]
post_build: dict[str, PostBuild] = {
pre_build: dict[str, PreBuild] = {
"autopatch": autopatch.autopatch,
}
post_build: dict[str, PostBuild] = {}
post_pack: dict[str, PostPack] = {
"autolink": autolink.autolink,
"autostrip": autostrip.autostrip,
}
+54
View File
@@ -0,0 +1,54 @@
import os
from lib import arch, common, make, pkgcomposer
def is_abslink(path):
try:
return os.readlink(path).startswith("/")
except:
return False
def autolink_bin(composer: pkgcomposer.PkgComposer):
if is_abslink("bin"):
return
for i in common.treedir("bin"):
if i.is_file() and os.access(i.path, os.X_OK):
make.link(f"bin/{i.name}", "/bin/" + i.name)
def autolink_lib(composer: pkgcomposer.PkgComposer):
if is_abslink("lib"):
return
for i in common.treedir("lib"):
if i.is_file():
make.link(f"lib/{i.name}", "/lib/" + arch.get_target() + "/" + i.name)
def autolink_include(composer: pkgcomposer.PkgComposer):
if is_abslink("include"):
return
for i in common.treedir("include"):
if i.is_file():
make.link(
f"include/{i.name}",
"/lib/" + arch.get_target() + "/include/" + i.name,
)
def autolink(composer: pkgcomposer.PkgComposer):
os.chdir(composer.workdir + "/bundle/")
try:
autolink_bin(composer)
except:
pass
try:
autolink_lib(composer)
except:
pass
try:
autolink_include(composer)
except:
pass
+29
View File
@@ -0,0 +1,29 @@
import os
import subprocess
import lib.sources as sources
def autopatch():
if not os.path.exists("patches"):
return
target_dir = os.getcwd() + "/target"
source_dir = sources.sources_dir_name()
patches_tag_file = f"{target_dir}/patches.tag"
patches_dir = os.getcwd() + "/patches"
patches = os.listdir(patches_dir)
patches.sort()
os.chdir(source_dir)
if not os.path.exists(patches_tag_file):
open(patches_tag_file, "+w").close()
for i in patches:
with open(patches_tag_file, "r") as file:
if i + "\n" in file.readlines():
continue
with open(f"{patches_dir}/{i}", "r") as file:
subprocess.run(["patch", "-p1"], stdin=file)
with open(patches_tag_file, "+a") as file:
file.write(i + "\n")
+59 -2
View File
@@ -1,2 +1,59 @@
def autostrip():
pass
import os
import stat
import subprocess
import tempfile
import shutil
from lib import common
strip = os.environ.get("STRIP", "strip")
def _is_elf(filepath):
with open(filepath, "rb") as f:
return f.read(4) == b"\x7fELF"
def autostrip(composer):
processed_inodes = {}
for ent in common.treedir(composer.workdir):
if not ent.is_file(follow_symlinks=False):
continue
if not (os.access(ent.path, os.X_OK) or ".so" in ent.name):
continue
if not _is_elf(ent.path):
continue
stat_info = os.stat(ent.path)
inode_key = (stat_info.st_dev, stat_info.st_ino)
if inode_key in processed_inodes:
continue
processed_inodes[inode_key] = True
oldperm = stat.S_IMODE(stat_info.st_mode)
try:
with tempfile.NamedTemporaryFile(mode='wb', delete=False) as tmp_file:
tmp_path = tmp_file.name
shutil.copy2(ent.path, tmp_path)
os.chmod(tmp_path, 0o777)
subprocess.run([strip, tmp_path], check=True)
with open(tmp_path, 'rb') as tmp_file:
stripped_data = tmp_file.read()
with open(ent.path, 'r+b') as original_file:
original_file.truncate(0)
original_file.write(stripped_data)
original_file.flush()
os.fsync(original_file.fileno())
os.chmod(ent.path, oldperm)
os.unlink(tmp_path)
except Exception as e:
if 'tmp_path' in locals() and os.path.exists(tmp_path):
os.unlink(tmp_path)
raise RuntimeError(f"Failed to strip {ent.path}: {e}") from e
+15 -3
View File
@@ -3,7 +3,18 @@ import os
from . import packie
all: dict[str, dict[str, str]] = {
"aarch64-semios-linux": {},
"aarch64-semios-linux": {
"CC": "clang -target aarch64-unknown-linux-musl",
"CXX": "clang++ -target aarch64-unknown-linux-musl",
},
"x86_64-semios-linux": {
"CC": "clang -target x86_64-unknown-linux-musl",
"CXX": "clang++ -target x86_64-unknown-linux-musl",
},
"riscv64-semios-linux": {
"CC": "clang -target riscv64-unknown-linux-musl",
"CXX": "clang++ -target riscv64-unknown-linux-musl",
},
}
_target: str = packie.host_arch()
@@ -15,5 +26,6 @@ def get_target():
def set_target(arch: str):
global _target
_target = arch
for key, val in all[_target]:
os.environ[key] = val
for key in all[_target].keys():
if not os.environ.get(key):
os.environ[key] = all[_target][key]
+138
View File
@@ -0,0 +1,138 @@
import os
import shutil
import subprocess
from . import packie
BASE_REQUIREMENTS = [
# Basic packages for running shell scripts
"mksh",
"coreutils",
"findutils",
"diffutils",
# Packages for running `semios-packages` scripts
"python",
"packie",
"zstd",
"libarchive-tools",
# Packages for building packages that require patching
"patch",
# Packages for downloading various formats of tarballs
"libz-ng",
"liblzma",
"libbzip2",
# Basic libraries
"sqlite",
"libgcc-compat",
"libcxx",
"semi-libc",
# Networking
"ca-certificates",
"certutil",
"aws-lc-libssl",
"aws-lc-tools",
]
def _prepare_build_env_base_files(root: str):
# Create root directory
os.makedirs(root, exist_ok=True)
# Create var, run and tmp
os.mkdir(f"{root}/var")
os.mkdir(f"{root}/var/tmp")
os.mkdir(f"{root}/var/run")
os.mkdir(f"{root}/tmp")
os.mkdir(f"{root}/run")
# Copy repository config files
os.makedirs(f"{root}/var/db/packie")
shutil.copytree("/var/config/packie/repos.d", f"{root}/var/config/packie/repos.d")
# Create directories for kernel pseudo filesystems
os.mkdir(f"{root}/dev")
os.mkdir(f"{root}/sys")
os.mkdir(f"{root}/proc")
# Create home directory of root (some scripts may require it)
os.makedirs(f"{root}/home/root")
# Copy DNS config
os.makedirs(f"{root}/etc", exist_ok=True)
shutil.copy2("/etc/resolv.conf", f"{root}/etc/resolv.conf")
def prepare_build_env(root: str, extreq: list[str] = []):
# Skip if the environment is already initialized
if os.path.exists(f"{root}/.INIT"):
return
try:
shutil.rmtree(root)
except:
pass
# Prepare basic filesystem hierarchy
_prepare_build_env_base_files(root)
# Install packages
packie.chroot_update(root)
packie.chroot_install(root, BASE_REQUIREMENTS + extreq)
# Refresh certificates
enter_build_env(root, ["certutil", "refresh"])
# Create initialized tag
with open(f"{root}/.INIT", "wt+") as file:
file.write("OK")
def enter_build_env(root: str, cmd: list[str], chdir: str = "/"):
reserve_env = ["https_proxy", "http_proxy", "all_proxy"]
reserve_env_args = []
for i in reserve_env:
if os.environ.get(i):
reserve_env_args += ["--setenv", i, os.environ[i]]
subprocess.run(
[
"bwrap",
"--bind", root, "/",
"--unshare-pid",
"--unshare-user",
"--uid", "0",
"--gid", "0",
"--dev", "/dev",
"--bind", "/sys", "/sys",
"--proc", "/proc",
"--clearenv",
"--setenv", "HOME", "/home/root",
"--setenv", "PATH", "/bin",
"--setenv", "SEMIOS_PKGBUILD_IN_ATOMIC", "1",
"--setenv", "USER", "root",
"--setenv", "LOGNAME", "root",
"--chdir",
chdir,
]
+ reserve_env_args
+ cmd
)
def copy_pkgbuild_tree(repo_root: str, pkgname: str, build_env_root: str):
build_dir = f"{build_env_root}/Atom"
if os.path.exists(build_dir):
return
os.mkdir(build_dir)
shutil.copytree(f"{repo_root}/hooks", f"{build_dir}/hooks")
shutil.copytree(f"{repo_root}/lib", f"{build_dir}/lib")
shutil.copy2(f"{repo_root}/x", f"{build_dir}/x")
shutil.copy2(f"{repo_root}/x.py", f"{build_dir}/x.py")
os.makedirs(f"{build_dir}/packages/{pkgname}")
for i in os.listdir(f"{repo_root}/packages/{pkgname}"):
srcpath = f"{repo_root}/packages/{pkgname}/{i}"
dstpath = f"{build_dir}/packages/{pkgname}/{i}"
if i in ["target", "__pycache__"]:
continue
if os.path.isdir(srcpath):
shutil.copytree(srcpath, dstpath)
elif os.path.isfile(srcpath):
shutil.copy2(srcpath, dstpath)
+21
View File
@@ -0,0 +1,21 @@
import os
import types
def _wrap_treedir_entry(ent, prefix=""):
wrapped = types.SimpleNamespace()
wrapped.name = f"{prefix}/{ent.name}" if prefix else ent.name
wrapped.path = ent.path
wrapped.is_dir = ent.is_dir
wrapped.is_file = ent.is_file
wrapped.is_symlink = ent.is_symlink
return wrapped
def treedir(root: str, prefix: str = ""):
with os.scandir(root) as entries:
for ent in entries:
wrapped = _wrap_treedir_entry(ent, prefix)
yield wrapped
if wrapped.is_dir(follow_symlinks=False):
yield from treedir(ent.path, wrapped.name)
+103 -17
View File
@@ -1,6 +1,9 @@
import os
import shutil
import subprocess
from lib.common import treedir
from . import make as libmake
from . import pkgcomposer
@@ -9,44 +12,127 @@ def configure(rem: list[str] = []):
subprocess.run(["./configure"] + rem, check=True)
def cmake(rem: list[str] = []):
source_dir = os.getcwd()
os.makedirs("../cmake_build", exist_ok=True)
os.chdir("../cmake_build")
subprocess.run(
[
"cmake",
"-GNinja",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=/",
source_dir,
]
+ rem,
check=True,
)
def _move_install():
subprocess.run(["sh", "-c", "cp -r ./pkg/*@*/* . 2>/dev/null || true"], check=False)
subprocess.run(
["sh", "-c", "cp -r ./usr/local/* . 2>/dev/null || true"], check=False
)
subprocess.run(["sh", "-c", "cp -r ./usr/* . 2>/dev/null || true"], check=False)
subprocess.run(["rm", "-rf", "./pkg", "./usr"], check=False)
def make(rem: list[str] = []):
subprocess.run(["make", f"-j{os.cpu_count()}"] + rem, check=True)
def make_install(rem: list[str] | None = None, chdir: bool = True):
def make_install(rem: list[str] | None = None, chdir: bool = True, move: bool = True):
default_rem = ["DESTDIR=" + os.getcwd() + "/../cpp_install"]
if rem is None:
try:
shutil.rmtree("../cpp_install")
except:
pass
subprocess.run(["make", "install"] + (rem or default_rem), check=True)
if rem is None and chdir:
os.chdir("../cpp_install")
if chdir and move:
_move_install()
def ninja(rem: list[str] = []):
subprocess.run(["ninja"] + rem, check=True)
def ninja_install(rem: list[str] = [], chdir: bool = True, move: bool = True):
if chdir:
os.environ["DESTDIR"] = os.getcwd() + "/../cpp_install"
subprocess.run(["ninja", "install"] + rem, check=True)
if chdir:
os.chdir(os.environ["DESTDIR"])
if chdir and move:
_move_install()
def meson_setup(rem: list[str] = []):
subprocess.run(["meson", "setup", "_meson_build"] + rem, check=True)
def meson_compile(rem: list[str] = []):
subprocess.run(["meson", "compile", "-C", "_meson_build"] + rem, check=True)
def meson_install(rem: list[str] | None = None, chdir: bool = True, move: bool = True):
default_rem = ["--destdir", f"{os.getcwd()}/../cpp_install"]
if not rem:
os.makedirs("../cpp_install", exist_ok=True)
subprocess.run(
["meson", "install", "-C", "_meson_build"] + (rem or default_rem), check=True
)
if chdir:
os.chdir("../cpp_install")
if chdir and move:
_move_install()
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
pc.makedir(dstdir)
with os.scandir(srcdir) as entries:
for ent in entries:
if filter(ent):
if ent.is_dir(follow_symlinks=False):
pc.makedir(f"{dstdir}/{ent.name}")
elif ent.is_file(follow_symlinks=False):
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
elif ent.is_symlink() and not os.path.isabs(os.readlink(ent.path)):
if not os.path.exists(srcdir):
return
try:
pc.makedir(dstdir)
except Exception:
pass
for ent in treedir(srcdir):
if filter(ent):
if ent.is_file(follow_symlinks=False):
pc.makedirs(os.path.dirname(f"{dstdir}/{ent.name}"))
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
elif ent.is_symlink() and not os.path.isabs(os.readlink(ent.path)):
try:
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
except Exception:
pass
def _is_dev_file(ent) -> bool:
return (
ent.name.endswith(".o")
or ent.name.endswith(".a")
or ent.name.endswith(".la")
or ent.name.endswith(".pc")
or ent.name.endswith(".h")
or ent.name.endswith(".cmake")
or ent.name.endswith(".inc")
or ("Makefile" in ent.name)
)
def _autopack_filter_lib(ent) -> bool:
if ent.name.endswith(".o") or ent.name.endswith(".a"):
return False
return True
return not _is_dev_file(ent)
def _autopack_filter_bin(ent) -> bool:
return True
return os.access(ent.path, os.X_OK) and ent.is_file(follow_symlinks=False)
def _autopack_filter_dev(ent):
if ".so" in ent.name:
return False
return True
return _is_dev_file(ent)
def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):
+89 -3
View File
@@ -1,27 +1,66 @@
import typing
from lib import arch
from . import pkgcomposer, sources
_key_global = "@global"
_key_version = "version"
_key_description = "description"
_key_maintainers = "maintainers"
_key_on_pack = "on_pack"
_key_arch_any = "arch_any"
_key_links = "links"
_key_dependencies = "dependencies"
_key_recommendations = "recommendations"
_key_provides = "provides"
_current_pkgname: str = _key_global
_pkginfo: dict[str, dict[str, typing.Any]] = {
_key_global: {},
_key_global: {
_key_links: [],
_key_dependencies: [],
_key_maintainers: [],
_key_provides: [],
_key_recommendations: [],
},
}
_supported_arch: typing.Callable[[str], bool] = lambda x: True
_on_build: typing.Callable[[], None] | None = None
_in_atombuild = False
_builddep: list[str] = []
_blocked_hooks: list[str] = []
def builddep(s: str):
global _builddep
if s == "shortcut/c":
_builddep += ["semi-libc-dev", "clang", "llvm", "lld"]
elif s == "shortcut/c++":
builddep("shortcut/c")
_builddep += ["libcxx-dev"]
elif s == "shortcut/autotools":
_builddep += ["gnu-make", "gnu-sed", "awk", "grep"]
elif s == "shortcut/rust":
builddep("shortcut/c")
_builddep += ["cargo", "rustc"]
elif s == "shortcut/cmake":
_builddep += ["cmake", "ninja"]
elif s == "shortcut/meson":
_builddep += ["meson", "ninja"]
else:
_builddep += [s]
def package(s: str):
global _current_pkgname
_current_pkgname = s
_pkginfo[s] = _pkginfo[_key_global].copy()
_pkginfo[s][_key_links] = _pkginfo[s][_key_links].copy()
_pkginfo[s][_key_dependencies] = _pkginfo[s][_key_dependencies].copy()
_pkginfo[s][_key_provides] = _pkginfo[s][_key_provides].copy()
def version(s: str):
@@ -32,10 +71,55 @@ def description(s: str):
_pkginfo[_current_pkgname][_key_description] = s
def maintainer(s: str):
_pkginfo[_current_pkgname][_key_maintainers] += [s]
def arch_any():
_pkginfo[_current_pkgname][_key_arch_any] = True
def provide(s: str):
_pkginfo[_current_pkgname][_key_provides] += [
s.replace("@same-arch", f"@{arch.get_target()}")
]
def _translate_dep_spec(s: str) -> str:
return (
s.replace("(same)", "(same-version) @same-arch")
.replace("(same-version)", f"(={_pkginfo[_current_pkgname][_key_version]})")
.replace("@same-arch", f"@{arch.get_target()}")
)
def dep(s: str):
_pkginfo[_current_pkgname][_key_dependencies] += [_translate_dep_spec(s)]
def recommend(s: str):
_pkginfo[_current_pkgname][_key_recommendations] += [_translate_dep_spec(s)]
def link(src: str, dst: str, default: bool = True):
_pkginfo[_current_pkgname][_key_links] += [
{
"from": src,
"to": dst,
"default": default,
}
]
def get_prefix(pkgname: str) -> str:
pkginfo = _pkginfo[pkgname]
if pkginfo.get(_key_arch_any):
pkgarch = "any"
else:
pkgarch = arch.get_target()
return f"/pkg/{pkgname}={pkginfo[_key_version]}@{pkgarch}"
def supported_arch(s: list[str] | typing.Callable[[str], bool]):
global _supported_arch
if isinstance(s, list):
@@ -58,8 +142,10 @@ def block_hook(hook: str):
def source_url(url: str):
sources.source_url(url)
if not _in_atombuild:
sources.source_url(url)
def source_git(url: str, branch: str | None = None):
sources.source_git(url, branch)
if not _in_atombuild:
sources.source_git(url, branch)
+28 -2
View File
@@ -1,11 +1,37 @@
import subprocess
import os
import subprocess
PACKIE_EXEC = os.getenv("PACKIE", "packie")
def host_arch() -> str:
result = subprocess.run(
[PACKIE_EXEC, "print", "profile.host_arch"],
check=True, capture_output=True,
check=True,
capture_output=True,
)
return result.stdout.decode().strip()
def chroot_update(root: str):
subprocess.run([PACKIE_EXEC, "--chroot", root, "update"], check=True)
def chroot_install(root: str, requirements: list[str]):
subprocess.run(
[PACKIE_EXEC, "--chroot", root, "install", "--yes"] + requirements, check=True
)
def update():
subprocess.run([PACKIE_EXEC, "update"], check=True)
def install(requirements: list[str]):
subprocess.run([PACKIE_EXEC, "install", "--yes"] + requirements, check=True)
def repo_add(repo: str, pkgfile: str):
subprocess.run(
[PACKIE_EXEC, "repo-admin", repo, "--add-package", pkgfile], check=True
)
+33 -12
View File
@@ -1,19 +1,13 @@
import json
import os
import shutil
import subprocess
import sys
if sys.version_info >= (3, 14):
_archive_format = "zstdtar"
_archive_suffix = ".tar.zst"
else:
_archive_format = "gztar"
_archive_suffix = ".tar.gz"
class PkgComposer:
def __init__(self, pkgfile: str):
self.pkgfile = pkgfile
self.pkgfile = os.path.abspath(pkgfile)
def setworkdir(self, workdir: str):
self.workdir = workdir
@@ -23,17 +17,44 @@ 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)
shutil.move(self.pkgfile + _archive_suffix, self.pkgfile)
subprocess.run(
[
"tar", "cpf", f"{self.pkgfile}.tar",
"-C", self.workdir,
"--numeric-owner",
".",
],
check=True,
)
subprocess.run(["zstd", "--rm", "-f", f"{self.pkgfile}.tar", "-o", self.pkgfile], check=True)
def makedir(self, name: str):
os.mkdir(f"{self.workdir}/bundle/{name}")
def makedirs(self, name: str):
os.makedirs(f"{self.workdir}/bundle/{name}", exist_ok=True)
def addfile(self, src: str, dst: str):
shutil.copy2(src, f"{self.workdir}/bundle/{dst}", follow_symlinks=False)
def add_dir(self, src: str, dst: str, merge: bool = False):
shutil.copytree(src, f"{self.workdir}/bundle/{dst}", dirs_exist_ok=merge)
target = f"{self.workdir}/bundle/{dst}"
if not os.path.exists(src):
raise FileNotFoundError(f"Source directory not found: {src}")
os.makedirs(os.path.dirname(target), exist_ok=True)
if merge and os.path.exists(target) and os.path.isdir(target):
cmd = ["cp", "-a", f"{src}/.", target]
else:
cmd = ["cp", "-a", src, target]
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode != 0:
raise RuntimeError(f"cp command failed: {result.stderr}")
+62
View File
@@ -0,0 +1,62 @@
import os
import shutil
import subprocess
from . import make, arch
PY3_VERSION = "3.14"
def build():
subprocess.run(["python3", "-m", "build", "."], check=True)
def install():
if os.path.exists("../pyinstall"):
shutil.rmtree("../pyinstall")
for i in os.listdir("dist"):
if not i.endswith(".whl"):
continue
subprocess.run(["python3", "-m", "installer", f"--destdir=../pyinstall", f"dist/{i}"], check=True)
os.chdir("../pyinstall")
while len(os.listdir(".")) == 1:
os.chdir(os.listdir(".")[0])
def version(s: str):
make.version(f"{s}+python{PY3_VERSION}")
def _depcommon(s: str):
if s == "python":
return f"python (~{PY3_VERSION}.0) @{arch.get_target()}"
elif ".py" in s:
if ")" in s:
return s.replace(")", f", +python{PY3_VERSION})")
else:
return s.replace(".py", f" (+python{PY3_VERSION})")
else:
return None
def builddep(s: str):
if s == "$shortcut":
builddep("python")
builddep("build.py")
builddep("installer.py")
elif _depcommon(s):
make.builddep(_depcommon(s))
else:
raise RuntimeError("unrecognized python dep")
def dep(s: str):
if _depcommon(s):
make.dep(_depcommon(s))
else:
raise RuntimeError("unrecognized python dep")
def _auto_pack(composer):
base = f"lib/python{PY3_VERSION}/site-packages"
composer.makedirs(base)
for i in os.listdir("."):
composer.add_dir(i, f"{base}/{i}")
def use_auto_pack():
make.on_pack(_auto_pack)
+6 -3
View File
@@ -22,6 +22,10 @@ def build(rem: list[str] = []):
subprocess.run(cmdline)
def artifacts_dir():
return f"target/{_rust_triple(arch.get_target())}/release"
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
pc.makedir(dstdir)
with os.scandir(srcdir) as entries:
@@ -49,11 +53,10 @@ def _autopack_filter_bin(ent) -> bool:
def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):
target_dir = f"target/{_rust_triple(arch.get_target())}/release"
if "lib" in profiles:
_do_auto_pack(pc, target_dir, "lib", _autopack_filter_lib)
_do_auto_pack(pc, artifacts_dir(), "lib", _autopack_filter_lib)
if "bin" in profiles:
_do_auto_pack(pc, target_dir, "bin", _autopack_filter_bin)
_do_auto_pack(pc, artifacts_dir(), "bin", _autopack_filter_bin)
def use_auto_pack(profiles: list[str]):
+39
View File
@@ -30,6 +30,45 @@ def download(url, output):
last_percent = percent
try:
if url.startswith("file://"):
file_path = url[7:]
if not os.path.exists(file_path):
raise Exception("File not found: " + file_path)
total_size = os.path.getsize(file_path)
if total_size <= 0:
print("Copying...")
with open(file_path, "rb") as src, open(output, "wb") as dst:
while True:
chunk = src.read(8192)
if not chunk:
break
dst.write(chunk)
print("Download completed: " + output)
return output
sys.stdout.write("downloading... 0%")
sys.stdout.flush()
with open(file_path, "rb") as src, open(output, "wb") as dst:
downloaded = 0
block_size = 8192
while True:
chunk = src.read(block_size)
if not chunk:
break
dst.write(chunk)
downloaded += len(chunk)
percent = int(downloaded * 100 / total_size)
report_progress(percent)
if last_percent != 100:
report_progress(100)
sys.stdout.write("\n")
print("Download completed: " + output)
return output
req = urllib.request.Request(url, method="GET")
req.add_header(
"User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
+9
View File
@@ -0,0 +1,9 @@
{
"os_name": "\u001b[36;4mSemiOS\u001b[0m",
"config_dir": "/var/config/airup",
"service_dir": "/share/airup/services",
"milestone_dir": "/share/airup/milestones",
"runtime_dir": "/run/airup",
"env_vars": {},
"early_cmds": []
}
+34
View File
@@ -0,0 +1,34 @@
import os
import shutil
from lib import rust
from lib.make import *
version("0.10.9")
description("Modern, portable and fast implementation of service supervisor and the init daemon.")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/sisungo/airup/archive/refs/tags/v0.10.9.tar.gz")
builddep("shortcut/rust")
def build():
shutil.copy2("../../build_manifest.json", "build_manifest.json")
rust.build()
on_build(build)
def pack_airup(composer):
os.chdir(rust.artifacts_dir())
composer.makedir("bin")
composer.makedir("libexec")
composer.addfile("airup", "bin/airup")
composer.addfile("airupd", "bin/airupd")
composer.addfile("airup-fallback-logger", "libexec/airup-fallback-logger")
package("airup")
on_pack(pack_airup)
dep("semi-libc @same-arch")
+55
View File
@@ -0,0 +1,55 @@
from lib import arch, cpp
from lib.make import *
upstream_version = "1.2.16.1"
version(upstream_version)
description("audio and MIDI functionality for the Linux operating system")
maintainer("sisungo <[email protected]>")
source_url("https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.16.1.tar.bz2")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"linux-dev @{arch.get_target()}")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('alsa-lib')}/lib",
f"--includedir={get_prefix('alsa-lib-dev')}/include",
"--enable-symbolic-functions",
f"--with-configdir={get_prefix('alsa-lib')}/share/alsa",
f"--with-plugindir=/lib/{arch.get_target()}/alsa/plugins",
]
)
cpp.make()
cpp.make_install()
on_build(build)
def pack_alsa_lib(composer):
composer.makedir("lib")
for i in [
"libasound.so",
"libasound.so.2",
"libasound.so.2.0.0",
"libatopology.so",
"libatopology.so.2",
"libatopology.so.2.0.0",
]:
composer.addfile(f"lib/{i}", f"lib/{i}")
composer.makedir("share")
composer.add_dir("share/alsa", "share/alsa")
package("alsa-lib")
dep("semi-libc @same-arch")
on_pack(pack_alsa_lib)
package("alsa-lib-dev")
dep("alsa-lib (same)")
cpp.use_auto_pack(["dev"])
+37
View File
@@ -0,0 +1,37 @@
from lib.make import *
from lib import cpp
version("1.2.16")
description("audio and MIDI functionality for the Linux operating system")
maintainer("sisungo <[email protected]>")
source_url("https://www.alsa-project.org/files/pub/utils/alsa-utils-1.2.16.tar.bz2")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("pkgconf")
builddep(f"libncurses-dev @{arch.get_target()}")
builddep(f"alsa-lib-dev @{arch.get_target()}")
builddep(f"libintl-dev @{arch.get_target()}")
builddep("gettext")
def build():
cpp.configure([f"--prefix={get_prefix('alsa-utils')}", "--disable-nls"])
cpp.make()
cpp.make_install()
on_build(build)
def pack_alsa_utils(composer):
composer.add_dir("bin", "bin")
composer.add_dir("sbin", "bin", merge=True)
composer.add_dir("lib", "lib")
composer.makedir("share")
composer.add_dir("share/alsa", "share/alsa")
composer.add_dir("share/sounds", "share/sounds")
package("alsa-utils")
dep("semi-libc @same-arch")
dep("alsa-lib @same-arch")
dep("libncurses @same-arch")
on_pack(pack_alsa_utils)
+30
View File
@@ -0,0 +1,30 @@
import os
from lib import cpp
from lib.make import *
version("2026.4.26")
description("The One True Awk programming language")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/onetrueawk/awk/archive/refs/tags/20260426.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("bison")
def build():
cpp.make()
on_build(build)
def pack(composer):
composer.makedir("bin")
composer.addfile("a.out", "bin/awk")
package("awk")
dep("semi-libc @same-arch")
on_pack(pack)
@@ -0,0 +1,11 @@
--- a/crypto/x509/x509_def.c
+++ b/crypto/x509/x509_def.c
@@ -5,7 +5,7 @@
// TODO(fork): cleanup
-#define OPENSSLDIR "/etc/ssl"
+#define OPENSSLDIR "/var/config/ssl"
#define X509_CERT_AREA OPENSSLDIR
#define X509_CERT_DIR OPENSSLDIR "/certs"
+68
View File
@@ -0,0 +1,68 @@
import os
import lib.cpp as cpp
from lib.make import *
version("5.1.0")
description("a general-purpose cryptographic library maintained by the AWS Cryptography team")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/aws/aws-lc/archive/refs/tags/v5.1.0.tar.gz")
builddep("shortcut/c")
def _fix_pc(name, prefix):
filepath = f"lib/pkgconfig/{name}.pc"
with open(filepath, "r") as f:
content = f.read()
new_content = content.replace("prefix=/", f"prefix={prefix}").replace("libdir=${prefix}/usr/lib", "libdir=${prefix}/lib")
with open(filepath, "w") as f:
f.write(new_content)
def build():
cpp.cmake(
[
"-DBUILD_SHARED_LIBS=1",
"-DCMAKE_INSTALL_PREFIX=/",
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('aws-lc-dev')}/include",
]
)
cpp.ninja()
cpp.ninja_install()
_fix_pc("libssl", get_prefix("aws-lc-libssl"))
_fix_pc("libcrypto", get_prefix("aws-lc-libcrypto"))
on_build(build)
def pack_libcrypto(composer):
composer.makedir("lib")
composer.addfile("lib/libcrypto.so", "lib/libcrypto.so")
def pack_libssl(composer):
composer.makedir("lib")
composer.addfile("lib/libssl.so", "lib/libssl.so")
package("aws-lc-libcrypto")
on_pack(pack_libcrypto)
dep("semi-libc @same-arch")
provide("libcrypto@same-arch")
package("aws-lc-libssl")
on_pack(pack_libssl)
dep("aws-lc-libcrypto (same)")
provide("libssl@same-arch")
package("aws-lc-tools")
cpp.use_auto_pack(["bin"])
dep("aws-lc-libcrypto (same)")
dep("aws-lc-libssl (same)")
dep("libcxx @same-arch")
package("aws-lc-dev")
cpp.use_auto_pack(["dev"])
dep("aws-lc-libcrypto (same)")
dep("aws-lc-libssl (same)")
provide("libcrypto-dev@same-arch")
provide("libssl-dev@same-arch")
+85
View File
@@ -0,0 +1,85 @@
import os
from lib.make import *
from lib import cpp
version("5.3")
description("the Bourne Again SHell")
maintainer("sisungo <[email protected]>")
source_url("https://ftp.gnu.org/gnu/bash/bash-5.3.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"libncurses-dev @{arch.get_target()}")
def build():
cpp.configure([
f"--prefix={get_prefix('bash')}",
f"--datarootdir={get_prefix('bash-doc')}/share",
f"--localedir={get_prefix('bash')}/share/locale",
"--enable-alias",
"--enable-alt-array-implementation",
"--enable-arith-for-command",
"--enable-array-variables",
"--enable-bang-history",
"--enable-brace-expansion",
"--enable-casemod-attributes",
"--enable-casemod-expansions",
"--enable-command-timing",
"--enable-cond-command",
"--enable-cond-regexp",
"--enable-coprocesses",
"--enable-directory-stack",
"--enable-dparen-arithmetic",
"--enable-extended-glob",
"--enable-function-import",
"--enable-glob-asciiranges-default",
"--enable-help-builtin",
"--enable-history",
"--enable-job-control",
"--enable-multibyte",
"--enable-net-redirections",
"--enable-process-substitution",
"--enable-progcomp",
"--enable-prompt-string-decoding",
"--enable-readline",
"--enable-restricted",
"--enable-select",
"--enable-separate-helpfiles",
"--enable-single-help-strings",
"--enable-translatable-strings",
"--without-bash-malloc",
])
cpp.make()
cpp.make_install()
on_build(build)
def pack_bash(composer):
composer.add_dir("bin", "bin")
composer.makedir("lib")
composer.add_dir("lib/bash", "lib/bash")
os.remove(f"{composer.workdir}/bundle/lib/bash/loadables.h")
os.remove(f"{composer.workdir}/bundle/lib/bash/Makefile.inc")
os.remove(f"{composer.workdir}/bundle/lib/bash/Makefile.sample")
composer.makedir("share")
composer.add_dir("share/locale", "share/locale")
def pack_doc(composer):
composer.makedir("share")
composer.add_dir("share/bash", "share/bash")
composer.add_dir("share/doc", "share/doc")
composer.add_dir("share/info", "share/info")
composer.add_dir("share/man", "share/man")
package("bash")
dep("semi-libc @same-arch")
dep("libncurses @same-arch")
on_pack(pack_bash)
package("bash-dev")
dep("bash (same)")
cpp.use_auto_pack(["dev"])
package("bash-doc")
on_pack(pack_doc)
+34
View File
@@ -0,0 +1,34 @@
from lib import arch, cpp
from lib.make import *
version("7.0.3")
description("An implementation of the POSIX bc calculator with GNU extensions and dc")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/gavinhoward/bc/releases/download/7.0.3/bc-7.0.3.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
predefined_build_type = "GDH"
if "-linux" in arch.get_target():
predefined_build_type = "GNU"
cpp.configure(
[
"--disable-nls",
"--opt=3",
f"--predefined-build-type={predefined_build_type}",
f"--prefix={get_prefix('bc')}",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("bc")
dep("semi-libc @same-arch")
provide("dc")
cpp.use_auto_pack(["bin"])
+38
View File
@@ -0,0 +1,38 @@
from lib import cpp
from lib.make import *
version("3.7.91")
description("a general-purpose parser generator that converts an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables")
maintainer("sisungo <[email protected]>")
source_url("https://alpha.gnu.org/gnu/bison/bison-3.7.91.tar.xz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("gnu-m4")
block_hook("autolink")
def build():
cpp.configure(["--enable-relocatable"])
cpp.make()
cpp.make_install()
on_build(build)
def pack_bison(composer):
composer.add_dir("bin", "bin")
composer.add_dir("lib", "lib")
composer.makedir("share")
composer.add_dir("share/aclocal", "share/aclocal")
composer.add_dir("share/bison", "share/bison")
package("bison")
dep("semi-libc @same-arch")
dep("gnu-m4")
on_pack(pack_bison)
link("bin/bison", "/bin/bison")
link("bin/yacc", "/bin/yacc", default=False)
@@ -0,0 +1,44 @@
--- a/unit-tests/Makefile
+++ b/unit-tests/Makefile
@@ -62,7 +62,6 @@
TESTS+= cmd-errors
TESTS+= cmd-errors-jobs
TESTS+= cmd-errors-lint
-TESTS+= cmd-interrupt
TESTS+= cmdline
TESTS+= cmdline-redirect-stdin
TESTS+= cmdline-undefined
@@ -139,7 +138,6 @@
TESTS+= deptgt-begin-fail
TESTS+= deptgt-begin-fail-indirect
TESTS+= deptgt-default
-TESTS+= deptgt-delete_on_error
TESTS+= deptgt-end
TESTS+= deptgt-end-fail
TESTS+= deptgt-end-fail-all
@@ -147,7 +145,6 @@
TESTS+= deptgt-end-jobs
TESTS+= deptgt-error
TESTS+= deptgt-ignore
-TESTS+= deptgt-interrupt
TESTS+= deptgt-main
TESTS+= deptgt-makeflags
TESTS+= deptgt-no_parallel
@@ -511,8 +508,6 @@
.if ${.MAKE.OS:NIRIX*} == ""
BROKEN_TESTS+= \
- cmd-interrupt \
- deptgt-interrupt \
job-output-null \
opt-chdir \
opt-debug-x-trace \
@@ -538,7 +533,6 @@
BROKEN_TESTS+= job-output-null
.else
BROKEN_TESTS+= \
- cmd-interrupt \
job-flags \
.endif
+41
View File
@@ -0,0 +1,41 @@
import os
from lib import cpp
from lib.make import *
VERSION = "2026.6.19"
version(VERSION)
description("The BSD make utility ported to non-BSD systems")
maintainer("sisungo <[email protected]>")
source_url("https://www.crufty.net/ftp/pub/sjg/bmake-20260619.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("bc")
def build():
cpp.configure(
[
"--prefix=/",
f"--with-default-sys-path=/pkg/bmake={VERSION}@{arch.get_target()}/share/mk",
]
)
cpp.make()
cpp.make_install()
on_build(build)
def pack_bmake(composer):
composer.makedir("bin")
composer.addfile("bin/bmake", "bin/bmake")
composer.makedir("share")
composer.add_dir("share/mk", "share/mk")
package("bmake")
dep("semi-libc @same-arch")
on_pack(pack_bmake)
+30
View File
@@ -0,0 +1,30 @@
import os
from lib import cpp
from lib.make import *
version("1.2.0")
description("Brotli compression format")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz")
def build():
cpp.cmake()
cpp.ninja()
cpp.ninja_install()
on_build(build)
package("libbrotli")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("brotli")
dep("libbrotli (same)")
cpp.use_auto_pack(["bin"])
package("libbrotli-dev")
dep("libbrotli (same)")
cpp.use_auto_pack(["dev"])
+24
View File
@@ -0,0 +1,24 @@
from lib.make import *
from lib import python
python.version("1.5.0")
description("A simple, correct Python build frontend")
maintainer("sisungo <[email protected]>")
source_url("https://files.pythonhosted.org/packages/78/e0/df5e171f685f82f37b12e1f208064e24244911079d7b767447d1af7e0d70/build-1.5.0.tar.gz")
python.builddep("$shortcut")
python.builddep("packaging.py (>=25.0)")
def build():
python.build()
python.install()
on_build(build)
package("build.py")
python.dep("python")
python.dep("packaging.py (>=25.0)")
python.use_auto_pack()
+27
View File
@@ -0,0 +1,27 @@
import os
from lib import cpp
from lib.make import *
version("2.0")
description("Berkeley yacc")
maintainer("sisungo <[email protected]>")
source_url("https://www.invisible-island.net/archives/byacc/byacc-2.0.tgz")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.configure([f"--prefix={get_prefix('byacc')}", "--enable-btyacc"])
cpp.make()
cpp.make_install()
os.rename("bin/yacc", "bin/byacc")
on_build(build)
package("byacc")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["bin", "lib", "dev"])
link("bin/byacc", "/bin/yacc")
+50
View File
@@ -0,0 +1,50 @@
import os
import shutil
import lib.cpp as cpp
from lib.make import *
upstream_version = "1.0.8"
builddep("shortcut/c")
builddep("shortcut/autotools")
version(f"{upstream_version}")
description("a freely available, patent free, high-quality data compressor")
maintainer("sisungo <[email protected]>")
source_url(f"https://sourceware.org/pub/bzip2/bzip2-{upstream_version}.tar.gz")
def build():
makevars = [f"CC={os.environ.get('CC', 'cc')}"]
cpp.make(["-f", "Makefile-libbz2_so"] + makevars)
try:
shutil.rmtree("../cpp_install")
except Exception:
pass
cpp.make_install(["PREFIX=../cpp_install"] + makevars, chdir=False)
shutil.copy2(
f"libbz2.so.{upstream_version}",
f"../cpp_install/lib/libbz2.so.{upstream_version}",
)
os.symlink(f"libbz2.so.{upstream_version}", "../cpp_install/lib/libbz2.so.1.0")
os.symlink(f"libbz2.so.{upstream_version}", "../cpp_install/lib/libbz2.so.1")
os.symlink(f"libbz2.so.{upstream_version}", "../cpp_install/lib/libbz2.so")
os.chdir("../cpp_install")
on_build(build)
package("libbzip2")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("bzip2")
cpp.use_auto_pack(["bin"])
dep("libbzip2 (same)")
dep("sh")
dep("coreutils")
package("libbzip2-dev")
cpp.use_auto_pack(["dev"])
dep("libbzip2 (same)")
+35
View File
@@ -0,0 +1,35 @@
from lib import cpp
from lib.make import *
version("1.34.6")
description("A C library for asynchronous DNS requests")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/c-ares/c-ares/releases/download/v1.34.6/c-ares-1.34.6.tar.gz"
)
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libcares')}/lib",
f"--includedir={get_prefix('libcares-dev')}/include",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("libcares")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("libcares-dev")
dep("libcares (same)")
cpp.use_auto_pack(["dev"])
+30
View File
@@ -0,0 +1,30 @@
import os
from lib.make import *
version("2026.7.4")
description("SemiOS system-level trusted CA database")
maintainer("sisungo <[email protected]>")
source_url(
"https://gitea.semilabs.org/semios/ca-certificates/releases/download/v2026.07.04/ca-certificates-2026.07.04.tar"
)
block_hook("autolink")
def build():
for i in os.listdir("."):
link(f"share/ca-certificates/{i}", f"/share/ca-certificates/{i}")
on_build(build)
def pack(composer):
composer.makedir("share")
composer.add_dir(".", "share/ca-certificates")
package("ca-certificates")
arch_any()
on_pack(pack)
+33
View File
@@ -0,0 +1,33 @@
from lib.make import *
from lib import rust
version("0.98.0")
description("The Rust package manager")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/rust-lang/cargo/archive/refs/tags/0.98.0.tar.gz")
builddep("shortcut/c")
builddep("cargo")
builddep("rust")
builddep(f"aws-lc-dev @{arch.get_target()}")
builddep(f"pkgconf @{arch.get_target()}")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep(f"libcurl-dev @{arch.get_target()}")
builddep(f"libgit2-dev @{arch.get_target()}")
builddep(f"libssh2-dev @{arch.get_target()}")
def build():
rust.build()
on_build(build)
package("cargo")
dep("libssl @same-arch")
dep("libcrypto @same-arch")
dep("libz @same-arch")
dep("semi-libc @same-arch")
recommend("rust")
rust.use_auto_pack(["bin"])
+20
View File
@@ -0,0 +1,20 @@
from lib import rust
from lib.make import *
version("0.1.0")
description("SemiOS certification utility")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/certutil/archive/v0.1.0.tar.gz")
builddep("shortcut/rust")
def build():
rust.build()
on_build(build)
package("certutil")
dep("semi-libc @same-arch")
rust.use_auto_pack(["bin"])
+69
View File
@@ -0,0 +1,69 @@
import subprocess
import os
from lib import cpp, arch
from lib.make import *
upstream_version = "4.3.4"
[upstream_major, upstream_minor, upstream_rev] = upstream_version.split(".")
version(upstream_version)
description("a cross-platform, open-source build system generator")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/Kitware/CMake/releases/download/v4.3.4/cmake-4.3.4.tar.gz"
)
builddep("shortcut/c++")
builddep("shortcut/autotools")
builddep("shortcut/cmake")
builddep(f"libcurl-dev @{arch.get_target()}")
builddep(f"aws-lc-dev @{arch.get_target()}")
builddep(f"libcurl-dev @{arch.get_target()}")
builddep(f"libexpat-dev @{arch.get_target()}")
builddep(f"libz-dev @{arch.get_target()}")
builddep(f"libbzip2-dev @{arch.get_target()}")
builddep(f"liblzma-dev @{arch.get_target()}")
builddep(f"libzstd-dev @{arch.get_target()}")
builddep(f"libnghttp2-dev @{arch.get_target()}")
builddep(f"librhash-dev @{arch.get_target()}")
builddep(f"libarchive-dev @{arch.get_target()}")
builddep(f"linux-dev @{arch.get_target()}")
def build():
os.environ["CMAKE_PREFIX_PATH"] = f"/lib/{arch.get_target()}"
cpp.cmake([
f"-DCMAKE_INSTALL_PREFIX={get_prefix('cmake')}",
"-DCMAKE_USE_SYSTEM_CURL=ON",
"-DCMAKE_USE_SYSTEM_ZLIB=ON",
"-DCMAKE_USE_SYSTEM_ZSTD=ON",
"-DCMAKE_USE_SYSTEM_LIBRHASH=ON",
"-DCMAKE_USE_SYSTEM_LIBARCHIVE=ON",
"-DCMAKE_USE_SYSTEM_LIBLZMA=ON",
"-DCMAKE_USE_SYSTEM_EXPAT=ON",
"-DCMAKE_USE_SYSTEM_BZIP2=ON",
])
cpp.ninja()
cpp.ninja_install()
on_build(build)
def pack_cmake(composer):
composer.add_dir("bin", "bin")
composer.makedir("share")
composer.add_dir(
f"share/cmake-{upstream_major}.{upstream_minor}",
f"share/cmake-{upstream_major}.{upstream_minor}",
)
package("cmake")
dep("semi-libc @same-arch")
dep("libcxx @same-arch")
dep("libcurl @same-arch")
dep("librhash @same-arch")
dep("libz @same-arch")
dep("libarchive @same-arch")
dep("libexpat @same-arch")
on_pack(pack_cmake)
+120 -3
View File
@@ -1,16 +1,133 @@
import lib.rust as rust
from lib.make import *
version("0.9.0")
source_url("https://github.com/uutils/coreutils/archive/refs/tags/0.9.0.tar.gz")
version("0.10.0")
description("system core utilities")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/uutils/coreutils/archive/refs/tags/0.10.0.tar.gz")
block_hook("autolink")
builddep("shortcut/rust")
def build():
rust.build()
rust.build(["--features", "unix"])
on_build(build)
functions = [
"[",
"arch",
"b2sum",
"base32",
"base64",
"basename",
"basenc",
"cat",
"chgrp",
"chmod",
"chown",
"chroot",
"cksum",
"comm",
"cp",
"csplit",
"cut",
"date",
"dd",
"df",
"dir",
"dircolors",
"dirname",
"du",
"echo",
"env",
"expand",
"expr",
"factor",
"false",
"fmt",
"fold",
"groups",
"head",
"hostid",
"hostname",
"id",
"install",
"join",
"kill",
"link",
"ln",
"logname",
"ls",
"md5sum",
"mkdir",
"mkfifo",
"mknod",
"mktemp",
"more",
"mv",
"nice",
"nl",
"nohup",
"nproc",
"numfmt",
"od",
"paste",
"pathchk",
"pinky",
"pr",
"printenv",
"printf",
"ptx",
"pwd",
"readlink",
"realpath",
"rm",
"rmdir",
"seq",
"sha1sum",
"sha224sum",
"sha256sum",
"sha384sum",
"sha512sum",
"shred",
"shuf",
"sleep",
"sort",
"split",
"stat",
"stdbuf",
"stty",
"sum",
"sync",
"tac",
"tail",
"tee",
"test",
"timeout",
"touch",
"tr",
"true",
"truncate",
"tsort",
"tty",
"uname",
"unexpand",
"uniq",
"unlink",
"uptime",
"users",
"vdir",
"wc",
"who",
"whoami",
"yes",
]
package("coreutils")
for func in functions:
link(f"bin/coreutils", f"/bin/{func}")
rust.use_auto_pack(["bin"])
dep("semi-libc @same-arch")
+104
View File
@@ -0,0 +1,104 @@
from lib import cpp, arch
from lib.make import *
version("8.21.0")
description("command line tool and library for transferring data with URLs")
maintainer("sisungo <[email protected]>")
source_url("https://curl.se/download/curl-8.21.0.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"libnghttp2-dev @{arch.get_target()}")
builddep(f"libcares-dev @{arch.get_target()}")
builddep(f"aws-lc-dev @{arch.get_target()}")
builddep(f"libbrotli-dev @{arch.get_target()}")
builddep(f"libz-dev @{arch.get_target()}")
builddep(f"libzstd-dev @{arch.get_target()}")
builddep(f"libpsl-dev @{arch.get_target()}")
def build():
cpp.configure(
[
"--prefix=/",
f"--bindir={get_prefix('curl')}/bin",
f"--libdir={get_prefix('libcurl')}/lib",
f"--includedir={get_prefix('libcurl-dev')}/include",
"--enable-optimize",
"--disable-debug",
"--enable-warnings",
"--enable-symbol-hiding",
"--enable-ares",
"--enable-http",
"--enable-ftp",
"--enable-file",
"--enable-ipfs",
"--disable-ldap",
"--disable-ldaps",
"--enable-rtsp",
"--enable-proxy",
"--enable-dict",
"--enable-telnet",
"--enable-tftp",
"--enable-pop3",
"--enable-imap",
"--enable-smb",
"--enable-smtp",
"--enable-gopher",
"--enable-mqtt",
"--disable-init-mem-debug",
"--enable-manual",
"--enable-docs",
"--enable-libcurl-option",
"--enable-ipv6",
"--enable-openssl-auto-load-config",
"--enable-ca-native",
"--enable-versioned-symbols",
"--enable-typecheck",
"--enable-verbose",
"--disable-tls-srp",
"--enable-unix-sockets",
"--enable-cookies",
"--enable-socketpair",
"--enable-http-auth",
"--enable-doh",
"--enable-mime",
"--enable-bindlocal",
"--enable-form-api",
"--enable-dateparse",
"--enable-netrc",
"--enable-progress-meter",
"--enable-get-easy-options",
"--enable-alt-svc",
"--enable-headers-api",
"--enable-hsts",
"--enable-websockets",
"--with-openssl",
"--with-nghttp2",
"--without-libidn2",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("libcurl")
dep("semi-libc @same-arch")
dep("libpsl @same-arch")
dep("libz @same-arch")
dep("libcares @same-arch")
dep("libnghttp2 @same-arch")
dep("libssl @same-arch")
dep("libcrypto @same-arch")
dep("libzstd @same-arch")
dep("libbrotli @same-arch")
cpp.use_auto_pack(["lib"])
package("curl")
dep("libcurl (same)")
cpp.use_auto_pack(["bin"])
package("libcurl-dev")
dep("libcurl (same)")
cpp.use_auto_pack(["dev"])
+55
View File
@@ -0,0 +1,55 @@
import os
from lib.make import *
from lib import cpp
version("1.16.2")
description("a message bus system, a simple way for applications to talk to one another")
maintainer("sisungo <[email protected]>")
source_url("https://dbus.freedesktop.org/releases/dbus/dbus-1.16.2.tar.xz")
builddep("shortcut/c")
builddep("shortcut/meson")
builddep("gettext")
builddep(f"libintl-dev @{arch.get_target()}")
builddep(f"glib-dev @{arch.get_target()}")
builddep("pkgconf")
def build():
cpp.meson_setup([
"-Dapparmor=disabled",
"-Dmessage_bus=false",
"-Druntime_dir=/run",
"-Dsystemd=disabled",
"--prefix=/",
f"--libdir={get_prefix('libdbus')}/lib",
f"--bindir={get_prefix('dbus-tools')}/bin",
f"--includedir={get_prefix('libdbus-dev')}/include",
"--sysconfdir=/var/config",
"--localstatedir=/var/db/dbus",
])
cpp.meson_compile()
cpp.meson_install()
on_build(build)
def pack_libdbus(composer):
composer.makedir("lib")
for i in os.listdir("lib"):
if not ".so" in i:
continue
composer.addfile(f"lib/{i}", f"lib/{i}")
os.symlink(f"{get_prefix('libdbus-dev')}/lib/dbus-1.0", f"{composer.workdir}/bundle/lib/dbus-1.0")
package("libdbus")
dep("semi-libc @same-arch")
on_pack(pack_libdbus)
package("dbus-tools")
dep("libdbus (same)")
cpp.use_auto_pack(["bin"])
package("libdbus-dev")
dep("libdbus (same)")
cpp.use_auto_pack(["dev"])
+24
View File
@@ -0,0 +1,24 @@
import lib.rust as rust
from lib.make import *
version("0.5.0")
description("utility to compute difference between text files")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/uutils/diffutils/archive/refs/tags/v0.5.0.tar.gz")
builddep("shortcut/rust")
block_hook("autolink")
def build():
rust.build()
on_build(build)
package("diffutils")
rust.use_auto_pack(["bin"])
link("bin/diffutils", "/bin/cmp")
link("bin/diffutils", "/bin/diff")
dep("semi-libc @same-arch")
+32
View File
@@ -0,0 +1,32 @@
import os
import lib.cpp as cpp
from lib.make import *
version("2.8.1")
description("Fast streaming XML parser written in C99")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/libexpat/libexpat/releases/download/R_2_8_1/expat-2.8.1.tar.gz"
)
def build():
cpp.cmake()
cpp.ninja()
cpp.ninja_install()
on_build(build)
package("libexpat")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("libexpat-tools")
cpp.use_auto_pack(["bin"])
dep("libexpat (same)")
package("libexpat-dev")
cpp.use_auto_pack(["dev"])
dep("libexpat (same)")
+56
View File
@@ -0,0 +1,56 @@
import subprocess
from lib import arch, cpp
from lib.make import *
VERSION = "5.48"
version(VERSION)
description("utility to infer file type and information")
maintainer("sisungo <[email protected]>")
source_git("https://github.com/file/file.git", "FILE5_48")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"libz-dev @{arch.get_target()}")
builddep(f"libzstd-dev @{arch.get_target()}")
builddep(f"liblzma-dev @{arch.get_target()}")
builddep(f"libbzip2-dev @{arch.get_target()}")
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")
dep("libz @same-arch")
dep("libzstd @same-arch")
dep("liblzma @same-arch")
dep("libbzip2 @same-arch")
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"])
+21
View File
@@ -0,0 +1,21 @@
import lib.rust as rust
from lib.make import *
version("0.10.0")
description("implementation of the UNIX findutils")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/uutils/findutils/archive/refs/tags/0.10.0.tar.gz")
builddep("shortcut/rust")
def build():
rust.build()
on_build(build)
package("findutils")
rust.use_auto_pack(["bin"])
dep("semi-libc @same-arch")
+29
View File
@@ -0,0 +1,29 @@
from lib import cpp
from lib.make import *
version("2.6.4")
description("The Fast Lexical Analyzer - scanner generator for lexing in C and C++")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("m4")
def build():
cpp.configure(
[
f"--prefix={get_prefix('flex')}",
"--disable-nls",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("flex")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["bin", "lib", "dev"])
+40
View File
@@ -0,0 +1,40 @@
from lib import arch, cpp
from lib.make import *
version("2.14.3")
description("a freely available software library to render fonts")
maintainer("sisungo <[email protected]>")
source_url("https://download.savannah.gnu.org/releases/freetype/freetype-2.14.3.tar.xz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("pkgconf")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep(f"libbzip2-dev @{arch.get_target()}")
builddep(f"libpng-dev @{arch.get_target()}")
builddep(f"libbrotli-dev @{arch.get_target()}")
def build():
cpp.configure()
cpp.make()
cpp.make_install()
on_build(build)
package("libfreetype")
dep("libz @same-arch")
dep("libpng @same-arch")
dep("libbzip2 @same-arch")
dep("libbrotli @same-arch")
cpp.use_auto_pack(["lib"])
package("libfreetype-dev")
dep("libfreetype (same)")
dep("libz-dev @same-arch")
dep("libpng-dev @same-arch")
dep("libbzip2-dev @same-arch")
dep("libbrotli-dev @same-arch")
cpp.use_auto_pack(["dev"])
+33
View File
@@ -0,0 +1,33 @@
import os
from lib import cpp
from lib.make import *
version("0.3.3")
description("small implementation of gettext and libintl")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/sabotage-linux/gettext-tiny/releases/download/v0.3.3/gettext-tiny-0.3.3.tar.xz"
)
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.make(["LIBINTL=musl"])
cpp.make_install(
["LIBINTL=musl", "DESTDIR=../cpp_install", "prefix=/"], chdir=False, move=False
)
os.chdir("../cpp_install")
on_build(build)
package("libintl-dev")
dep("semi-libc-dev @same-arch")
cpp.use_auto_pack(["dev"])
package("gettext")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["bin"])
+48
View File
@@ -0,0 +1,48 @@
from lib import arch, cpp
from lib.make import *
version("2.55.0")
description("a free and open source distributed version control system")
maintainer("sisungo <[email protected]>")
source_url("https://www.kernel.org/pub/software/scm/git/git-2.55.0.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("rust")
builddep("cargo")
builddep(f"libintl-dev @{arch.get_target()}")
builddep(f"libz-dev @{arch.get_target()}")
builddep(f"aws-lc-dev @{arch.get_target()}")
builddep(f"linux-dev @{arch.get_target()}")
builddep("gettext")
builddep("libarchive-tools")
def build():
cpp.configure(
[
"--prefix=",
"--with-gitconfig=/var/config/git/config.ini",
"--with-gitattributes=/var/config/git/attributes.txt",
]
)
cpp.make(["RUNTIME_PREFIX=YesPlease"])
cpp.make_install()
on_build(build)
def pack_git(composer):
composer.add_dir("bin", "bin")
composer.add_dir("libexec", "libexec")
composer.makedir("share")
composer.add_dir("share/git-core", "share/git-core")
composer.add_dir("share/gitweb", "share/gitweb")
composer.add_dir("share/perl5", "share/perl5")
package("git")
dep("semi-libc @same-arch")
dep("libz @same-arch")
on_pack(pack_git)
+124
View File
@@ -0,0 +1,124 @@
import shutil
import os
from lib.make import *
from lib import cpp
upstream_version = "2.89.2"
version(upstream_version)
description("a general-purpose, portable utility library")
maintainer("sisungo <[email protected]>")
source_url("https://download.gnome.org/sources/glib/2.89/glib-2.89.2.tar.xz")
builddep("shortcut/c++")
builddep("shortcut/meson")
builddep("gettext")
builddep(f"libintl-dev @{arch.get_target()}")
builddep("pcre2-tools")
builddep(f"libpcre2-dev @{arch.get_target()}")
builddep(f"libffi-dev @{arch.get_target()}")
builddep("pkgconf")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep("libexpat")
def build():
os.environ["CFLAGS"] = os.environ.get("CFLAGS", "") + " -Wno-missing-include-dirs"
os.environ["CXXFLAGS"] = os.environ.get("CXXLAGS", "") + os.environ["CFLAGS"]
cpp.meson_setup([
"-Druntime_dir=/run",
f"-Dgio_module_dir=/lib/{arch.get_target()}/gio/modules",
"--prefix=/",
f"--bindir={get_prefix('glib-tools')}/bin",
f"--libdir={get_prefix('glib')}/lib",
f"--includedir={get_prefix('glib-dev')}/include",
f"--libexecdir={get_prefix('libglib')}/libexec",
f"--datadir={get_prefix('glib')}/share",
])
cpp.meson_compile()
cpp.meson_install()
on_build(build)
def pack_libxxx(composer, prefix):
composer.makedirs("lib")
for i in os.listdir("lib"):
if not i.startswith(prefix):
continue
composer.addfile(f"lib/{i}", f"lib/{i}")
def pack_libglib(composer):
composer.add_dir("libexec", "libexec")
pack_libxxx(composer, "libglib")
package("libglib")
dep("semi-libc @same-arch")
dep("libpcre2 @same-arch")
on_pack(pack_libglib)
package("libgobject")
dep("libglib (same)")
dep("libffi @same-arch")
on_pack(lambda composer: pack_libxxx(composer, "libgobject"))
package("libgthread")
dep("libglib (same)")
dep("semi-libc @same-arch")
on_pack(lambda composer: pack_libxxx(composer, "libgthread"))
package("libgmodule")
dep("libglib (same)")
dep("semi-libc @same-arch")
on_pack(lambda composer: pack_libxxx(composer, "libgmodule"))
package("libgio")
dep("libglib (same)")
dep("libgobject (same)")
dep("libgmodule (same)")
dep("libz @same-arch")
dep("semi-libc @same-arch")
on_pack(lambda composer: pack_libxxx(composer, "libgio"))
package("libgirepository")
dep("libglib (same)")
dep("libgobject (same)")
dep("libgmodule (same)")
dep("libffi @same-arch")
dep("semi-libc @same-arch")
on_pack(lambda composer: pack_libxxx(composer, "libgirepository"))
def pack_glib(composer):
composer.makedir("lib")
for i in os.listdir("lib"):
if not i.endswith(".so"):
continue
pkgname = i.split("-")[0]
os.symlink(f"{get_prefix(pkgname)}/lib/{i}", f"{composer.workdir}/bundle/lib/{i}")
os.symlink(f"{get_prefix('glib-dev')}/lib/glib-2.0", f"{composer.workdir}/bundle/lib/glib-2.0")
composer.add_dir("share", "share")
package("glib")
dep("libglib (same)")
dep("libgobject (same)")
dep("libgthread (same)")
dep("libgmodule (same)")
dep("libgio (same)")
dep("libgirepository (same)")
on_pack(pack_glib)
package("glib-tools")
dep("glib (same)")
cpp.use_auto_pack(["bin"])
package("glib-dev")
dep("glib (same)")
dep("libz-dev @same-arch")
dep("libpcre2-dev @same-arch")
dep("libffi-dev @same-arch")
cpp.use_auto_pack(["dev"])
+31
View File
@@ -0,0 +1,31 @@
import os
from lib import cpp, arch
from lib.make import *
version("1.4.21")
description("an implementation of the traditional Unix macro processor")
maintainer("sisungo <[email protected]>")
source_url("https://ftp.gnu.org/gnu/m4/m4-1.4.21.tar.xz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"linux-dev @{arch.get_target()}")
def build():
cpp.configure(
[f"--prefix={get_prefix('gnu-m4')}", "--enable-changeword", "--disable-nls"]
)
cpp.make()
cpp.make_install()
os.rename("bin/m4", "bin/gnu-m4")
on_build(build)
package("gnu-m4")
provide("m4")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["bin"])
link("bin/gnu-m4", "/bin/m4")
+7 -1
View File
@@ -2,11 +2,16 @@ import lib.cpp as cpp
from lib.make import *
version("4.4.1")
description("a tool which controls the generation of executables and other non-source files of a program from the program's source files")
maintainer("sisungo <[email protected]>")
source_url("https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.configure(["--prefix=/"])
cpp.configure([f"--prefix={get_prefix('gnu-make')}"])
cpp.make()
cpp.make_install()
@@ -15,3 +20,4 @@ on_build(build)
package("gnu-make")
cpp.use_auto_pack(["bin"])
dep("semi-libc @same-arch")
+38
View File
@@ -0,0 +1,38 @@
import os
from lib import cpp
from lib.make import *
version("4.10")
description("a non-interactive command-line text editor")
maintainer("sisungo <[email protected]>")
source_url("https://ftp.gnu.org/gnu/sed/sed-4.10.tar.gz")
block_hook("autolink")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.configure(
[
"--prefix=/",
f"--bindir={get_prefix('gnu-sed')}/bin",
"--disable-i18n",
"--disable-nls",
]
)
cpp.make()
cpp.make_install()
os.rename("bin/sed", "bin/gsed")
on_build(build)
package("gnu-sed")
provide("sed")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["bin"])
link("bin/gsed", "/bin/gsed")
link("bin/gsed", "/bin/sed")
+34
View File
@@ -0,0 +1,34 @@
import subprocess
from lib.make import *
version("15.1.2")
description("SemiOS file pattern searcher")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/grep/archive/v15.1.2.tar.gz")
builddep("shortcut/c")
builddep(f"libpcre2-dev @{arch.get_target()}")
builddep("pcre2-tools")
builddep(f"libbzip2-dev @{arch.get_target()}")
builddep(f"libz-ng-dev @{arch.get_target()}")
def build():
subprocess.run(["./build.sh"], check=True)
on_build(build)
def pack_grep(composer):
composer.makedir("bin")
composer.addfile("grep", "bin/grep")
package("grep")
dep("semi-libc @same-arch")
dep("libpcre2 @same-arch")
on_pack(pack_grep)
link("bin/grep", "/bin/egrep")
link("bin/grep", "/bin/fgrep")
+30
View File
@@ -0,0 +1,30 @@
from lib.make import *
from lib import cpp
version("3.5.2")
description("an interactive process viewer")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/htop-dev/htop/releases/download/3.5.2/htop-3.5.2.tar.xz")
builddep("shortcut/autotools")
builddep("shortcut/c")
builddep(f"libncurses-dev @{arch.get_target()}")
builddep(f"linux-dev @{arch.get_target()}")
def build():
cpp.configure([
f"--prefix={get_prefix('htop')}",
"--enable-unicode",
])
cpp.make()
cpp.make_install()
on_build(build)
package("htop")
dep("libncurses @same-arch")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["bin"])
+37
View File
@@ -0,0 +1,37 @@
import os
from lib import cpp
from lib.make import *
version("2026.4.22")
description("code and data that represent the history of local time for many representative locations worldwide")
maintainer("sisungo <[email protected]>")
source_url("https://data.iana.org/time-zones/releases/tzdb-2026b.tar.lz")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.make()
cpp.make_install()
on_build(build)
def pack_db(composer):
composer.makedir("share")
composer.add_dir("share/zoneinfo", "share/zoneinfo")
package("iana-timezone-db")
arch_any()
on_pack(pack_db)
package("iana-timezone-tools")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["bin"])
package("iana-timezone-dev")
cpp.use_auto_pack(["dev"])
+45
View File
@@ -0,0 +1,45 @@
import os
from lib import cpp
from lib.make import *
version("78.3")
description("a mature, widely used set of C/C++ libraries providing Unicode and Globalization support for software applications")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/unicode-org/icu/releases/download/release-78.3/icu4c-78.3-sources.tgz"
)
builddep("shortcut/c++")
builddep("shortcut/autotools")
def build():
os.chdir("source")
cpp.configure(
[
"--enable-plugins",
"--prefix=/",
f"--bindir={get_prefix('icu4c')}/bin",
f"--sbindir={get_prefix('icu4c')}/sbin",
f"--libdir={get_prefix('libicu4c')}/lib",
f"--includedir={get_prefix('libicu4c-dev')}/include",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("libicu4c")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("icu4c")
cpp.use_auto_pack(["bin"])
dep("libicu4c (same)")
package("libicu4c-dev")
cpp.use_auto_pack(["dev"])
dep("libicu4c (same)")
+22
View File
@@ -0,0 +1,22 @@
from lib.make import *
from lib import python
python.version("1.0.1")
description("A library for installing Python wheels.")
maintainer("sisungo <[email protected]>")
source_url("https://files.pythonhosted.org/packages/06/fe/b9f481cf0cc867958a21338baa900357b7b7d86cac9b025948049d77923c/installer-1.0.1.tar.gz")
python.builddep("$shortcut")
def build():
python.build()
python.install()
on_build(build)
package("installer.py")
python.dep("python")
python.use_auto_pack()
+40
View File
@@ -0,0 +1,40 @@
import os
import shutil
from lib import cpp
from lib.make import *
version("7.1.0")
description("a collection of userspace utilities for controlling and monitoring various aspects of networking in the Linux kernel")
maintainer("sisungo <[email protected]>")
source_git("https://git.kernel.org/pub/scm/network/iproute2/iproute2.git", "v7.1.0")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("git")
def build():
cpp.configure()
cpp.make()
cpp.make_install()
on_build(build)
def pack_iproute2(composer):
composer.makedirs("lib/iproute2")
composer.makedir("share")
composer.add_dir("sbin", "bin")
composer.add_dir("share/iproute2", "share/iproute2")
composer.add_dir("lib/tc", "lib/iproute2/tc")
package("iproute2")
dep("semi-libc @same-arch")
on_pack(pack_iproute2)
package("iproute2-dev")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["dev"])
+54
View File
@@ -0,0 +1,54 @@
from lib import cpp, arch
from lib.make import *
version("1.34")
description("a set of tools to handle common tasks with Linux kernel modules like insert, remove, list, check properties, resolve dependencies and aliases")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/kmod-project/kmod/archive/refs/tags/v34.tar.gz")
builddep("shortcut/c")
builddep("shortcut/meson")
builddep(f"linux-dev @{arch.get_target()}")
builddep(f"libzstd-dev @{arch.get_target()}")
builddep(f"aws-lc-dev @{arch.get_target()}")
builddep(f"liblzma-dev @{arch.get_target()}")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep("pkgconf")
def build():
cpp.meson_setup([
"-Dprefix=/",
f"-Ddistconfdir={get_prefix('libkmod')}/share",
"-Dmoduledir=/lib/lkm",
"-Dtools=true",
"-Ddlopen=all",
"-Dmanpages=false",
])
cpp.meson_compile()
cpp.meson_install()
on_build(build)
package("libkmod")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
dep("libcrypto @same-arch")
recommend("libzstd @same-arch")
recommend("libz @same-arch")
recommend("liblzma @same-arch")
package("kmod")
cpp.use_auto_pack(["bin"])
dep("libkmod (same)")
link("bin/kmod", "/bin/depmod")
link("bin/kmod", "/bin/insmod")
link("bin/kmod", "/bin/lsmod")
link("bin/kmod", "/bin/modinfo")
link("bin/kmod", "/bin/modprobe")
link("bin/kmod", "/bin/rmmod")
package("libkmod-dev")
cpp.use_auto_pack(["dev"])
dep("libkmod (same)")
+25
View File
@@ -0,0 +1,25 @@
from lib import arch, cpp
from lib.make import *
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"libncurses-dev @{arch.get_target()}")
version("704")
description("a free, open-source file pager")
maintainer("sisungo <[email protected]>")
source_url("https://www.greenwoodsoftware.com/less/less-704.tar.gz")
def build():
cpp.configure([f"--prefix={get_prefix('less')}", "--with-regex=posix"])
cpp.make()
cpp.make_install()
on_build(build)
package("less")
dep("semi-libc @same-arch")
dep("libncurses @same-arch")
cpp.use_auto_pack(["bin"])
+56
View File
@@ -0,0 +1,56 @@
import lib.cpp as cpp
from lib.make import *
version("3.8.9")
description("Multi-format archive and compression library")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/libarchive/libarchive/releases/download/v3.8.9/libarchive-3.8.9.tar.gz"
)
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"aws-lc-dev @{arch.get_target()}")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep(f"libzstd-dev @{arch.get_target()}")
builddep(f"libbzip2-dev @{arch.get_target()}")
builddep(f"liblzma-dev @{arch.get_target()}")
def build():
cpp.configure(
[
"--prefix=/",
f"--bindir={get_prefix('libarchive-tools')}/bin",
f"--libdir={get_prefix('libarchive')}/lib",
f"--includedir={get_prefix('libarchive-dev')}/include",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("libarchive")
cpp.use_auto_pack(["lib"])
dep("libcrypto@same-arch")
dep("libzstd @same-arch")
dep("libz @same-arch")
dep("liblzma @same-arch")
dep("semi-libc @same-arch")
dep("libzstd @same-arch")
package("libarchive-tools")
cpp.use_auto_pack(["bin"])
dep("libarchive (same)")
provide("tar")
provide("cpio")
provide("unzip")
link("bin/bsdtar", "/bin/tar")
link("bin/bsdcpio", "/bin/cpio")
link("bin/bsdunzip", "/bin/unzip")
package("libarchive-dev")
cpp.use_auto_pack(["dev"])
dep("libarchive (same)")
+38
View File
@@ -0,0 +1,38 @@
from lib import arch, cpp
from lib.make import *
version("3.7.1")
description("A portable foreign-function interface library")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/libffi/libffi/releases/download/v3.7.1/libffi-3.7.1.tar.gz"
)
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"linux-dev @{arch.get_target()}")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libffi')}/lib",
f"--includedir={get_prefix('libffi-dev')}/include",
"--enable-portable-binary",
"--disable-multi-os-directory",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("libffi")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("libffi-dev")
dep("libffi (same)")
cpp.use_auto_pack(["dev"])
+33
View File
@@ -0,0 +1,33 @@
import os
import subprocess
from lib import arch
from lib.make import *
version("0.2.0")
description("provides compatibility objects to gcc runtime libraries")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/libgcc-compat/archive/v0.2.0.tar.gz")
builddep("shortcut/c")
builddep(f"libunwind-dev @{arch.get_target()}")
builddep(f"linux-dev @{arch.get_target()}")
def build():
subprocess.run(["./build.sh"], check=True)
on_build(build)
def pack(composer):
composer.makedir("lib")
composer.addfile("libgcc_s.so.1", "lib/libgcc_s.so.1")
composer.addfile("libatomic.so.1", "lib/libatomic.so.1")
package("libgcc-compat")
dep("semi-libc @same-arch")
dep("libunwind @same-arch")
on_pack(pack)
+33
View File
@@ -0,0 +1,33 @@
from lib import cpp
from lib.make import *
version("1.6.1")
description("a totally open, royalty-free, highly versatile audio codec")
maintainer("sisungo <[email protected]>")
source_url("https://downloads.xiph.org/releases/opus/opus-1.6.1.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libopus')}/lib",
f"--includedir={get_prefix('libopus-dev')}/include",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("libopus")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("libopus-dev")
dep("libopus (same)")
cpp.use_auto_pack(["dev"])
+43
View File
@@ -0,0 +1,43 @@
from lib import cpp, arch
from lib.make import *
version("0.23.1")
description("C library for the Public Suffix List")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/rockdaboot/libpsl/releases/download/0.23.1/libpsl-0.23.1.tar.gz"
)
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"libicu4c-dev @{arch.get_target()}")
builddep("pkgconf")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libpsl')}/lib",
f"--includedir={get_prefix('libpsl-dev')}/include",
"--disable-nls",
"--enable-runtime=libicu",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("libpsl")
dep("semi-libc @same-arch")
dep("libicu4c @same-arch")
cpp.use_auto_pack(["lib"])
package("libpsl-tools")
dep("libpsl (same)")
cpp.use_auto_pack(["bin"])
package("libpsl-dev")
dep("libpsl (same)")
cpp.use_auto_pack(["dev"])
+19
View File
@@ -0,0 +1,19 @@
from lib.make import *
version("2.0")
description("A small self-contained alternative to readline and libedit")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/antirez/linenoise/archive/refs/tags/2.0.tar.gz")
on_build(lambda: None)
def pack_dev(composer):
composer.addfile("linenoise.c", "linenoise.c")
composer.addfile("linenoise.h", "linenoise.h")
composer.addfile("Makefile", "Makefile")
package("linenoise-dev")
arch_any()
on_pack(pack_dev)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+84
View File
@@ -0,0 +1,84 @@
import os
import shutil
import lib.arch as arch
import lib.cpp as cpp
from lib.make import *
upstream_version = "6.18.43"
version(f"{upstream_version}")
description("the Linux operating system kernel")
maintainer("sisungo <[email protected]>")
source_url(
f"https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-{upstream_version}.tar.xz"
)
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("libncurses-dev")
builddep("aws-lc-dev")
builddep("aws-lc-tools")
def get_arch():
return arch.get_target().split("-")[0].replace("aarch64", "arm64")
def build():
makeopts = [f"ARCH={get_arch()}", "LLVM=1"]
config_name = get_arch()
if os.environ.get("LINUX_VARIANT"):
config_name += "-" + os.environ["LINUX_VARIANT"]
config_file = "../../configs/config." + config_name
shutil.copy2(config_file, ".config")
cpp.make(makeopts + ["olddefconfig"])
cpp.make(makeopts)
cpp.make(["headers_install", "INSTALL_HDR_PATH=../kheaders_install"])
cpp.make(["install", "INSTALL_PATH=../kimage_install"])
cpp.make(
["modules_install", "INSTALL_MOD_STRIP=1", "INSTALL_MOD_PATH=../kmod_install"]
)
os.remove(f"../kmod_install/lib/modules/{upstream_version}/build")
on_build(build)
base_name = "linux"
if os.environ.get("LINUX_VARIANT"):
base_name += "-" + os.environ["LINUX_VARIANT"]
def pack_linux_dev(composer):
composer.add_dir(
"../kheaders_install/include",
"include",
)
package(f"{base_name}-dev")
on_pack(pack_linux_dev)
def pack_linux(composer):
try:
composer.addfile(f"../kimage_install/vmlinux-{upstream_version}", "vmlinux")
except Exception:
pass
try:
composer.addfile(f"../kimage_install/vmlinuz-{upstream_version}", "vmlinuz")
except Exception:
pass
try:
composer.addfile(
f"../kimage_install/System.map-{upstream_version}", "System.map"
)
except Exception:
pass
composer.add_dir(f"../kmod_install/lib/modules/{upstream_version}", "modules")
package(f"{base_name}")
on_pack(pack_linux)
+333
View File
@@ -0,0 +1,333 @@
import os
import subprocess
import shutil
import glob
import lib
from lib import arch, cpp
from lib.make import *
pkgver = "22.1.8"
[pkgver_major, pkgver_minor, pkgver_rev] = pkgver.split(".")
version(pkgver)
description("a collection of modular and reusable compiler and toolchain technologies")
maintainer("sisungo <[email protected]>")
source_url(f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{pkgver}/llvm-project-{pkgver}.src.tar.xz")
builddep("shortcut/c++")
builddep("shortcut/cmake")
builddep(f"linux-dev @{arch.get_target()}")
builddep(f"libffi-dev @{arch.get_target()}")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep(f"aws-lc-dev @{arch.get_target()}")
builddep(f"libunwind-dev @{arch.get_target()}")
srcdir = None
packname = None
def llvm_host_triple():
return arch.get_target().replace("-semios-linux", "-unknown-linux-musl")
def cmake(sourcedir, args):
builddir = os.getcwd() + f"/../_build_{sourcedir}"
installdir = os.getcwd() + f"/../_cpp_install/{sourcedir}"
template_args = [
"cmake", "-G", "Ninja", "-S", sourcedir, "-B", builddir,
"-DCMAKE_BUILD_TYPE=Release",
f"-DLLVM_DEFAULT_TARGET_TRIPLE={llvm_host_triple()}",
f"-DLLVM_HOST_TRIPLE={llvm_host_triple()}",
"-DLLVM_ENABLE_EH=ON",
"-DLLVM_ENABLE_RTTI=ON",
"-DLLVM_ENABLE_ASSERTIONS=OFF",
"-DLLVM_BUILD_LLVM_DYLIB=ON",
"-DLLVM_LINK_LLVM_DYLIB=ON",
"-DLLVM_ENABLE_LIBCXX=ON",
"-DLLVM_ENABLE_LLD=ON",
"-DLLVM_ENABLE_FFI=ON",
]
subprocess.run(template_args + args, check=True)
subprocess.run(["cmake", "--build", builddir], check=True)
os.environ["DESTDIR"] = installdir
subprocess.run(["cmake", "--install", builddir], check=True)
def import_llvm():
return [f"-DLLVM_ROOT={os.getcwd()}/../_cpp_install/llvm/usr/local"]
def import_clang():
return [f"-DClang_DIR={os.getcwd()}/../_cpp_install/clang/usr/local"]
def enter_install(name):
global packname
packname = name
def auto_pack_static(composer):
composer.makedir("lib")
for i in os.listdir("lib"):
if ".a" in i:
composer.addfile(f"lib/{i}", f"lib/{i}")
def auto_pack_dev(composer, name, devbins=[], extdirs=["lib/cmake"]):
composer.add_dir("include", "include")
composer.makedir("lib")
for i in os.listdir("lib"):
prefix = None
if os.path.isdir(f"lib/{i}") and f"lib/{i}" in extdirs:
composer.add_dir(f"lib/{i}", f"lib/{i}")
elif ".so" in i:
prefix = get_prefix(f"lib{name}")
elif ".a" in i:
prefix = get_prefix(f"lib{name}-static")
if prefix:
os.symlink(f"{prefix}/lib/{i}", f"{composer.workdir}/bundle/lib/{i}")
composer.makedir("bin")
for i in devbins:
composer.addfile(f"bin/{i}", f"bin/{i}")
for i in os.listdir("bin"):
if i in devbins:
continue
prefix = get_prefix(name)
os.symlink(f"{prefix}/bin/{i}", f"{composer.workdir}/bundle/bin/{i}")
def auto_pack_runtime_lib(composer, name):
composer.makedir("lib")
for i in os.listdir("lib"):
if name in i and ".so" in i:
composer.addfile(f"lib/{i}", f"lib/{i}")
def auto_pack_glob(composer, matches):
for matchable in matches:
for i in glob.glob(matchable):
composer.makedirs(f"{os.path.dirname(i)}")
if os.path.isdir(i):
composer.add_dir(i, i)
else:
composer.addfile(i, i)
old_on_pack = on_pack
def new_on_pack(f):
current_packname = packname
def wrap_f(composer):
pkgdir = f"{srcdir}/../_cpp_install/{current_packname}/usr/local"
os.chdir(pkgdir)
f(composer)
old_on_pack(wrap_f)
lib.make.on_pack = new_on_pack
on_pack = new_on_pack
def build_llvm():
cmake("llvm", [])
def build_bolt():
cmake("bolt", import_llvm())
def build_clang():
options = [
"-DCLANG_DEFAULT_CXX_STDLIB=libc++",
"-DCLANG_DEFAULT_RTLIB=compiler-rt",
"-DLLVM_INCLUDE_TESTS=OFF",
f"-DC_INCLUDE_DIRS=/lib/{arch.get_target()}/include:{get_prefix('clang')}/lib/clang/{pkgver_major}/include",
]
cmake("clang", import_llvm() + options)
def build_lldb():
cmake("lldb", import_llvm() + import_clang())
def build_lld():
cmake("lld", import_llvm())
def build_polly():
cmake("polly", import_llvm())
def build_runtimes():
os.makedirs("../_build_runtimes", exist_ok=True)
shutil.rmtree("../_build_runtimes")
options = [
# Configure runtimes
"-DLLVM_ENABLE_RUNTIMES=libunwind;libcxxabi;libcxx",
# Configure libcxx
"-DLIBCXX_HAS_MUSL_LIBC=ON",
]
cmake("runtimes", options)
shutil.rmtree("../_build_runtimes")
options = [
# Configure runtimes
"-DLLVM_ENABLE_RUNTIMES=compiler-rt",
# Configure compiler-rt
"-DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON",
"-DCOMPILER_RT_BUILD_GWP_ASAN=OFF",
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF",
]
cmake("runtimes", options)
def build():
global srcdir
srcdir = os.getcwd()
build_llvm()
build_bolt()
build_clang()
build_lldb()
build_lld()
build_polly()
build_runtimes()
on_build(build)
enter_install("llvm")
package("libllvm")
dep("semi-libc @same-arch")
dep("libunwind @same-arch")
dep("libcxx @same-arch")
dep("libcxxabi @same-arch")
dep("libffi @same-arch")
on_pack(lambda composer: auto_pack_glob(composer, ["lib/*.so*"]))
package("libllvm-dev")
dep("libllvm (same)")
on_pack(lambda composer: auto_pack_dev(composer, "llvm", ["llvm-config"]))
package("libllvm-static")
on_pack(auto_pack_static)
def pack_llvm(composer):
composer.add_dir("bin", "bin")
os.remove(f"{composer.workdir}/bundle/bin/llvm-config")
composer.add_dir("share", "share")
package("llvm")
dep("libllvm (same)")
on_pack(pack_llvm)
for i in ["strip", "ar", "ranlib", "readelf", "objcopy", "objdump", "strings", "nm"]:
link(f"bin/llvm-{i}", f"/bin/{i}")
enter_install("bolt")
package("bolt")
dep("libcxx @same-arch")
cpp.use_auto_pack(["bin"])
enter_install("clang")
package("libclang")
dep("libllvm (same)")
cpp.use_auto_pack(["lib"])
package("libclang-static")
on_pack(auto_pack_static)
package("libclang-dev")
dep("libclang (same)")
on_pack(lambda composer: auto_pack_dev(composer, "clang"))
def pack_clang(composer):
# Add base files
composer.add_dir("bin", "bin")
composer.add_dir("libexec", "libexec")
composer.makedir("share")
for i in ["clang", "scan-build", "scan-view"]:
composer.add_dir(f"share/{i}", f"share/{i}")
# Add resource files
composer.makedir("lib")
composer.add_dir("lib/clang", "lib/clang")
# Add compiler-rt for current architecture
linuxrtdir = "../../../runtimes/usr/local/lib/linux"
localrtdir = f"lib/clang/{pkgver_major}/lib/{llvm_host_triple()}"
composer.makedirs(localrtdir)
for rtlib in os.listdir(linuxrtdir):
larch = llvm_host_triple().split("-")[0]
lrtlib = rtlib.replace(f"-{larch}", "")
composer.addfile(f"{linuxrtdir}/{rtlib}", f"{localrtdir}/{lrtlib}")
# Add symlink to system directories, which is required for finding libc++
os.symlink(f"/lib/{arch.get_target()}/include", f"{composer.workdir}/bundle/include")
# Add configuration
clang_cfg = f"-L/lib/{arch.get_target()}\n-B/lib/{arch.get_target()}\n-rtlib=compiler-rt\n"
clangxx_cfg = f"-stdlib=libc++\n{clang_cfg}"
with open(f"{composer.workdir}/bundle/bin/clang.cfg", "wt+") as file:
file.write(clang_cfg)
with open(f"{composer.workdir}/bundle/bin/clang++.cfg", "wt+") as file:
file.write(clangxx_cfg)
package("clang")
dep("libclang (same)")
on_pack(pack_clang)
link("bin/clang", "/bin/cc")
link("bin/clang++", "/bin/c++")
enter_install("lld")
package("lld")
dep("libllvm (same)")
cpp.use_auto_pack(["bin"])
link("bin/ld.lld", "/bin/ld")
package("lld-dev")
dep("lld (same)")
cpp.use_auto_pack(["dev"])
enter_install("lldb")
package("liblldb")
dep("libclang (same)")
dep("libllvm (same)")
cpp.use_auto_pack(["lib"])
package("liblldb-dev")
dep("liblldb (same)")
cpp.use_auto_pack(["dev"])
package("lldb")
dep("liblldb (same)")
cpp.use_auto_pack(["bin"])
enter_install("polly")
package("polly")
dep("libcxx @same-arch")
on_pack(lambda composer: auto_pack_glob(composer, ["*"]))
enter_install("runtimes")
package("libunwind")
dep("semi-libc @same-arch")
on_pack(lambda composer: auto_pack_runtime_lib(composer, "unwind"))
package("libunwind-dev")
dep("libunwind (same)")
on_pack(lambda composer: auto_pack_glob(composer, ["lib/libunwind.a", "include/*unwind*", "include/mach-o"]))
package("libcxxabi")
dep("libunwind (same)")
on_pack(lambda composer: auto_pack_runtime_lib(composer, "libc++abi"))
package("libcxxabi-dev")
dep("libcxxabi (same)")
on_pack(lambda composer: auto_pack_glob(composer, ["lib/libc++abi.a"]))
package("libcxx")
dep("libcxxabi (same)")
on_pack(lambda composer: auto_pack_runtime_lib(composer, "libc++"))
package("libcxx-dev")
dep("libcxx (same)")
on_pack(lambda composer: auto_pack_glob(composer, ["lib/libc++experimental.a", "lib/libc++.a", "lib/libc++.modules.json", "include/c++", "share/libc++"]))
+27
View File
@@ -0,0 +1,27 @@
import os
import subprocess
from lib import arch, cpp
from lib.make import *
version("1.14.6")
description("a suite of tools compiling mdoc, the roff macro language, and man")
maintainer("sisungo <[email protected]>")
source_url("https://mandoc.bsd.lv/snapshots/mandoc-1.14.6.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"libz-ng-dev @{arch.get_target()}")
def build():
cpp.configure()
cpp.make([f"CC={os.environ['CC']}"])
cpp.make_install()
on_build(build)
package("mandoc")
dep("libz @same-arch")
cpp.use_auto_pack(["bin"])
+32
View File
@@ -0,0 +1,32 @@
import subprocess
from lib.make import *
version("1.11.2")
description("The Meson Build System")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/mesonbuild/meson/releases/download/1.11.2/meson-1.11.2.tar.gz")
builddep("python")
def build():
subprocess.run([
"python3",
"./packaging/create_zipapp.py",
"--outfile",
"meson",
"--interpreter",
"/bin/python3"
])
on_build(build)
def pack_meson(composer):
composer.makedir("bin")
composer.addfile("meson", "bin/meson")
package("meson")
dep("python @same-arch")
recommend("ninja")
on_pack(pack_meson)
+13 -3
View File
@@ -1,13 +1,20 @@
import os
import subprocess
from lib.make import *
version("1.59.2")
source_git("https://github.com/mirabilos/mksh-cvs2git.git", "mksh-R59c")
description("the MirBSD Korn Shell, a minimal and useful implementation of the POSIX shell with extensions")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/mirabilos/mksh-cvs2git/archive/refs/tags/mksh-R59c.tar.gz"
)
builddep("shortcut/c")
builddep("gnu-sed")
def build():
os.system("sh ./Build.sh")
subprocess.run(["sh", "./Build.sh"], check=True)
on_build(build)
@@ -20,3 +27,6 @@ def pack_mksh(composer):
package("mksh")
on_pack(pack_mksh)
dep("semi-libc @same-arch")
provide("sh")
link("bin/mksh", "/bin/sh")
+70
View File
@@ -0,0 +1,70 @@
import os
from lib import cpp
from lib.make import *
version("6.6")
description("the ncurses terminal library")
maintainer("sisungo <[email protected]>")
source_url("https://invisible-island.net/archives/ncurses/ncurses-6.6.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.configure(
[
"--prefix=/",
f"--bindir={get_prefix('ncurses-tools')}/bin",
f"--sbindir={get_prefix('ncurses-tools')}/sbin",
f"--libdir={get_prefix('libncurses')}/lib",
f"--includedir={get_prefix('libncurses')}/include",
"--enable-pc-files",
"--with-shared",
"--with-terminfo-dirs=/share/terminfo",
"--enable-symlinks",
"--enable-sp-funcs",
"--enable-ext-colors",
"--enable-rgb-color",
"--enable-ext-mouse",
"--enable-ext-putwin",
"--enable-no-padding",
"--enable-sigwinch",
"--enable-tcap-names",
"--with-pthread",
"--enable-pthreads-eintr",
"--enable-weak-symbols",
"--enable-reentrant",
"--without-develop",
]
)
cpp.make()
cpp.make_install()
os.unlink("lib/terminfo")
on_build(build)
package("libncurses")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("ncurses-tools")
dep("libncurses (same)")
cpp.use_auto_pack(["bin"])
package("libncurses-dev")
dep("libncurses (same)")
cpp.use_auto_pack(["dev"])
def pack_terminfo(composer):
composer.makedir("share")
composer.add_dir("share/tabset", "share/tabset")
composer.add_dir("share/terminfo", "share/terminfo")
package("ncurses-terminfo")
arch_any()
on_pack(pack_terminfo)
+30
View File
@@ -0,0 +1,30 @@
import os
from lib import cpp
from lib.make import *
version("19")
description("A vi/ex editor for editing UTF-8 text")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/aligrudi/neatvi/archive/refs/tags/19.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
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)
+32
View File
@@ -0,0 +1,32 @@
import os
import subprocess
from lib import cpp
from lib.make import *
version("5.3")
description("A small vi/ex terminal text editor (neatvi rewrite)")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/kyx0r/nextvi/archive/refs/tags/5.3.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
os.environ["PREFIX"] = "/"
subprocess.run(["./cbuild.sh"])
on_build(build)
def pack(composer):
composer.makedir("bin")
composer.addfile("vi", "bin/vi")
package("nextvi")
on_pack(pack)
dep("semi-libc @same-arch")
provide("vi")
+26
View File
@@ -0,0 +1,26 @@
from lib import cpp
from lib.make import *
version("1.70.0")
description("nghttp2 - HTTP/2 C Library and tools")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/nghttp2/nghttp2/releases/download/v1.70.0/nghttp2-1.70.0.tar.gz"
)
def build():
cpp.cmake()
cpp.ninja()
cpp.ninja_install()
on_build(build)
package("libnghttp2")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("libnghttp2-dev")
cpp.use_auto_pack(["dev"])
dep("libnghttp2 (same)")
+29
View File
@@ -0,0 +1,29 @@
import os
from lib.make import *
version("1.13.2")
description("a small build system with a focus on speed")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/ninja-build/ninja/archive/refs/tags/v1.13.2.tar.gz")
builddep("shortcut/c++")
builddep("sed")
def build():
os.system("python3 ./configure.py --bootstrap")
on_build(build)
def pack_ninja(composer):
composer.makedir("bin")
composer.addfile("ninja", "bin/ninja")
package("ninja")
on_pack(pack_ninja)
dep("semi-libc @same-arch")
dep("libcxx @same-arch")
+62
View File
@@ -0,0 +1,62 @@
from lib import cpp
from lib.make import *
version("10.3.1")
description("the premier connectivity tool for remote login with the SSH protocol")
maintainer("sisungo <[email protected]>")
source_url("https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-10.3p1.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep(f"aws-lc-dev @{arch.get_target()}")
def build():
cpp.configure(
[
"--prefix=/",
"--sysconfdir=/var/config",
"--disable-etc-default-login",
"--with-linux-memlock-onfault",
"--without-shadow",
"--with-pam",
"--with-pie",
]
)
cpp.make()
cpp.make_install()
on_build(build)
def pack_client(composer):
composer.add_dir("bin", "bin")
composer.makedir("libexec")
composer.addfile("libexec/ssh-sk-helper", "libexec/ssh-sk-helper")
composer.addfile("libexec/ssh-pkcs11-helper", "libexec/ssh-pkcs11-helper")
package("openssh-client")
dep("semi-libc @same-arch")
dep("libcrypto @same-arch")
dep("libz @same-arch")
on_pack(pack_client)
provide("ssh")
def pack_server(composer):
composer.makedir("bin")
composer.addfile("sbin/sshd", "bin/sshd")
composer.makedir("libexec")
composer.addfile("libexec/sftp-server", "libexec/sftp-server")
composer.addfile("libexec/ssh-keysign", "libexec/ssh-keysign")
composer.addfile("libexec/sshd-auth", "libexec/sshd-auth")
composer.addfile("libexec/sshd-session", "libexec/sshd-session")
package("openssh-server")
dep("openssh-client (same)")
dep("libpam @same-arch")
on_pack(pack_server)
+22
View File
@@ -0,0 +1,22 @@
from lib.make import *
from lib import python
python.version("26.3")
description("Core utilities for Python packages")
maintainer("sisungo <[email protected]>")
source_url("https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz")
python.builddep("$shortcut")
def build():
python.build()
python.install()
on_build(build)
package("packaging.py")
python.dep("python")
python.use_auto_pack()
+18
View File
@@ -0,0 +1,18 @@
from lib import rust
from lib.make import *
version("0.0.1-alpha.1")
description("SemiOS package manager")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/packie/archive/0.1.0.alpha-1.tar.gz")
def build():
rust.build(["--package", "packie-cli"])
on_build(build)
package("packie")
dep("semi-libc @same-arch")
rust.use_auto_pack(["bin"])
+28
View File
@@ -0,0 +1,28 @@
import shutil
import subprocess
from lib.make import *
version("15.1.1")
description("the SemiOS fork of the UNIX patch utility")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/patch/archive/v15.1.1.tar.gz")
builddep("shortcut/c")
def build():
subprocess.run(["./build.sh"], check=True)
on_build(build)
def pack_patch(composer):
composer.makedir("bin")
composer.addfile("patch", "bin/patch")
package("patch")
dep("semi-libc @same-arch")
on_pack(pack_patch)
+40
View File
@@ -0,0 +1,40 @@
from lib import cpp
from lib.make import *
version("10.47")
description("a set of C functions that implement regular expression pattern matching")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.gz"
)
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libpcre2')}/lib",
f"--bindir={get_prefix('pcre2-tools')}/bin",
"--enable-jit",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("libpcre2")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("pcre2-tools")
dep("libpcre2 (same)")
cpp.use_auto_pack(["bin"])
package("libpcre2-dev")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["dev"])
+77
View File
@@ -0,0 +1,77 @@
import os
import subprocess
from lib import arch, cpp
from lib.make import *
upstream_version = "5.42.2"
version(upstream_version)
description("Perl is a highly capable, feature-rich programming language with over 37 years of development")
maintainer("sisungo <[email protected]>")
source_url("https://www.cpan.org/src/5.0/perl-5.42.2.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
block_hook("autolink")
def build():
subprocess.run(
[
"./Configure",
"-de",
f"-Dcc={os.environ.get('CC', 'cc')}",
f"-Doptimize={os.environ.get('CFLAGS', '')}",
"-Dusethreads",
"-Duseshrplib",
"-Dprefix=/",
"-Dvendorprefix=/",
f"-Dprivlib={get_prefix('libperl')}/share/core_perl",
f"-Darchlib={get_prefix('libperl')}/lib/core_perl",
f"-Dsitelib=/lib/{arch.get_target()}/perl5/site_perl",
f"-Dsitearch=/lib/{arch.get_target()}/perl5/site_arch",
f"-Dvendorlib=/lib/{arch.get_target()}/perl5/vendor_perl",
f"-Dvendorarch=/lib/{arch.get_target()}/perl5/vendor_arch",
f"-Dscriptdir={get_prefix('perl')}/bin/core_perl",
"-Dsitescript=/bin/site_perl",
"-Dvendorscript=/bin/vendor_perl",
"-Dinc_version_list=none",
"-Dman1dir=/share/man/man1",
"-Dman3dir=/share/man/man3",
"-Dman1ext=1perl",
"-Dman3ext=3perl",
f"-Dlddlflags=-shared {os.environ.get('LDFLAGS', '')}",
f"-Dldflags={os.environ.get('LDFLAGS', '')}",
],
check=True,
)
cpp.make()
cpp.make_install()
on_build(build)
def pack_libperl(composer):
composer.makedir("lib")
composer.makedir("share")
composer.add_dir("lib/core_perl", "lib/core_perl")
composer.add_dir("share/core_perl", "share/core_perl")
package("libperl")
dep("semi-libc @same-arch")
on_pack(pack_libperl)
def pack_perl(composer):
composer.add_dir("bin", "bin")
package("perl")
dep("libperl (same)")
cpp.use_auto_pack(["bin"])
link("bin/perl", "/bin/perl")
link(f"bin/perl{upstream_version}", f"/bin/perl{upstream_version}")
+42
View File
@@ -0,0 +1,42 @@
import lib.cpp as cpp
from lib import arch
from lib.make import *
version("2.5.1")
description("package compiler and linker metadata toolkit")
source_url("https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.configure(
[
"--prefix=/",
f"--bindir={get_prefix('pkgconf')}/bin",
f"--libdir={get_prefix('libpkgconf')}/lib",
f"--includedir={get_prefix('libpkgconf-dev')}/include",
f"--with-system-libdir=/lib:/lib/{arch.get_target()}",
f"--with-system-includedir=/lib/{arch.get_target()}/include",
f"--with-pkg-config-dir=/lib/{arch.get_target()}/pkgconfig",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("libpkgconf")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("pkgconf")
cpp.use_auto_pack(["bin"])
dep("libpkgconf (same)")
link("bin/pkgconf", "/bin/pkg-config")
package("libpkgconf-dev")
cpp.use_auto_pack(["dev"])
dep("libpkgconf (same)")
+111
View File
@@ -0,0 +1,111 @@
import os
import shutil
from lib import arch, cpp
from lib.make import *
VERSION_BASE = "3.14"
VERSION_APPEND = "7"
VERSION_FULL = f"{VERSION_BASE}.{VERSION_APPEND}"
version(VERSION_FULL)
description("the Python programming language")
maintainer("sisungo <[email protected]>")
source_url(
f"https://www.python.org/ftp/python/{VERSION_FULL}/Python-{VERSION_FULL}.tar.xz"
)
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"liblzma-dev @{arch.get_target()}")
builddep(f"libzstd-dev @{arch.get_target()}")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep(f"aws-lc-dev @{arch.get_target()}")
builddep(f"libexpat-dev @{arch.get_target()}")
builddep(f"libsqlite-dev @{arch.get_target()}")
builddep(f"libncurses-dev @{arch.get_target()}")
builddep(f"libbzip2-dev @{arch.get_target()}")
builddep(f"libffi-dev @{arch.get_target()}")
builddep("pkgconf")
def build():
cpp.configure(
[
"--prefix=/",
f"--with-platlibdir=lib/{arch.get_target()}",
"--enable-shared",
"--enable-safety",
"--enable-optimizations",
"--enable-loadable-sqlite-extensions",
"--enable-ipv6",
"--with-lto=thin",
"--with-tzpath=/share/zoneinfo",
"--with-system-expat",
"--with-system-libmpdec",
"--with-readline=editline",
"--with-tail-call-interp",
"--without-ensurepip",
"--with-ssl-default-suites=openssl",
]
)
cpp.make()
cpp.make_install()
os.rename(
f"lib/{arch.get_target()}/python{VERSION_BASE}", f"lib/python{VERSION_BASE}"
)
os.rmdir(f"lib/{arch.get_target()}")
on_build(build)
def python_config_target():
return arch.get_target().replace("-semios-linux", "-linux-musl")
def pack_libpython(composer):
# Pack the standard library
pystdpath = f"{composer.workdir}/bundle/lib/python{VERSION_BASE}"
composer.makedir("lib")
composer.add_dir(f"lib/python{VERSION_BASE}", f"lib/python{VERSION_BASE}")
shutil.rmtree(f"{pystdpath}/test")
os.remove(
f"{pystdpath}/config-{VERSION_BASE}-{python_config_target()}/libpython{VERSION_BASE}.a"
)
os.remove(f"{pystdpath}/config-{VERSION_BASE}-{python_config_target()}/python.o")
# Pack native libraries
composer.addfile(
f"lib/libpython{VERSION_BASE}.so", f"lib/libpython{VERSION_BASE}.so"
)
composer.addfile(
f"lib/libpython{VERSION_BASE}.so.1.0", f"lib/libpython{VERSION_BASE}.so.1.0"
)
composer.addfile("lib/libpython3.so", "lib/libpython3.so")
package("libpython")
dep("semi-libc @same-arch")
on_pack(pack_libpython)
package("python")
dep("libpython (same)")
cpp.use_auto_pack(["bin"])
link(f"bin/python{VERSION_BASE}", "/bin/python3")
link(f"bin/python{VERSION_BASE}", "/bin/python")
package("libpython-dev")
dep("libpython (same)")
cpp.use_auto_pack(["dev"])
def pack_test(composer):
composer.makedirs(f"lib/python{VERSION_BASE}")
composer.add_dir(f"lib/python{VERSION_BASE}/test", f"lib/python{VERSION_BASE}/test")
package("python-test")
dep("libpython (same)")
on_pack(pack_test)
+11
View File
@@ -0,0 +1,11 @@
prefix=/
exec_prefix=${prefix}
libdir=
includedir=
Name: librhash
Description: LibRHash shared library
Version:
Cflags: -I${includedir}
Libs: -L${libdir} -lrhash
Libs.private:
+56
View File
@@ -0,0 +1,56 @@
from lib import cpp
from lib.make import *
import os
upstream_version = "1.4.6"
version(upstream_version)
description("Great utility for computing hash sums")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/rhash/RHash/archive/refs/tags/v1.4.6.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
with open("files/librhash.pc") as f:
librhash_pc = f.read()
def build():
global librhash_pc
cpp.configure(
[
"--prefix=/",
f"--bindir={get_prefix('rhash-tools')}/bin",
f"--libdir={get_prefix('librhash')}/lib",
"--disable-gettext",
"--enable-lib-static",
]
)
cpp.make()
cpp.make_install()
os.symlink("librhash.so.1", "./lib/librhash.so")
os.makedirs("./lib/pkgconfig", exist_ok=True)
with open("./lib/pkgconfig/librhash.pc", "w+") as file:
librhash_pc = (librhash_pc
.replace("libdir=", f"libdir={get_prefix('librhash')}/lib")
.replace("includedir=", f"includedir={get_prefix('librhash-dev')}/include")
.replace("Version:", f"Version: {upstream_version}")
)
file.write(librhash_pc)
on_build(build)
package("librhash")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("rhash-tools")
dep("librhash (same)")
cpp.use_auto_pack(["bin"])
package("librhash-dev")
dep("librhash (same)")
cpp.use_auto_pack(["dev"])
+20
View File
@@ -0,0 +1,20 @@
from lib import rust
from lib.make import *
version("15.2.0")
description("ripgrep recursively searches directories for a regex pattern while respecting your gitignore")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/BurntSushi/ripgrep/archive/refs/tags/15.2.0.tar.gz")
builddep("shortcut/rust")
def build():
rust.build()
on_build(build)
package("ripgrep")
dep("semi-libc @same-arch")
rust.use_auto_pack(["bin"])
+740
View File
@@ -0,0 +1,740 @@
# bootstrap.toml.in: Bootstrap Config Template
#
# Replacing Stubs:
# - %RUSTVERSION%: Version of rust
# - %CARGOPATH%: Absolute path of cargo
# - %RUSTCPATH%: Absolute path of rustc
# - %INSTALLPREFIX%: Install prefix
# =============================================================================
# Global Settings
# =============================================================================
# Use different pre-set defaults than the global defaults.
#
# See `src/bootstrap/defaults` for more information.
# Note that this has no default value (x.py uses the defaults in `bootstrap.example.toml`).
profile = "dist"
# =============================================================================
# Tweaking how LLVM is compiled
# =============================================================================
# Don't download Rust CI LLVM, instead, we compile it by our own.
llvm.download-ci-llvm = false
# Indicates whether the LLVM build is a Release or Debug build
llvm.optimize = true
# Indicates whether LLVM should be built with ThinLTO. Note that this will
# only succeed if you use clang, lld, llvm-ar, and llvm-ranlib in your C/C++
# toolchain (see the `cc`, `cxx`, `linker`, `ar`, and `ranlib` options below).
# More info at: https://clang.llvm.org/docs/ThinLTO.html#clang-bootstrap
llvm.thin-lto = true
# Indicates whether an LLVM Release build should include debug info
llvm.release-debuginfo = false
# Indicates whether the LLVM assertions are enabled or not
# NOTE: When assertions are disabled, bugs in the integration between rustc and LLVM can lead to
# unsoundness (segfaults, etc.) in the rustc process itself, not just in the generated code.
llvm.assertions = false
# Indicates whether the LLVM testsuite is enabled in the build or not. Does
# not execute the tests as part of the build as part of x.py build et al,
# just makes it possible to do `ninja check-llvm` in the staged LLVM build
# directory when doing LLVM development as part of Rust development.
llvm.tests = false
# Indicates whether the LLVM plugin is enabled or not
llvm.plugins = false
# Whether to build Enzyme as AutoDiff backend.
llvm.enzyme = false
# Whether to build LLVM with support for it's gpu offload runtime.
llvm.offload = false
# Absolute path to the directory containing ClangConfig.cmake
llvm.offload-clang-dir = ""
# When true, link libstdc++ statically into the rustc_llvm.
# This is useful if you don't want to use the dynamic version of that
# library provided by LLVM.
llvm.static-libstdcpp = false
# Enable LLVM to use zstd for compression.
llvm.libzstd = false
# Whether to use Ninja to build LLVM. This runs much faster than make.
llvm.ninja = true
# LLVM targets to build support for.
#llvm.targets = <default value>
# LLVM experimental targets to build support for.
#llvm.experimental-targets = <default value>
# Cap the number of parallel linker invocations when compiling LLVM.
#llvm.link-jobs = <default value>
# Whether to build LLVM as a dynamically linked library (as opposed to statically linked).
# Under the hood, this passes `--shared` to llvm-config.
# NOTE: To avoid performing LTO multiple times, we suggest setting this to `true` when `thin-lto` is enabled.
llvm.link-shared = true
# When building llvm, this configures what is being appended to the version.
llvm.version-suffix = "-rust-%RUSTVERSION%"
# Use libc++ when building LLVM instead of libstdc++. This is the default on
# platforms already use libc++ as the default C++ library, but this option
# allows you to use libc++ even on platforms when it's not. You need to ensure
# that your host compiler ships with libc++.
llvm.use-libcxx = true
# The value specified here will be passed as `-DLLVM_USE_LINKER` to CMake.
#llvm.use-linker = <none> (path)
# Whether or not to specify `-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=YES`
#llvm.allow-old-toolchain = false
# Whether to include the Polly optimizer.
llvm.polly = false
# Whether to build the clang compiler.
llvm.clang = false
# Whether to enable llvm compilation warnings.
llvm.enable-warnings = false
# Custom CMake defines to set when building LLVM.
llvm.build-config = {"LLVM_ENABLE_LIBCXX" = "ON"}
# =============================================================================
# General build configuration options
# =============================================================================
# The default stage to use for the `check` subcommand
#build.check-stage = 0
# The default stage to use for the `doc` subcommand
#build.doc-stage = 0
# The default stage to use for the `build` subcommand
#build.build-stage = 1
# The default stage to use for the `test` subcommand
#build.test-stage = 1
# The default stage to use for the `dist` subcommand
#build.dist-stage = 2
# The default stage to use for the `install` subcommand
#build.install-stage = 2
# The default stage to use for the `bench` subcommand
#build.bench-stage = 2
# A descriptive string to be appended to version output (e.g., `rustc --version`),
# which is also used in places like debuginfo `DW_AT_producer`. This may be useful for
# supplementary build information, like distro-specific package versions.
#
# IMPORTANT: Changing this value changes crate IDs and symbol name mangling, making
# compiled artifacts incompatible. PGO profiles cannot be reused across different
# descriptions, and incremental compilation caches are invalidated. Keep this value
# consistent when reusing build artifacts.
#
# The Rust compiler will differentiate between versions of itself, including
# based on this string, which means that if you wish to be compatible with
# upstream Rust you need to set this to "". However, note that if you set this to "" but
# are not actually compatible -- for example if you've backported patches that change
# behavior -- this may lead to miscompilations or other bugs.
#build.description = ""
# Build triple for the pre-compiled snapshot compiler. If `rustc` is set, this must match its host
# triple (see `rustc --version --verbose`; cross-compiling the rust build system itself is NOT
# supported). If `rustc` is unset, this must be a platform with pre-compiled host tools
# (https://doc.rust-lang.org/nightly/rustc/platform-support.html). The current platform must be
# able to run binaries of this build triple.
#
# If `rustc` is present in path, this defaults to the host it was compiled for.
# Otherwise, `x.py` will try to infer it from the output of `uname`.
# If `uname` is not found in PATH, we assume this is `x86_64-pc-windows-msvc`.
# This may be changed in the future.
#build.build = "x86_64-unknown-linux-gnu" (as an example)
# Which triples to produce a compiler toolchain for. Each of these triples will be bootstrapped from
# the build triple themselves. In other words, this is the list of triples for which to build a
# compiler that can RUN on that triple.
#
# Defaults to just the `build` triple.
#build.host = [build.build] (list of triples)
# Which triples to build libraries (core/alloc/std/test/proc_macro) for. Each of these triples will
# be bootstrapped from the build triple themselves. In other words, this is the list of triples for
# which to build a library that can CROSS-COMPILE to that triple.
#
# Defaults to `host`. If you set this explicitly, you likely want to add all
# host triples to this list as well in order for those host toolchains to be
# able to compile programs for their native target.
#build.target = build.host (list of triples)
# Use this directory to store build artifacts. Paths are relative to the current directory, not to
# the root of the repository.
#build.build-dir = "build"
# Instead of downloading the src/stage0 version of Cargo specified, use
# this Cargo binary instead to build all Rust code
# If you set this, you likely want to set `rustc` as well.
build.cargo = "%CARGOPATH%"
# Instead of downloading the src/stage0 version of the compiler
# specified, use this rustc binary instead as the stage0 snapshot compiler.
# If you set this, you likely want to set `cargo` as well.
build.rustc = "%RUSTCPATH%"
# Use this rustdoc binary as the stage0 snapshot rustdoc.
# If unspecified, then the binary "rustdoc" (with platform-specific extension, e.g. ".exe")
# in the same directory as "rustc" will be used.
#build.rustdoc = "/path/to/rustdoc"
# Instead of downloading the src/stage0 version of rustfmt specified,
# use this rustfmt binary instead as the stage0 snapshot rustfmt.
#build.rustfmt = "/path/to/rustfmt"
# Instead of downloading the src/stage0 version of cargo-clippy specified,
# use this cargo-clippy binary instead as the stage0 snapshot cargo-clippy.
#
# Note that this option should be used with the same toolchain as the `rustc` option above.
# Otherwise, clippy is likely to fail due to a toolchain conflict.
#build.cargo-clippy = "/path/to/cargo-clippy"
# Whether to build documentation by default. If false, rustdoc and
# friends will still be compiled but they will not be used to generate any
# documentation.
#
# You can still build documentation when this is disabled by explicitly passing paths,
# e.g. `x doc library`.
build.docs = true
# Flag to specify whether CSS, JavaScript, and HTML are minified when
# docs are generated. JSON is always minified, because it's enormous,
# and generated in already-minified form from the beginning.
build.docs-minification = true
# Flag to specify whether private items should be included in the library docs.
build.library-docs-private-items = false
# Indicate whether to build compiler documentation by default.
# You can still build documentation when this is disabled by explicitly passing a path: `x doc compiler`.
build.compiler-docs = false
# Indicate whether git submodules are managed and updated automatically.
build.submodules = false
# The path to (or name of) the GDB executable to use. This is only used for
# executing the debuginfo test suite.
#build.gdb = <not required>
# The path to (or name of) the LLDB executable to use. This is only used for
# executing the debuginfo test suite.
#build.lldb = <not required>
# The node.js executable to use. Note that this is only used for the emscripten
# target when running tests, otherwise this can be omitted.
#build.nodejs = <not required>
# The yarn executable to use. Note that this is used for rustdoc-gui tests and
# tidy js extra-checks, otherwise this can be omitted.
#
# Under Windows this should be `yarn.cmd` or path to it (verified on nodejs v18.06), or
# error will be emitted.
#build.yarn = <not required>
# Python interpreter to use for various tasks throughout the build, notably
# rustdoc tests, and some dist bits and pieces.
#
# Defaults to the Python interpreter used to execute x.py.
#build.python = <default>
# The path to the REUSE executable to use. Note that REUSE is not required in
# most cases, as our tooling relies on a cached (and shrunk) copy of the
# REUSE output present in the git repository and in our source tarballs.
#
# REUSE is only needed if your changes caused the overall licensing of the
# repository to change, and the cached copy has to be regenerated.
#
# Defaults to the "reuse" command in the system path.
#build.reuse = <not required>
# Force Cargo to check that Cargo.lock describes the precise dependency
# set that all the Cargo.toml files create, instead of updating it.
build.locked-deps = false
# Indicate whether the vendored sources are used for Rust dependencies or not.
#
# Vendoring requires additional setup. We recommend using the pre-generated source tarballs if you
# want to use vendoring. See https://forge.rust-lang.org/infra/other-installation-methods.html#source-code.
#build.vendor = <default>
# If you build the compiler more than twice (stage3+) or the standard library more than once
# (stage 2+), the third compiler and second library will get uplifted from stage2 and stage1,
# respectively. If you would like to disable this uplifting, and rather perform a full bootstrap,
# then you can set this option to true.
#
# This is only useful for verifying that rustc generates reproducible builds.
build.full-bootstrap = false
# Set the bootstrap/download cache path. It is useful when building rust
# repeatedly in a CI environment.
#build.bootstrap-cache-path = /path/to/shared/cache
# Enable a build of the extended Rust tool set which is not only the compiler
# but also tools such as Cargo. This will also produce "combined installers"
# which are used to install Rust and Cargo together.
# The `tools` (check `bootstrap.example.toml` to see its default value) option specifies
# which tools should be built if `extended = true`.
#
# This is disabled by default.
build.extended = false
# Set of tools to be included in the installation.
#
# If `extended = false`, the only one of these built by default is rustdoc.
#
# If `extended = true`, they are all included.
#
# If any enabled tool fails to build, the installation fails.
#build.tools = <default>
# Specify build configuration specific for some tool, such as enabled features.
# This option has no effect on which tools are enabled: refer to the `tools` option for that.
#
# For example, to build Miri with tracing support, use `tool.miri.features = ["tracing"]`
#
# The default value for the `features` array is `[]`. However, please note that other flags in
# `bootstrap.toml` might influence the features enabled for some tools. Also, enabling features
# in tools which are not part of the internal "extra-features" preset might not always work.
#build.tool.TOOL_NAME.features = [FEATURE1, FEATURE2]
# Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose, 3 == print environment variables on each rustc invocation
#build.verbose = <default>
# Build the sanitizer runtimes
build.sanitizers = false
# Build the profiler runtime (required when compiling with options that depend
# on this runtime, such as `-C profile-generate` or `-C instrument-coverage`).
build.profiler = false
# Use the optimized LLVM C intrinsics for `compiler_builtins`, rather than Rust intrinsics.
# Choosing true requires the LLVM submodule to be managed by bootstrap (i.e. not external)
# so that `compiler-rt` sources are available.
#
# Setting this to a path removes the requirement for a C toolchain, but requires setting the
# path to an existing library containing the builtins library from LLVM's compiler-rt.
#
# Setting this to `false` generates slower code, but removes the requirement for a C toolchain in
# order to run `x check`.
build.optimized-compiler-builtins = true
# Indicates whether the native libraries linked into Cargo will be statically
# linked or not.
build.cargo-native-static = false
# Number of parallel jobs to be used for building and testing. If set to `0` or
# omitted, it will be automatically determined. This is the `-j`/`--jobs` flag
# passed to cargo invocations.
#build.jobs = <default>
# Default value for the `--extra-checks` flag of tidy.
#
# See `./x test tidy --help` for details.
#
# Note that if any value is manually given to bootstrap such as
# `./x test tidy --extra-checks=js`, this value is ignored.
# Use `--extra-checks=''` to temporarily disable all extra checks.
#
# Automatically enabled in the "tools" profile.
# Set to the empty string to force disable (recommended for hdd systems).
#build.tidy-extra-checks = ""
# Indicates whether ccache is used when building certain artifacts (e.g. LLVM).
# Set to `true` to use the first `ccache` in PATH, or set an absolute path to use
# a specific version.
build.ccache = false
# List of paths to exclude from the build and test processes.
# For example, exclude = ["tests/ui", "src/tools/tidy"].
#build.exclude = []
# =============================================================================
# General install configuration options
# =============================================================================
# Where to install the generated toolchain. Must be an absolute path.
install.prefix = "%INSTALLPREFIX%"
# Where to install system configuration files.
# If this is a relative path, it will get installed in `prefix` above
install.sysconfdir = "/var/config"
# Where to install documentation in `prefix` above
install.docdir = "share/doc/rust"
# Where to install binaries in `prefix` above
install.bindir = "bin"
# Where to install libraries in `prefix` above
install.libdir = "lib"
# Where to install man pages in `prefix` above
install.mandir = "share/man"
# Where to install data in `prefix` above
install.datadir = "share"
# =============================================================================
# Options for compiling Rust code itself
# =============================================================================
# Whether or not to optimize when compiling the compiler and standard library,
# and what level of optimization to use.
# WARNING: Building with optimize = false is NOT SUPPORTED. Due to bootstrapping,
# building without optimizations takes much longer than optimizing. Further, some platforms
# fail to build without this optimization (c.f. #65352).
# The valid options are:
# true - Enable optimizations (same as 3).
# false - Disable optimizations.
# 0 - Disable optimizations.
# 1 - Basic optimizations.
# 2 - Some optimizations.
# 3 - All optimizations.
# "s" - Optimize for binary size.
# "z" - Optimize for binary size, but also turn off loop vectorization.
#rust.optimize = true
# Indicates that the build should be configured for debugging Rust. A
# `debug`-enabled compiler and standard library will be somewhat
# slower (due to e.g. checking of debug assertions) but should remain
# usable.
#
# Note: If this value is set to `true`, it will affect a number of
# configuration options below as well, if they have been left
# unconfigured in this file.
#
# Note: changes to the `debug` setting do *not* affect `optimize`
# above. In theory, a "maximally debuggable" environment would
# set `optimize` to `false` above to assist the introspection
# facilities of debuggers like lldb and gdb. To recreate such an
# environment, explicitly set `optimize` to `false` and `debug`
# to `true`. In practice, everyone leaves `optimize` set to
# `true`, because an unoptimized rustc with debugging
# enabled becomes *unusably slow* (e.g. rust-lang/rust#24840
# reported a 25x slowdown) and bootstrapping the supposed
# "maximally debuggable" environment (notably libstd) takes
# hours to build.
#
rust.debug = false
# Whether to download the stage 1 and 2 compilers from CI. This is useful if you
# are working on tools, doc-comments, or library (you will be able to build the
# standard library without needing to build the compiler).
#
# Set this to "if-unchanged" if you are working on `src/tools`, `tests` or
# `library` (on CI, `library` changes triggers in-tree compiler build) to speed
# up the build process if you don't need to build a compiler from the latest
# commit from `master`.
#
# Set this to `true` to always download or `false` to always use the in-tree
# compiler.
rust.download-rustc = false
# Number of codegen units to use for each compiler invocation. A value of 0
# means "the number of cores on this machine", and 1+ is passed through to the
# compiler.
#
# Uses the rustc defaults: https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units
rust.codegen-units = 1
# Sets the number of codegen units to build the standard library with,
# regardless of what the codegen-unit setting for the rest of the compiler is.
# NOTE: building with anything other than 1 is known to occasionally have bugs.
rust.codegen-units-std = 1
# Whether or not debug assertions are enabled for the compiler and standard library.
# These can help find bugs at the cost of a small runtime slowdown.
#
# Defaults to rust.debug value
rust.debug-assertions = false
# Whether or not debug assertions are enabled for the standard library.
# Overrides the `debug-assertions` option, if defined.
#
# Defaults to rust.debug-assertions value
rust.debug-assertions-std = false
# Whether or not debug assertions are enabled for the tools built by bootstrap.
# Overrides the `debug-assertions` option, if defined.
#
# Defaults to rust.debug-assertions value
rust.debug-assertions-tools = false
# Whether or not to leave debug! and trace! calls in the rust binary.
#
# Defaults to rust.debug-assertions value
#
# If you see a message from `tracing` saying "some trace filter directives would enable traces that
# are disabled statically" because `max_level_info` is enabled, set this value to `true`.
rust.debug-logging = false
# Whether or not to build rustc, tools and the libraries with randomized type layout
rust.randomize-layout = false
# Whether or not overflow checks are enabled for the compiler and standard
# library.
#
# Defaults to rust.debug value
rust.overflow-checks = false
# Whether or not overflow checks are enabled for the standard library.
# Overrides the `overflow-checks` option, if defined.
#
# Defaults to rust.overflow-checks value
rust.overflow-checks-std = false
# Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`.
# See https://doc.rust-lang.org/rustc/codegen-options/index.html#debuginfo for available options.
#
# Can be overridden for specific subsets of Rust code (rustc, std or tools).
# Debuginfo for tests run with compiletest is not controlled by this option
# and needs to be enabled separately with `debuginfo-level-tests`.
#
# Note that debuginfo-level = 2 generates several gigabytes of debuginfo
# and will slow down the linking process significantly.
rust.debuginfo-level = 0
# Debuginfo level for the compiler.
rust.debuginfo-level-rustc = 0
# Debuginfo level for the standard library.
rust.debuginfo-level-std = 0
# Debuginfo level for the tools.
rust.debuginfo-level-tools = 0
# Debuginfo level for the test suites run with compiletest.
# FIXME(#61117): Some tests fail when this option is enabled.
#rust.debuginfo-level-tests = 0 <omitted>
# Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
rust.backtrace = true
# Whether to always use incremental compilation when building rustc
rust.incremental = false
# The default linker that will be hard-coded into the generated
# compiler for targets that don't specify a default linker explicitly
# in their target specifications. Note that this is not the linker
# used to link said compiler. It can also be set per-target (via the
# `[target.<triple>]` block), which may be useful in a cross-compilation
# setting.
#
# See https://doc.rust-lang.org/rustc/codegen-options/index.html#linker for more information.
#rust.default-linker = <default>
# The "channel" for the Rust build to produce. The stable/beta channels only
# allow using stable features, whereas the nightly and dev channels allow using
# nightly features.
#
# You can set the channel to "auto-detect" to load the channel name from `src/ci/channel`.
#
# If using tarball sources, default value is "auto-detect", otherwise, it's "dev".
rust.channel = "auto-detect"
# The root location of the musl installation directory. The library directory
# will also need to contain libunwind.a for an unwinding implementation. Note
# that this option only makes sense for musl targets that produce statically
# linked binaries.
#
# Defaults to /usr on musl hosts. Has no default otherwise.
#rust.musl-root = <not required>
# By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
# platforms to ensure that the compiler is usable by default from the build
# directory (as it links to a number of dynamic libraries). This may not be
# desired in distributions, for example.
rust.rpath = true
# Additional flags to pass to `rustc`.
# Takes precedence over bootstrap's own flags but not over per target rustflags nor env. vars. like RUSTFLAGS.
# Applies to all stages and targets.
#
#rust.rustflags = []
# Indicates whether symbols should be stripped using `-Cstrip=symbols`.
rust.strip = true
# Forces frame pointers to be used with `-Cforce-frame-pointers`.
# This can be helpful for profiling at a small performance cost.
rust.frame-pointers = false
# Indicates whether stack protectors should be used
# via the unstable option `-Zstack-protector`.
#
# Valid options are : `none`(default),`basic`,`strong`, or `all`.
# `strong` and `basic` options may be buggy and are not recommended, see rust-lang/rust#114903.
rust.stack-protector = "none"
# Prints each test name as it is executed, to help debug issues in the test harness itself.
rust.verbose-tests = false
# Flag indicating whether tests are compiled with optimizations (the -O flag).
rust.optimize-tests = true
# Flag indicating whether codegen tests will be run or not. If you get an error
# saying that the FileCheck executable is missing, you may want to disable this.
# Also see the target's llvm-filecheck option.
rust.codegen-tests = false
# Flag indicating whether git info will be retrieved from .git automatically.
# Having the git information can cause a lot of rebuilds during development.
rust.omit-git-hash = false
# Whether to create a source tarball by default when running `x dist`.
#
# You can still build a source tarball when this is disabled by explicitly passing `x dist rustc-src`.
rust.dist-src = false
# After building or testing an optional component (e.g. the nomicon or reference), append the
# result (broken, compiling, testing) into this JSON file.
#rust.save-toolstates = <none> (path)
# This array serves three distinct purposes:
# - Backends in this list will be automatically compiled and included in the sysroot of each
# rustc compiled by bootstrap.
# - The first backend in this list will be configured as the **default codegen backend** by each
# rustc compiled by bootstrap. In other words, if the first backend is e.g. cranelift, then when
# we build a stage 1 rustc, it will by default compile Rust programs using the Cranelift backend.
# This also means that stage 2 rustc would get built by the Cranelift backend.
# - Running `x dist` (without additional arguments, or with `--include-default-paths`) will produce
# a dist component/tarball for the Cranelift backend if it is included in this array.
#
# Note that the LLVM codegen backend is special and will always be built and distributed.
#
# Currently, the only standard options supported here are `"llvm"`, `"cranelift"` and `"gcc"`.
rust.codegen-backends = ["llvm"]
# Indicates whether LLD will be compiled and made available in the sysroot for rustc to execute,
rust.lld = false
# Indicates if we should override the linker used to link Rust crates during bootstrap to be LLD.
# If set to `true` or `"external"`, a global `lld` binary that has to be in $PATH
# will be used.
# If set to `"self-contained"`, rust-lld from the snapshot compiler will be used.
#
# On MSVC, LLD will not be used if we're cross linking.
#
# Explicitly setting the linker for a target will override this option when targeting MSVC.
rust.bootstrap-override-lld = false
# Indicates whether some LLVM tools, like llvm-objdump, will be made available in the
# sysroot.
rust.llvm-tools = false
# Indicates whether the `self-contained` llvm-bitcode-linker, will be made available
# in the sysroot. It is required for running nvptx tests.
rust.llvm-bitcode-linker = false
# Whether to deny warnings in crates. Set to `false` to avoid
# error: warnings are denied by `build.warnings` configuration
rust.deny-warnings = false
# Print backtrace on internal compiler errors during bootstrap
rust.backtrace-on-ice = false
# Whether to verify generated LLVM IR
rust.verify-llvm-ir = false
# Compile the compiler with a non-default ThinLTO import limit. This import
# limit controls the maximum size of functions imported by ThinLTO. Decreasing
# will make code compile faster at the expense of lower runtime performance.
#rust.thin-lto-import-instr-limit = <default>
# Map debuginfo paths to `/rust/$sha/...`.
# Useful for reproducible builds. Generally only set for releases
rust.remap-debuginfo = true
# Link the compiler and LLVM against `jemalloc` instead of the default libc allocator.
# This option is only tested on Linux and OSX. It can also be configured per-target in the
# [target.<tuple>] section.
rust.jemalloc = false
# Run tests in various test suites with the "nll compare mode" in addition to
# running the tests in normal mode. Largely only used on CI and during local
# development of NLL
rust.test-compare-mode = false
# Global default for llvm-libunwind for all targets. See the target-specific
# documentation for llvm-libunwind below. Note that the target-specific
# option will override this if set.
rust.llvm-libunwind = 'system'
# Enable symbol-mangling-version v0. This can be helpful when profiling rustc,
# as generics will be preserved in symbols (rather than erased into opaque T).
# When no setting is given, the new scheme will be used when compiling the
# compiler and its tools and the legacy scheme will be used when compiling the
# standard library.
# If an explicit setting is given, it will be used for all parts of the codebase.
rust.new-symbol-mangling = true
# Size limit in bytes for move/copy annotations (-Zannotate-moves). Only types
# at or above this size will be annotated. If not specified, uses the default
# limit (65 bytes).
#rust.annotate-moves-size-limit = <default>
# Select LTO mode that will be used for compiling rustc. By default, thin local LTO
# (LTO within a single crate) is used (like for any Rust crate). You can also select
# "thin" or "fat" to apply Thin/Fat LTO to the `rustc_driver` dylib, or "off" to disable
# LTO entirely.
rust.lto = "thin-local"
# Build compiler with the optimization enabled and -Zvalidate-mir, currently only for `std`
#rust.validate-mir-opts = 3
# Configure `std` features used during bootstrap.
#
# Default features will be expanded in the following cases:
# - If `rust.llvm-libunwind` or `target.llvm-libunwind` is enabled:
# - "llvm-libunwind" will be added for in-tree LLVM builds.
# - "system-llvm-libunwind" will be added for system LLVM builds.
# - If `rust.backtrace` is enabled, "backtrace" will be added.
# - If `rust.profiler` or `target.profiler` is enabled, "profiler" will be added.
# - If building for a zkvm target, "compiler-builtins-mem" will be added.
#
# Since libstd also builds libcore and liballoc as dependencies and all their features are mirrored
# as libstd features, this option can also be used to configure features such as optimize_for_size.
#rust.std-features = <default>
# Set the number of threads for the compiler frontend used during compilation of Rust code (passed to `-Zthreads`).
# The valid options are:
# 0 - Set the number of threads according to the detected number of threads of the host system
# 1 - Use a single thread for compilation of Rust code (the default)
# N - Number of threads used for compilation of Rust code
#
rust.parallel-frontend-threads = 1
[target.x86_64-unknown-linux-musl]
llvm-libunwind = "system"
crt-static = false
musl-libdir = "/lib/x86_64-semios-linux"
[target.aarch64-unknown-linux-musl]
llvm-libunwind = "system"
crt-static = false
musl-libdir = "/lib/aarch64-semios-linux"
[target.riscv64-unknown-linux-musl]
llvm-libunwind = "system"
crt-static = false
musl-libdir = "/lib/riscv64-semios-linux"
+77
View File
@@ -0,0 +1,77 @@
import os
import shutil
import subprocess
from lib.make import *
from lib import arch
upstream_version = "1.97.1"
version(upstream_version)
description("A language empowering everyone to build reliable and efficient software")
maintainer("sisungo <[email protected]>")
source_url(f"https://static.rust-lang.org/dist/rustc-{upstream_version}-src.tar.xz")
builddep("shortcut/cmake")
builddep("shortcut/c++")
builddep("python")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep(f"linux-dev @{arch.get_target()}")
builddep(f"libunwind-dev @{arch.get_target()}")
builddep("curl")
builddep("grep")
builddep("sed")
def setup_musl_root():
os.makedirs("../musl_root/lib", exist_ok=True)
for i in ["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o", "libunwind.a"]:
shutil.copy2(f"/lib/{arch.get_target()}/{i}", f"../musl_root/lib/{i}")
def configure():
with open("../../bootstrap.toml.in") as file:
content = file.read()
content = content.replace("%RUSTVERSION%", upstream_version)
content = content.replace("%CARGOPATH%", shutil.which("cargo") or "cargo")
content = content.replace("%RUSTCPATH%", shutil.which("rustc") or "rustc")
content = content.replace("%INSTALLPREFIX%", get_prefix("rust"))
content = content.replace("%MUSLROOT%", os.getcwd() + "/../musl_root")
with open("bootstrap.toml", "wt+") as file:
file.write(content)
def run_build():
subprocess.run(["python3", "x.py", "build"], check=True)
def run_install():
os.environ["DESTDIR"] = os.getcwd() + "/../install_destdir"
subprocess.run(["python3", "x.py", "install"], check=True)
os.chdir(os.environ["DESTDIR"])
# FIXME: Rust seemed not to process our directory name correctly, it is installed to pkg/rust.
os.chdir("pkg/rust")
def build():
setup_musl_root()
configure()
run_build()
run_install()
on_build(build)
def pack_rust(composer):
composer.makedir("lib")
composer.makedir("bin")
for i in os.listdir("."):
if ".so" in i:
composer.addfile(i, f"lib/{i}")
elif i in ["rustc", "rust-gdb", "rust-gdbgui", "rust-lldb", "rustdoc"]:
composer.addfile(i, f"bin/{i}")
composer.add_dir("rustlib", "lib/rustlib")
package("rust")
dep("semi-libc @same-arch")
dep("libz @same-arch")
dep("libcxx @same-arch")
on_pack(pack_rust)
+30
View File
@@ -0,0 +1,30 @@
import subprocess
from lib.make import *
version("15.1.1")
description("SemiOS fork of the UNIX sed utility")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/sed/archive/v15.1.1.tar.gz")
builddep("shortcut/c")
builddep(f"libpcre2-dev @{arch.get_target()}")
builddep("pcre2-tools")
def build():
subprocess.run(["./build.sh"])
on_build(build)
def pack_sed(composer):
composer.makedir("bin")
composer.addfile("sed", "bin/sed")
package("sed")
dep("semi-libc @same-arch")
dep("libpcre2 @same-arch")
on_pack(pack_sed)
+21 -8
View File
@@ -1,21 +1,34 @@
from lib.cpp import *
from lib import arch, cpp
from lib.make import *
source_url("https://gitea.semilabs.org/semios/semi-libc/archive/v1.2.5.tar.gz")
version("1.2.5")
version("1.2.6+1")
description("the SemiOS fork of musl-libc, providing POSIX C standard library and system runtime")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/semi-libc/archive/v1.2.6-1.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
configure(["--prefix=/"])
make()
make_install()
cpp.configure(["--prefix=/"])
cpp.make()
cpp.make_install()
on_build(build)
def musl_target():
return arch.get_target().split("-")[0]
package("semi-libc")
use_auto_pack(["lib"])
cpp.use_auto_pack(["lib"])
link("lib/libc.so", f"/lib/ld-musl-{musl_target()}.so.1")
link("lib/libc.so", "/bin/ldd")
package("semi-libc-dev")
use_auto_pack(["dev"])
cpp.use_auto_pack(["dev"])
dep("semi-libc (same)")
Binary file not shown.
+46
View File
@@ -0,0 +1,46 @@
import os
from lib.make import *
from lib import arch
def deplinux(s):
if "linux" in arch.get_target():
dep(s)
version("1.0.0")
maintainer("sisungo <[email protected]>")
source_url(f"file://{os.getcwd()}/empty.tar")
on_build(lambda: print("Building virtual package `semios-assembly`..."))
package("SemiOS.Assembly.CoreRuntime")
description("Assembly of the core SemiOS runtime")
deplinux("semi-libc @same-arch")
deplinux("libgcc-compat @same-arch")
dep("libunwind @same-arch")
dep("mksh @same-arch")
dep("coreutils @same-arch")
dep("findutils @same-arch")
dep("diffutils @same-arch")
dep("grep @same-arch")
dep("packie @same-arch")
dep("iana-timezone-db")
on_pack(lambda _: print("Packing virtual package `SemiOS.Assembly.CoreRuntime`..."))
package("SemiOS.Assembly.Cli")
description("Assembly of core SemiOS command-line experience")
dep("less @same-arch")
dep("ncurses-tools @same-arch")
dep("ncurses-terminfo")
dep("mandoc @same-arch")
dep("neatvi @same-arch")
on_pack(lambda _: print("Packing virtual package `SemiOS.Assembly.Cli`..."))
package("SemiOS.Assembly.Networking")
description("Assembly of SemiOS core networking experience")
dep("aws-lc-libssl @same-arch")
dep("aws-lc-tools @same-arch")
dep("ca-certificates")
dep("certutil @same-arch")
deplinux("iproute2 @same-arch")
on_pack(lambda _: print("Packing virtual package `SemiOS.Assembly.Networking`..."))
+44
View File
@@ -0,0 +1,44 @@
import os
import lib.cpp as cpp
from lib.make import *
version("3.53.4")
description("a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine")
maintainer("sisungo <[email protected]>")
source_url("https://sqlite.org/2026/sqlite-autoconf-3530400.tar.gz")
builddep("shortcut/autotools")
builddep("shortcut/c")
builddep("linenoise-dev")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libsqlite')}/lib",
f"--bindir={get_prefix('sqlite')}/bin",
f"--includedir={get_prefix('libsqlite-dev')}/include",
"--all",
"--with-linenoise=/pkg/linenoise-dev=2.0@any",
"--icu-collations",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("libsqlite")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("sqlite")
cpp.use_auto_pack(["bin"])
dep("libsqlite (same)")
package("libsqlite-dev")
cpp.use_auto_pack(["dev"])
dep("libsqlite (same)")
+325
View File
@@ -0,0 +1,325 @@
import os
from lib.make import *
from lib import cpp
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("gettext")
builddep("bash")
builddep(f"linux-dev @{arch.get_target()}")
builddep(f"libintl-dev @{arch.get_target()}")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep(f"libncurses-dev @{arch.get_target()}")
version("2.42.2")
description("a random collection of Linux utilities")
maintainer("sisungo <[email protected]>")
source_url("https://www.kernel.org/pub/linux/utils/util-linux/v2.42/util-linux-2.42.2.tar.xz")
def build():
cpp.configure([
"--prefix=/",
"--enable-fs-paths-default=/bin",
"--disable-su",
"--disable-sulogin",
"--disable-chfn-chsh",
"--disable-login",
"--without-systemd",
"--disable-makeinstall-setuid",
"--disable-makeinstall-chown",
"--disable-makeinstall-tty-setgid",
])
cpp.make()
cpp.make_install()
on_build(build)
def fix_pc(libname: str):
pkgname_lib = f"lib{libname}"
pkgname_dev = f"lib{libname}-dev"
pc_path = f"lib/pkgconfig/{libname}.pc"
with open(pc_path, "r") as file:
pc_content = file.read()
pc_content = pc_content.replace(
"libdir=//lib", f"libdir={get_prefix(pkgname_lib)}/lib"
).replace(
"includedir=//include", f"includedir={get_prefix(pkgname_dev)}/include"
)
with open(pc_path, "wt") as file:
file.write(pc_content)
def pack_lib(composer, name):
composer.makedir("lib")
for i in os.listdir("lib"):
if name in i and "so" in i:
composer.addfile(f"lib/{i}", f"lib/{i}")
def pack_dev(composer, name):
fix_pc(name)
composer.makedir("lib")
for i in os.listdir("lib"):
if name in i and "so" not in i:
composer.addfile(f"lib/{i}", f"lib/{i}")
composer.makedir("lib/pkgconfig")
composer.addfile(f"lib/pkgconfig/{name}.pc", f"lib/pkgconfig/{name}.pc")
composer.makedir("include")
for i in os.listdir("include"):
if name in i:
composer.add_dir(f"include/{i}", f"include/{i}")
def pack_bin(composer, list):
composer.makedir("bin")
for i in list:
if i.startswith("sbin/"):
i = i.replace("sbin/", "")
composer.addfile(f"sbin/{i}", f"bin/{i}")
else:
composer.addfile(f"bin/{i}", f"bin/{i}")
package("libblkid")
dep("semi-libc @same-arch")
on_pack(lambda composer: pack_lib(composer, "blkid"))
package("libblkid-dev")
dep("libblkid (same)")
on_pack(lambda composer: pack_dev(composer, "blkid"))
package("libfdisk")
dep("libuuid (same)")
dep("libblkid (same)")
on_pack(lambda composer: pack_lib(composer, "fdisk"))
package("libfdisk-dev")
dep("libfdisk (same)")
on_pack(lambda composer: pack_dev(composer, "fdisk"))
package("libmount")
dep("libblkid (same)")
on_pack(lambda composer: pack_lib(composer, "mount"))
package("libmount-dev")
dep("libmount (same)")
on_pack(lambda composer: pack_dev(composer, "mount"))
package("libsmartcols")
dep("semi-libc @same-arch")
on_pack(lambda composer: pack_lib(composer, "smartcols"))
package("libsmartcols-dev")
dep("libsmartcols (same)")
on_pack(lambda composer: pack_dev(composer, "smartcols"))
package("libuuid")
dep("semi-libc @same-arch")
on_pack(lambda composer: pack_lib(composer, "uuid"))
package("libuuid-dev")
dep("libuuid (same)")
on_pack(lambda composer: pack_dev(composer, "uuid"))
package("util-linux-swap")
dep("libblkid (same)")
dep("libmount (same)")
dep("libsmartcols (same)")
on_pack(lambda composer: pack_bin(composer, ["sbin/swaplabel", "sbin/swapoff", "sbin/swapon", "sbin/mkswap"]))
package("util-linux-mount")
provide("mount")
dep("libmount (same)")
on_pack(lambda composer: pack_bin(composer, ["mount", "umount"]))
package("util-linux-fdisk")
provide("fdisk")
dep("libfdisk (same)")
dep("libsmartcols (same)")
dep("libncurses @same-arch")
on_pack(lambda composer: pack_bin(composer, ["sbin/fdisk"]))
package("util-linux-sfdisk")
provide("sfdisk")
dep("libfdisk (same)")
dep("libsmartcols (same)")
dep("libncurses @same-arch")
on_pack(lambda composer: pack_bin(composer, ["sbin/sfdisk"]))
package("util-linux-cfdisk")
provide("cfdisk")
dep("libfdisk (same)")
dep("libsmartcols (same)")
dep("libncurses @same-arch")
on_pack(lambda composer: pack_bin(composer, ["sbin/cfdisk"]))
package("util-linux-mkfs")
dep("semi-libc @same-arch")
dep("libz @same-arch")
provide("mkfs")
on_pack(lambda composer: pack_bin(composer, ["sbin/mkfs", "sbin/mkfs.bfs", "sbin/mkfs.cramfs", "sbin/mkfs.minix"]))
package("util-linux-fsck")
dep("libmount (same)")
dep("libblkid (same)")
dep("libz @same-arch")
provide("fsck")
on_pack(lambda composer: pack_bin(composer, ["sbin/fsck", "sbin/fsck.cramfs", "sbin/fsck.minix"]))
package("util-linux-fs")
dep("libblkid (same)")
dep("libsmartcols (same)")
dep("libmount (same)")
on_pack(lambda composer: pack_bin(composer, [
"sbin/addpart",
"sbin/resizepart",
"sbin/delpart",
"sbin/partx",
"sbin/losetup",
"sbin/blkdiscard",
"sbin/blkid",
"sbin/blkpr",
"sbin/blkzone",
"sbin/blockdev",
"sbin/findfs",
"sbin/fsfreeze",
"sbin/fstrim",
"copyfilerange",
"exch",
"fadvise",
"fallocate",
"fincore",
"flock",
"getino",
"hardlink",
"mountpoint",
"namei",
"rename",
"whereis",
"sbin/pivot_root",
"sbin/switch_root",
"sbin/wipefs",
"sbin/zramctl",
"findmnt",
]))
package("util-linux-security")
dep("libsmartcols (same)")
dep("libmount (same)")
on_pack(lambda composer: pack_bin(composer, [
"utmpdump",
"unshare",
"last",
"lastb",
"nsenter",
"lsns",
"sbin/nologin",
]))
package("util-linux-proc")
dep("libsmartcols (same)")
dep("semi-libc @same-arch")
on_pack(lambda composer: pack_bin(composer, [
"uclampset",
"waitpid",
"setsid",
"setpgid",
"taskset",
"chrt",
"coresched",
"prlimit",
"renice",
"ionice",
]))
package("util-linux-text")
dep("libncurses @same-arch")
dep("libsmartcols (same)")
on_pack(lambda composer: pack_bin(composer, [
"bits",
"cal",
"colcrt",
"colrm",
"column",
"getopt",
"hexdump",
"look",
"mcookie",
"rev",
"ul",
]))
package("util-linux-term")
dep("libncurses @same-arch")
on_pack(lambda composer: pack_bin(composer, [
"setterm",
"mesg",
"script",
"scriptlive",
"scriptreplay",
"wall",
"sbin/agetty",
"sbin/ldattach",
]))
package("util-linux-ipc")
dep("libmount (same)")
dep("libsmartcols (same)")
on_pack(lambda composer: pack_bin(composer, [
"ipcmk",
"ipcrm",
"ipcs",
"lslocks",
"pipesz",
"dmesg",
]))
package("util-linux-hardware")
dep("libsmartcols (same)")
dep("libncurses @same-arch")
on_pack(lambda composer: pack_bin(composer, [
"irqtop",
"lsirq",
"lsmem",
"wdctl",
"sbin/hwclock",
"sbin/readprofile",
"sbin/rfkill",
"sbin/rtcwake",
]))
package("isosize")
dep("semi-libc @same-arch")
on_pack(lambda composer: pack_bin(composer, ["isosize"]))
package("util-linux-arch")
dep("semi-libc @same-arch")
on_pack(lambda composer: pack_bin(composer, ["setarch", "uname26", "linux32", "linux64"]))
package("util-linux-uuid")
dep("libuuid (same)")
dep("libsmartcols (same)")
on_pack(lambda composer: pack_bin(composer, [
"uuidgen",
"uuidparse",
"sbin/uuidd",
]))
package("util-linux")
dep("util-linux-swap (same)")
dep("util-linux-mount (same)")
dep("util-linux-fdisk (same)")
dep("util-linux-sfdisk (same)")
dep("util-linux-cfdisk (same)")
dep("util-linux-mkfs (same)")
dep("util-linux-fsck (same)")
dep("util-linux-fs (same)")
dep("util-linux-security (same)")
dep("util-linux-proc (same)")
dep("util-linux-text (same)")
dep("util-linux-term (same)")
dep("util-linux-ipc (same)")
dep("util-linux-hardware (same)")
dep("isosize (same)")
dep("util-linux-arch (same)")
dep("util-linux-uuid (same)")
on_pack(lambda _composer: None)
+50
View File
@@ -0,0 +1,50 @@
from lib import cpp
from lib.make import *
upstream_version = "9.2.782"
version(upstream_version)
description("vim, a greatly improved version of the good old UNIX editor Vi")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/vim/vim/archive/refs/tags/v9.2.0782.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"libncurses-dev @{arch.get_target()}")
def build():
cpp.configure(
[
"--prefix=/",
f"--bindir={get_prefix('vim')}/bin",
"--datarootdir=/share",
f"--datadir={get_prefix('vim-data')}/share",
"--enable-terminal",
"--enable-autoservername",
"--enable-multibyte",
"--disable-nls",
]
)
cpp.make()
cpp.make_install()
on_build(build)
def pack_data(composer):
composer.makedirs("share/vim")
composer.add_dir("share/vim/vim92", "share/vim/vim92")
package("vim-data")
arch_any()
on_pack(pack_data)
package("vim")
dep("semi-libc @same-arch")
dep("libncurses @same-arch")
dep(f"vim-data (={upstream_version}) @any")
cpp.use_auto_pack(["bin"])
link("bin/vim", "/bin/vi")
+43
View File
@@ -0,0 +1,43 @@
import os
from lib import cpp
from lib.make import *
version("5.8.3")
description("a general-purpose LZMA data-compression library plus command-line tools")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz"
)
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
os.environ["FGREP"] = "grep -F"
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('liblzma')}/lib",
f"--bindir={get_prefix('xz')}/bin",
f"--includedir={get_prefix('liblzma-dev')}/include",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("liblzma")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("xz")
cpp.use_auto_pack(["bin"])
dep("liblzma (same)")
package("liblzma-dev")
cpp.use_auto_pack(["dev"])
dep("liblzma (same)")
+34
View File
@@ -0,0 +1,34 @@
import os
import lib.cpp as cpp
from lib.make import *
version("2.3.3")
description("zlib replacement with optimizations for next generation systems")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.3.3.tar.gz")
builddep("shortcut/c++")
def build():
cpp.cmake(["-DZLIB_COMPAT=ON", "-DINSTALL_UTILS=ON"])
cpp.ninja()
cpp.ninja_install()
on_build(build)
package("libz-ng")
cpp.use_auto_pack(["lib"])
provide("libz@same-arch")
dep("semi-libc @same-arch")
package("zlib-ng-tools")
cpp.use_auto_pack(["bin"])
dep("libz-ng (same)")
package("libz-ng-dev")
cpp.use_auto_pack(["dev"])
dep("libz-ng (same)")
provide("libz-dev@same-arch")
+32
View File
@@ -0,0 +1,32 @@
import lib.cpp as cpp
from lib.make import *
version("1.5.7")
description("Zstandard - Fast real-time compression algorithm")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
)
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.make(["HAVE_ZLIB=0", "HAVE_LZMA=0", "HAVE_LZ4=0"])
cpp.make_install()
on_build(build)
package("libzstd")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("zstd")
cpp.use_auto_pack(["bin"])
dep("libzstd (same)")
package("libzstd-dev")
cpp.use_auto_pack(["dev"])
dep("libzstd (same)")
+168 -13
View File
@@ -3,10 +3,13 @@ import importlib
import os
import shutil
import sys
import typing
import hooks
import lib.arch
import lib.atombuild
import lib.make
import lib.packie
import lib.pkgcomposer
import lib.sources
@@ -19,8 +22,19 @@ argparser = argparse.ArgumentParser(
argparser.add_argument(
"--target", type=str, help="Target architecture to build the package for"
)
argparser.add_argument("--build", type=str, help="Package to build")
argparser.add_argument("--clean", type=str, help="Package to clean")
argparser.add_argument("--atombuild", action="store_true", help="Enable Atom Build")
subparsers = argparser.add_subparsers(dest="subcommand")
parser_build = subparsers.add_parser("build")
parser_build.add_argument("BUILD_PKGNAME")
parser_clean = subparsers.add_parser("clean")
parser_clean.add_argument("CLEAN_PKGNAME", nargs="*")
parser_clean.add_argument("--all", action="store_true")
parser_clean.add_argument("--no-artifacts", action="store_true")
parser_list = subparsers.add_parser("list")
parser_list.add_argument("ITEM", choices=("all", "built", "new"))
parser_repo_push = subparsers.add_parser("repo-push")
parser_repo_push.add_argument("REPO_DIR")
parser_repo_push.add_argument("REPO_PUSH_PKGNAME", nargs="*")
args = argparser.parse_args()
if args.target:
@@ -29,7 +43,19 @@ else:
lib.arch.set_target(lib.arch.get_target())
def run_build_package(package: str):
def run_hooks(map, arg: typing.Any = None):
current_dir = os.getcwd()
for n in map.keys():
if n in lib.make._blocked_hooks:
continue
if arg:
map[n](arg)
else:
map[n]()
os.chdir(current_dir)
def cmd_build_package(package: str):
try:
os.chdir(f"packages/{package}")
os.makedirs("target", exist_ok=True)
@@ -46,6 +72,12 @@ def run_build_package(package: str):
print(f"Architecture {lib.arch.get_target()} is not supported for this package")
exit(1)
if os.environ.get("SEMIOS_PKGBUILD_IN_ATOMIC", "0") == "1":
lib.packie.install(lib.make._builddep)
# Run `pre_build` hooks
run_hooks(hooks.pre_build)
# Build the package
if lib.make._on_build:
os.chdir(lib.sources.sources_dir_name())
@@ -54,13 +86,12 @@ def run_build_package(package: str):
print("on_build(): Not defined")
# Run `post_build` hooks
for n in hooks.post_build.keys():
if n in lib.make._blocked_hooks:
continue
hooks.post_build[n]()
run_hooks(hooks.post_build)
# Pack packages
for pkgname in lib.make._pkginfo.keys():
lib.make._current_pkgname = pkgname
if pkgname == lib.make._key_global:
continue
@@ -80,23 +111,147 @@ def run_build_package(package: str):
pkginfo[lib.make._key_on_pack](composer)
# Run post_pack hooks
run_hooks(hooks.post_pack, composer)
manifest = {
"name": pkgname,
"version": pkgver,
"arch": pkgarch,
"description": pkginfo[lib.make._key_description],
"dependencies": pkginfo[lib.make._key_dependencies],
"provides": pkginfo[lib.make._key_provides],
"recommendations": pkginfo[lib.make._key_recommendations],
}
composer.write_manifest(manifest)
composer.write_links(pkginfo[lib.make._key_links])
composer.compose()
# Build success
with open(f"{package_dir}/target/build-ok.tag", "wt+") as file:
file.write("OK")
def run_clean_package(package: str):
def cmd_clean_package(package: list[str]):
for i in package:
targetdir = f"packages/{i}/target"
if not os.path.exists(targetdir):
continue
if args.no_artifacts:
for file in os.listdir(targetdir):
path = f"{targetdir}/{file}"
if file.endswith(".pkg") or file == "build-ok.tag":
continue
if os.path.isfile(path) or os.path.islink(path):
os.remove(path)
else:
shutil.rmtree(path)
else:
shutil.rmtree(targetdir)
def do_list(item: str):
if item == "all":
for i in os.listdir("packages"):
if i.startswith("."):
continue
yield i
elif item == "built":
for i in os.listdir("packages"):
if i.startswith("."):
continue
if os.path.exists(f"packages/{i}/target/build-ok.tag"):
yield i
elif item == "new":
for i in os.listdir("packages"):
if i.startswith("."):
continue
try:
pkgbuild_mtime = os.path.getmtime(f"packages/{i}/pkgbuild.py")
target_mtime = os.path.getmtime(f"packages/{i}/target/build-ok.tag")
if target_mtime < pkgbuild_mtime:
yield i
except Exception:
yield i
def cmd_list(item):
for i in do_list(item):
print(i)
def cmd_build_atom(pkgname: str):
# Declare necessary paths
repo_root = os.getcwd()
package_dir = f"{repo_root}/packages/{pkgname}"
target_dir = f"{package_dir}/target"
build_env_root = f"{target_dir}/atombuild_root"
# Read `pkgbuild.py` of that package
lib.make._in_atombuild = True
try:
shutil.rmtree(f"packages/{package}/target")
os.chdir(package_dir)
os.makedirs(target_dir, exist_ok=True)
except Exception:
print(f"No such package {pkgname}")
exit(1)
importlib.import_module(f"packages.{pkgname}.pkgbuild")
os.chdir(repo_root)
# Initialize build environment
lib.atombuild.prepare_build_env(build_env_root, lib.make._builddep)
lib.atombuild.copy_pkgbuild_tree(repo_root, pkgname, build_env_root)
lib.atombuild.enter_build_env(
build_env_root,
["./x", "--target", lib.arch.get_target(), "build", pkgname],
chdir="/Atom",
)
# Copy artifacts
atom_target_dir = f"{build_env_root}/Atom/packages/{pkgname}/target"
try:
for i in os.listdir(atom_target_dir):
if i.endswith(".pkg"):
shutil.copy2(f"{atom_target_dir}/{i}", f"{target_dir}/{i}")
except Exception:
pass
# Build success
with open(f"{target_dir}/build-ok.tag", "wt+") as file:
file.write("OK")
if args.build:
run_build_package(args.build)
if args.clean:
run_clean_package(args.clean)
def cmd_repo_push(repo_dir: str, pkgname: list[str]):
for pkg in pkgname:
targetdir = f"packages/{pkg}/target"
if not os.path.exists(targetdir):
print(f"error: failed to add '{pkg}': package is not built")
continue
for target_file in os.listdir(targetdir):
if not target_file.endswith(".pkg"):
continue
try:
lib.packie.repo_add(repo_dir, f"{targetdir}/{target_file}")
except:
print(f"error: failed to add '{pkg}': see the output above")
if args.subcommand == "build":
if args.atombuild:
cmd_build_atom(args.BUILD_PKGNAME)
else:
cmd_build_package(args.BUILD_PKGNAME)
elif args.subcommand == "clean":
if args.all:
pkgs = os.listdir("packages")
else:
pkgs = args.CLEAN_PKGNAME
cmd_clean_package(pkgs)
elif args.subcommand == "list":
cmd_list(args.ITEM)
elif args.subcommand == "repo-push":
cmd_repo_push(args.REPO_DIR, args.REPO_PUSH_PKGNAME)
else:
print("error: no action specified", file=sys.stderr)
exit(1)