blob: b6e44c526adbe01c8d9808ac530bfc8549faa7d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
# Maintainer: honjow
pkgname=sk-chos-addon
_basename=sk-chos-tool
_reponame=sk-chos-config
_pkgname=${pkgname}
pkgver=1.24.3
pkgrel=1
pkgdesc="Addon for sk-chimeros"
arch=('any')
url="https://github.com/honjow/sk-holoiso-config.git"
license=('MIT')
makedepends=('git')
depends=(
amdgpu-test-scripts-common-git
amd-s2idle-analysis-script-git
cage
expect
efibootmgr
fpaste
fzf
glow
gnu-efi
gum
just
libcec
man-db
python-systemd
refind
wlr-randr
zram-generator
)
provides=(sk-chos-addon)
conflicts=(sk-chos-addon-git)
replaces=(sk-chos-addon-git)
source=("$pkgname-$pkgver.tar.gz::https://github.com/honjow/sk-holoiso-config/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('SKIP')
options=(!strip)
backup=('etc/sk-chos-tool/github_cdn.conf')
install=sk-chos-addon.install
prepare() {
source_dir="${srcdir}/${_reponame}-${pkgver}/src/chimeraos-addon"
cd "${source_dir}/share/sk-chos/completions"
./gen.sh
}
package() {
source_dir="${srcdir}/${_reponame}-${pkgver}/src/chimeraos-addon"
# bin
install -dm755 "${pkgdir}/usr/bin/"
install -m755 -t "${pkgdir}/usr/bin/" "${source_dir}/bin"/*
# 复制软链接 覆盖
find "${source_dir}/bin" -maxdepth 1 -type l -exec cp -P -f {} "${pkgdir}/usr/bin/" \;
# conf
install -dm755 "${pkgdir}/etc/${_basename}"
install -m644 -t "${pkgdir}/etc/${_basename}" "${source_dir}/etc/${_basename}"/*.conf
# fonts conf
install -dm755 "${pkgdir}/etc/fonts/conf.d"
install -m644 -t "${pkgdir}/etc/fonts/conf.d" "${source_dir}/etc/fonts/conf.d"/*.conf
# sk-chos
install -dm755 "${pkgdir}/etc/sk-chos"
install -m644 -t "${pkgdir}/etc/sk-chos" "${source_dir}/etc/sk-chos"/*
# sysctl
install -dm755 "${pkgdir}/etc/sysctl.d"
install -m644 -t "${pkgdir}/etc/sysctl.d" "${source_dir}/etc/sysctl.d"/*
# etc systemd
install -dm755 "${pkgdir}/etc/systemd"
install -m644 -t "${pkgdir}/etc/systemd" "${source_dir}/etc/systemd"/*.*
# etc system
install -dm755 "${pkgdir}/etc/systemd/system"
install -m644 -t "${pkgdir}/etc/systemd/system" "${source_dir}/etc/systemd/system"/*.*
# lib service
install -dm755 "${pkgdir}/usr/lib/systemd/system"
# install -m644 -t "${pkgdir}/usr/lib/systemd/system" "${source_dir}/systemd/system"/*.{service,timer,swap}
find "${source_dir}/systemd/system" -maxdepth 1 -type f -exec install -m644 -D {} "${pkgdir}/usr/lib/systemd/system/" \;
install -dm755 "${pkgdir}/usr/lib/systemd/system/hhd@.service.d"
install -m644 -t "${pkgdir}/usr/lib/systemd/system/hhd@.service.d" "${source_dir}/systemd/system/hhd@.service.d"/*
# user service
install -dm755 "${pkgdir}/usr/lib/systemd/user"
install -m644 -t "${pkgdir}/usr/lib/systemd/user" "${source_dir}/systemd/user"/*
# /usr/libexec/*
install -dm755 "${pkgdir}/usr/libexec"
install -m755 -t "${pkgdir}/usr/libexec" "${source_dir}/libexec"/*
# /etc/default/*
install -dm755 "${pkgdir}/etc/default"
install -m644 -t "${pkgdir}/etc/default" "${source_dir}/etc/default"/*
# etc profile.d
install -dm755 "${pkgdir}/etc/profile.d"
install -m644 -t "${pkgdir}/etc/profile.d" "${source_dir}/etc/profile.d"/*
# /usr/share/sk-chos/just/*
install -dm755 "${pkgdir}/usr/share/sk-chos/just"
install -m644 -t "${pkgdir}/usr/share/sk-chos/just" "${source_dir}/share/sk-chos/just"/*.*
# /usr/share/sk-chos/motd/*
install -dm755 "${pkgdir}/usr/share/sk-chos/motd"
install -m644 -t "${pkgdir}/usr/share/sk-chos/motd" "${source_dir}/share/sk-chos/motd"/*
# /usr/share/sk-chos/*
install -dm755 "${pkgdir}/usr/share/sk-chos"
install -m644 -t "${pkgdir}/usr/share/sk-chos" "${source_dir}/share/sk-chos"/justfile
# /usr/local/share/zsh/site-functions/*
install -dm755 "${pkgdir}/usr/local/share/zsh/site-functions"
install -m644 -t "${pkgdir}/usr/local/share/zsh/site-functions" "${source_dir}/share/sk-chos/completions/"_*just
# /etc/bash_completion.d
install -dm755 "${pkgdir}/etc/bash_completion.d"
install -m644 "${source_dir}/share/sk-chos/completions/_just.bash" "${pkgdir}/etc/bash_completion.d/just.bash"
install -m644 "${source_dir}/share/sk-chos/completions/_cjust.bash" "${pkgdir}/etc/bash_completion.d/cjust.bash" || true
# /usr/lib/cjust
install -dm755 "${pkgdir}/usr/lib/cjust"
install -m755 -t "${pkgdir}/usr/lib/cjust" "${source_dir}/lib/cjust"/*.sh
# /usr/lib/os-*
install -dm755 "${pkgdir}/usr/lib"
install -m755 -t "${pkgdir}/usr/lib" "${source_dir}/lib/os-"*
# polkit actions
install -dm755 "${pkgdir}/usr/share/polkit-1/actions"
install -m644 -t "${pkgdir}/usr/share/polkit-1/actions" "${source_dir}/share/polkit-1/actions"/*
# polkit rules
install -dm755 "${pkgdir}/usr/share/polkit-1/rules.d"
install -m644 -t "${pkgdir}/usr/share/polkit-1/rules.d" "${source_dir}/share/polkit-1/rules.d"/*
# udev rules
install -dm755 "${pkgdir}/usr/lib/udev/rules.d"
install -m644 -t "${pkgdir}/usr/lib/udev/rules.d" "${source_dir}/lib/udev/rules.d"/*
# /usr/share/plymouth/themes/steamos/*
install -dm755 "${pkgdir}/usr/share/plymouth/themes/steamos"
install -m644 -t "${pkgdir}/usr/share/plymouth/themes/steamos" "${source_dir}/share/plymouth/themes/steamos"/*
# 创建软链接解决重命名兼容
# bin
cd "${pkgdir}/usr/bin"
ln -s sk-first-setup sk-first-run
ln -s sk-chos-tool-update skt-update
# systemd/system
cd "${pkgdir}/usr/lib/systemd/system"
ln -s sk-setup-kernel-options.service sk-update-boot-entry.service
ln -s sk-setup-next-boot.service sk-auto-keep-boot-entry.service
# systemd/user
cd "${pkgdir}/usr/lib/systemd/user"
ln -s sk-first-setup-daemon.service sk-first-run-daemon.service
}
|