-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassets.conf.endeavouros
633 lines (517 loc) · 20.3 KB
/
assets.conf.endeavouros
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
#!/bin/bash
# Definitions for the [endeavouros] repo at 'mirrors'.
# Note: this file will be sourced into a function,
# so all variables are made 'local'.
local REPONAME="endeavouros"
local RELEASE_TAGS=(
endeavouros
# mirror1
# mirror2
)
## user to sign packages
local SIGNER="[email protected]" # "EndeavourOS"
## general options
local USE_GENERATED_FILELIST="no" # may generate 'repofiles.txt' into the repo
local USE_RELEASE_ASSETS="yes" # either 'release assets' or "ordinary" github files
local RELEASE_ASSETS_REMOTE_BASE="https://github.com/endeavouros-team/repo/releases/download/endeavouros" # download remote release asset files from here
local PREFER_GIT_OVER_RELEASE=yes
local ARCHIVE_TAG=packages
export MAKEPKG_CLEANUP=yes # some of *our* PKGBUILD files (e.g. yay) may use this!
## local folders
# local ASSETSDIR="$PWD"
# local PKGBUILD_ROOTDIR="$ASSETSDIR/PKGBUILDS" # temporary copy only, will always be overwritten
# local GITDIR="$ASSETSDIR/../../repo" # not $REPONAME...
# local ARCHIVE_GIT="$ASSETSDIR/../../archive/.git"
## new way with absolute paths:
local ASSETSDIR="$EOS_ROOT/_BUILD_/$REPONAME"
local PKGBUILD_ROOTDIR="$ASSETSDIR/PKGBUILDS"
local GITDIR="$EOS_ROOT/repo"
local ARCHIVE_GIT="$EOS_ROOT/archive/.git"
# source EndeavourOS-packages-buildlist || exit 1
# PKGNAMES is the current build list for the packages at the [endeavouros] repository.
#
# Notes:
# - The AUR package names require suffix "/aur".
# - The EndeavourOS names are actually folder names for packages under PKGBUILDS, not actual package names!
#
# PKG_CHANGELOGS moved to eos-pkg-changelog.
PKGNAMES=( # Alphabetically ordered.
akm
arc-gtk-theme-eos
bashdb/aur
calamares
ckbcomp
downgrade/aur
endeavouros-branding # will replace endeavouros-theming 2024-12 (?)
endeavouros-keyring
endeavouros-mirrorlist
# endeavouros-theming # will be replaced by endeavouros-branding 2024-12 (?)
endeavouros-xfce4-terminal-colors
eos-apps-info
eos-bash-shared
eos-breeze-sddm # will replace eos-plasma-sddm-config 2024-12 (?)
eos-downgrade
eos-dracut # was: dracut-hook/aur
eos-hooks
eos-lightdm-gtk-theme
eos-lightdm-slick-theme
eos-log-tool
eos-lxdm-gtk3
eos-packagelist
eos-plasma-sddm-config # will be replaced by eos-breeze-sddm 2024-12 (?)
eos-qogir-icons
eos-quickstart
eos-rankmirrors
eos-sddm-theme
eos-settings-budgie
eos-settings-cinnamon
eos-settings-gnome
eos-settings-i3wm
eos-settings-lxde
eos-settings-lxqt
eos-settings-mate
eos-settings-plasma
eos-settings-xfce4
eos-translations
eos-update-notifier
# filesystem
kernel-install-for-dracut
keyserver-rank # probably not needed?
# lsb-release
nvidia-hook
nvidia-inst
pahis
paru/aur
qemu-arm-aarch64-static-bin
rate-mirrors/aur
reflector-bash-completion
reflector-simple
welcome
yad
yay/aur
zfs-dkms/aur
zfs-utils/aur
# devel packages
#eos-settings-budgie-devel
#eos-settings-cinnamon-devel
#eos-settings-gnome-devel
#eos-settings-mate-devel
#eos-settings-xfce4-devel
)
# PKGNAMES=( ckbcomp )
# Use option --pkgnames="names" for special checks!
# PKGNAMES_WAIT specifies which of the packages in PKGNAMES will not be built.
# Formats supported:
# 'package-name' skips all versions of 'package-name'
# 'package-name|pkgver-pkgrel' skips a specific version of 'package-name'
# Examples:
# 'eos-lxdm-gtk3'
# 'eos-lxdm-gtk3|0.5.3-5'
# Note: include the definition in quotes because of the pipe character '|'.
#
PKGNAMES_WAIT=(
'ckbcomp|1.233-1' # in comparison to 1.228-1, this version has no changes to the 'ckbcomp' app
# filesystem
# lsb-release
)
# PKGNAMES_WAIT+=( endeavouros-theming ) # wait for the release
# HAS_GIT_VER array incldues packages whose pkgver can be anything, i.e. newer package can have lower pkgver.
# Sometimes e.g. -git packages have that property.
# declare -A HAS_GIT_PKGVER # allow any pkgver value if "yes"
# HAS_GIT_PKGVER[???-git]=yes
declare -A PKG_MAKEPKG_OPTIONS=(
eos-dracut "--nodeps"
eos-lightdm-slick-theme "--nodeps"
eos-plasma-sddm-config "--nodeps"
eos-sddm-theme "--nodeps"
eos-settings-plasma "--nodeps"
kernel-install-for-dracut "--nodeps"
eos-quickstart "--rmdeps"
yay "--rmdeps"
# calamares "--nodeps"
# endeavouros-skel-i3wm "--nodeps"
# endeavouros-skel-xfce4 "--nodeps"
# worm "--rmdeps"
)
# Hook functions are run in the beginning after RationalityTests in assets.make.
# There may be several hook functions.
local ASSET_HOOKS=(
# currently none
)
# Package hooks
# do this for: icon-themes?
_common_show_version() {
if [ "$localversion" != "$dev_version" ] ; then
echo -n "[dev=$dev_version] " >&2
fi
}
_Updpkgsums() {
local Pkgbuild="$1"
updpkgsums "$Pkgbuild" 2>/dev/null
}
_Get_pkgver() {
local Pkgbuild="$1"
# grep "^pkgver=" "$Pkgbuild" | cut -d '=' -f 2 | sed "s|^[\"']\(.*\)[\"']$|\1|"
local Pkgver=""
GetPkgbuildValue "$Pkgbuild" Pkgver "pkgver"
echo "$Pkgver"
}
#_GetSource0() {
# local Pkgbuild="$1"
# source "$Pkgbuild"
# echo "${source[0]}"
#}
_fetch_that_file() {
local file="$1"
local url="$2"
[ -n "$file" ] || return 1
[ -n "$url" ] || return 1
if false ; then
local out=""
[ "$file" != "-" ] && out="--output '$file'"
curl --silent --location --max-time 10 $out "$url"
else
wget -q --timeout=10 -O"$file" "$url"
fi
}
__generic_get_pkgname() { local funcname="$1" ; echo "$funcname" | cut -d '_' -f 2 ; }
InstallNeededPackages() {
local pkg install=()
for pkg in "$@" ; do
pacman -Qq "$pkg" >& /dev/null || install+=("$pkg")
done
if [ ${#install[@]} -gt 0 ] ; then
printf "\n==> Installing packages: %s\n" "${install[*]}" >&2
su-c_wrapper pacman -S "${install[@]}"
fi
}
_budgie-control-center_hook() {
local pkgs=(
modemmanager
# gnome-online-accounts
# gsound
budgie-desktop
# libcheese
# colord-gtk
)
InstallNeededPackages "${pkgs[@]}"
}
# 2022-Feb-19: added temporary hooks for *-bin ==> non-bin, remove e.g. 2 months after both packages have updated ??
_rate-mirrors_hook() {
local PKGBUILD="$PKGBUILD_ROOTDIR"/"$(__generic_get_pkgname $FUNCNAME)"/PKGBUILD
sed -i $PKGBUILD \
-e "/^depends=/a \ \nreplaces=(rate-mirrors-bin)"
}
_dracut_hook() {
# Inform if the Arch version if not older than the EndeavourOS version
local PKGBUILD="$PKGBUILD_ROOTDIR"/"$(__generic_get_pkgname $FUNCNAME)"/PKGBUILD
local eos_pkgver=""
local eos_pkgrel=""
GetPkgbuildValue "$PKGBUILD" eos_pkgver "pkgver" eos_pkgrel "pkgrel"
local extra_ver=$(expac -S %v extra/dracut)
if [ $(vercmp $extra_ver ${eos_pkgver}-$eos_pkgrel) -ge 0 ] ; then
printf "$FUNCNAME: dracut: Arch version is not older than EndeavourOS ==> skip the EndeavourOS version. " >&2
fi
}
_paru_hook() {
local PKGBUILD="$PKGBUILD_ROOTDIR"/"$(__generic_get_pkgname $FUNCNAME)"/PKGBUILD
local Pkgver="" # =$(grep ^pkgver= "$PKGBUILD" | cut -d'=' -f2)
local Pkgrel="" # =$(grep ^pkgrel= "$PKGBUILD" | cut -d'=' -f2)
GetPkgbuildValue "$PKGBUILD" Pkgver "pkgver"
GetPkgbuildValue "$PKGBUILD" Pkgrel "pkgrel"
case "${Pkgver}-$Pkgrel" in
1.11.1-1)
sed -i "$PKGBUILD" \
-e 's|^pkgver=.*|pkgver=1.11.2|' \
-e "s|^sha256sums=.*|sha256sums=('9fd8db52894f9e7d61a3901d2c441502aab28a090083e0d6fdb58118e53a8a14')|"
;;
2.0.3-1)
sed -i "$PKGBUILD" \
-e 's|^pkgrel=.*|pkgrel=1.1|' \
-e 's|^source=.*|source=("$pkgname-$pkgver::git+https://github.com/Morganamilo/paru.git#commit=90656a9")|' \
-e "s|^depends=.*|depends=(git pacman 'libalpm.so=15')|" \
-e "s|^sha256sums=.*|sha256sums=('b1385075347c3ec2c4dda8055fd74cb9106ea5e2ee92d76a56a9c7707932221f')|"
;;
esac
}
_eos-lightdm-gtk-theme_hook() {
# Clone package source of eos-lightdm-gtk-theme from EndeavourOS ARM
local Pkgname="$(__generic_get_pkgname $FUNCNAME)"
pushd /tmp >/dev/null || return 1
rm -rf PKGBUILDS
git clone https://github.com/endeavouros-arm/PKGBUILDS.git >& /dev/null || return 1 # Get all from EOS ARM.
[ -d "$PKGBUILD_ROOTDIR"/$Pkgname ] && rm -rf "$PKGBUILD_ROOTDIR"/$Pkgname # Replace old local eos-lightdm-gtk-theme dir
mv PKGBUILDS/$Pkgname "$PKGBUILD_ROOTDIR"/ || return 1 # with the new eos-lightdm-gtk-theme dir.
popd >/dev/null
rm -rf /tmp/PKGBUILDS # clean up
}
_bashdb_hook() {
local Pkgname="$(__generic_get_pkgname $FUNCNAME)"
local Pkgbuild="$PKGBUILD_ROOTDIR"/$Pkgname/PKGBUILD
local VER=""
local PKGREL=""
GetPkgbuildValue "$Pkgbuild" VER "_ver"
# if [ "$(grep "^_ver=" "$Pkgbuild" | cut -d'=' -f2)" = "'5.0-1.1.2'" ] ; then
if [ "$VER" = "5.0-1.1.2" ] ; then
# support also bash version 5.1
local line="s/'5.0')/'5.0' | '5.1')/"
sed -i "$Pkgbuild" \
-e "/^[ ]*#sed /a \ sed -i configure -e \"$line\""
# show in pkgrel we changed this package
GetPkgbuildValue "$Pkgbuild" PKGREL "pkgrel"
# if [ "$(grep ^pkgrel= "$Pkgbuild" | cut -d'=' -f2)" = "'1'" ] ; then
if [ "$PKGREL" = "1" ] ; then
sed -i "$Pkgbuild" \
-e 's|^pkgrel=.*|pkgrel=1.1|'
fi
fi
}
_paper-icon-theme-git_hook() {
local Pkgname="$(__generic_get_pkgname $FUNCNAME)"
local Pkgbuild="$PKGBUILD_ROOTDIR"/$Pkgname/PKGBUILD
local cleanup=""
local commits commit
local data=$(curl -s https://github.com/snwh/paper-icon-theme)
commits=$(echo "$data" | grep -B2 " commits$" | head -n1 | sed 's|[ ]*<strong>\([0-9]*\)</strong>$|\1|') # 832
commit=$( echo "$data" | grep ">Permalink<" | sed 's|.*/tree/\([0-9a-f]*\)".*|\1|') # aa3e8af7a1f0831a51fd7e638a4acb077a1e5188
commit=${commit::7} # aa3e8af
cleanup+=' local dir="$srcdir/../$pkgname"\n'
cleanup+=' [ -d "$dir" ] && rm -rf "$dir"'
# Changes:
# - remove reference to $srcdir
# - get pkgver from github info
# - remove pkgver()
# - conflicts with paper-icon-theme
# - add some cleanup
sed -i "$Pkgbuild" \
-e 's|^pkgname=.*|pkgname=paper-icon-theme|' \
-e 's|cd "$srcdir/$pkgname"$|cd "$pkgname"|' \
-e "s|^pkgver=.*|pkgver=1.5.0.$commits.$commit|" \
-e 's|^pkgver()|_pkgver_not_used()|' \
-e "/^provides=(/a \conflicts=(paper-icon-theme)" \
-e "/ ninja -C /a \ # cleanup\n$cleanup"
return 11 # pkgver was changed
}
_yay_hook_check_latest() {
# check if AUR PKGBUILD has the latest version of yay from the developer
local tool=yay
local url=https://github.com/Jguer/$tool/releases
local tmpdata
local Pkgbuild="$PKGBUILD_ROOTDIR"/$tool/PKGBUILD
local localversion=$(_Get_pkgver "$Pkgbuild")
local dev_version
tmpdata="$(_fetch_that_file "-" $url)"
if [ $? -ne 0 ] ; then
echo "cannot fetch info about $tool" >&2
return 1
fi
dev_version="$(echo "$tmpdata" | grep -m1 /Jguer/yay/tree/v | sed 's|^.*/tree/v\([0-9\.]*\)" .*$|\1|')"
_common_show_version
}
_yay_hook_check_latest_old() {
# check if AUR PKGBUILD has the latest version of yay from the developer
local tool=yay
local url=https://github.com/Jguer/$tool/releases
local tmpfile=$(mktemp)
local Pkgbuild="$PKGBUILD_ROOTDIR"/$tool/PKGBUILD
local localversion=$(_Get_pkgver "$Pkgbuild")
local dev_version
_fetch_that_file $tmpfile $url || {
echo "cannot fetch info about $tool" >&2
rm -f $tmpfile
return 1
}
#dev_version="$(grep "Release v[0-9]" $tmpfile | sed 's|^.*Release v\([0-9\.]*\).*$|\1|')"
dev_version="$(grep /Jguer/yay/tree/v $tmpfile | head -n 1 | sed 's|^.*/tree/v\([0-9\.]*\)" .*$|\1|')"
_common_show_version
rm -f $tmpfile
}
_nvidia-installer-db_hook() {
# nvidia-site-check-and-update-db
return
# check if Nvidia has changed its driver archive (db) site
local archive=https://www.nvidia.com/en-us/drivers/unix
local store="$HOME"/.nvidia-installer/archive.html
mkdir -p "$(dirname "$store")"
local tmpfile="$(mktemp "$store".tmp.XXXXX)"
_fetch_that_file "$tmpfile" $archive || {
rm -f "$tmpfile"
return 1
}
if (diff "$tmpfile" "$store" >& /dev/null) ; then
rm -f "$store".tmp.* # no diffs
else
mv "$store" "$store".tmp
mv "$tmpfile" "$store"
mv "$store".tmp "$tmpfile"
printf "$archive changed! Run nvidia-installer-check to see if there's a problem. " >&2
fi
}
_inxi_hook_check_latest() {
# check if AUR PKGBUILD has the latest version of inxi from the developer
local tool=inxi
local url=https://github.com/smxi/$tool/releases
local tmpdata
local Pkgbuild="$PKGBUILD_ROOTDIR"/$tool/PKGBUILD
local localversion=$(_Get_pkgver "$Pkgbuild")
local dev_version
local prefer_dev_version=yes
tmpdata="$(_fetch_that_file - $url)"
if [ $? -ne 0 ] ; then
echo "cannot fetch info about $tool" >&2
return 1
fi
# Inxi has a version number "conflicting" with Arch versioning. Have to change inxi's '-' to '.'.
dev_version="$(echo "$tmpdata" | grep /smxi/inxi/releases/tag/ | head -n 1 | sed -e 's|^.*/tag/||' -e 's|".*$||' | tr '-' '.')"
if [ "$prefer_dev_version" = "yes" ] ; then
sed -i $Pkgbuild -e 's|^pkgver='"$localversion"'$|pkgver='"$dev_version"'|'
# echo -n "#" >&2
_Updpkgsums "$Pkgbuild"
return 11 # pkgver was changed
else
_common_show_version
fi
}
_downgrade_hook_check_latest() {
# check if AUR PKGBUILD has the latest version of downgrade from the developer
local tool=downgrade
local url=https://github.com/pbrisbin/$tool/releases
local tmpdata
local Pkgbuild="$PKGBUILD_ROOTDIR"/$tool/PKGBUILD
local localversion=$(_Get_pkgver "$Pkgbuild")
local dev_version
tmpdata="$(_fetch_that_file - $url)"
if [ $? -ne 0 ] ; then
echo "cannot fetch info about $tool" >&2
return 1
fi
dev_version="$(echo "$tmpdata" | grep /pbrisbin/downgrade/releases/tag/v | head -n 1 | sed 's|^.*/tag/v\([0-9\.]*\).*$|\1|')"
_common_show_version
}
_kalu_hook_fix_files() {
# fix kalu.install
sed -i "$PKGBUILD_ROOTDIR"/kalu/kalu.install \
-e 's| usr/sbin/|/usr/sbin/|'
# use names instead of numbers in "chown" command
sed -i "$PKGBUILD_ROOTDIR"/kalu/PKGBUILD \
-e 's|chown 0:102|chown root:polkitd|' \
-e 's|^\(pkgrel=[0-9]*\)$|\1.1|'
}
_yad_hook_add_gspell() {
# add gspell to 'depends', and modify 'pkgrel'
sed -i "$PKGBUILD_ROOTDIR"/yad/PKGBUILD \
-e 's|^depends=(\([^\)]*\))$|depends=(\1 gspell)|' \
-e 's|^\(pkgrel=[0-9]*\)$|\1.1|'
}
# Common helper functions.
_helper_get_files_from_Arch() {
local PKGNAME="$1" # must include "repo/" prefix, e.g. "extra/yad"
case "$PKGNAME" in
*/*) ;;
*) return 1 ;;
esac
local tmpdir=$(mktemp -d)
pushd $tmpdir >/dev/null
yay -G $PKGNAME || return 1
popd >/dev/null
mv $tmpdir/$PKGNAME/trunk/* . || return 1
rm -rf $tmpdir
}
_helper_compare_pkg_version_info() {
# Compare pkgver and pkgrel of Arch and EOS PKGBUILDs.
# If changed, manual intervention is needed: simply update PKGBUILD in EOS with new from Arch.
local PKGNAME="$1"
local -r ver1="$(grep "^pkgver=" PKGBUILD)"
local -r rel1="$(grep "^pkgrel=" PKGBUILD | sed 's|\.1$||')"
local -r ver2="$(grep "^pkgver=" PKGBUILD.eos)"
local -r rel2="$(grep "^pkgrel=" PKGBUILD.eos | sed 's|\.1$||')"
[ "$ver1" = "$ver2" ] || { echo "NOTE: $PKGNAME PKGBUILD (pkgver) has changed, manual intervention needed!" >&2; return 1; }
[ "$rel1" = "$rel2" ] || { echo "NOTE: $PKGNAME PKGBUILD (pkgrel) has changed, manual intervention needed!" >&2; return 1; }
}
_helper_eos_branding_and_marking() {
# - append ".eos" to 'pkgver' value to mark EOS changes
# - add the EOS maintainer line
# - update checksums because some files were changed here
sed -i PKGBUILD -e "s|^\(pkgver=.*\)|\1.eos|"
if [ -z "$(grep "Maintainer.*endeavouros" PKGBUILD)" ] ; then
sed -i PKGBUILD -e "/^# Maintainer:/i \# Maintainer: EndeavourOS-Team <[email protected]>"
fi
updpkgsums PKGBUILD >& /dev/null
}
_yad_hook() {
return # 2023-Mar-08: currently not used!
# patch the dialog height issue, see https://sourceforge.net/p/yad-dialog/tickets/322/#6f2d
local workdir="$PKGBUILD_ROOTDIR"/yad
local url=https://github.com/endeavouros-team/PKGBUILDS/raw/master/yad
pushd "$workdir" >/dev/null
cp PKGBUILD PKGBUILD.eos
_helper_get_files_from_Arch extra/yad || return 1
_helper_compare_pkg_version_info extra/yad || return 1
sed -i PKGBUILD -E \
-e '/autoreconf -ivf/i \ # patch for the dialog height issue\n patch -u src/main.c -i ../../yad-github-issue-107.patch\n' \
-e "s|^(sha256sums=.*)\)|\1 '9af007ad9472afc9fa24e753b30ce7b91cf2e73a37a0074a64ae01979010b30f'\)|" \
-e "s|^(arch=.*)\)|\1 'aarch64' 'armv7'\)|" \
-e "s|^(source=.*)\)$|\1 '$url/yad-github-issue-107.patch'\)|" \
-e "s|^(pkgver=.*)|\1.eos|"
sed -i PKGBUILD \
-e 's|${pkgver}|${pkgver%.eos}|' \
-e '/sha256sums=/a \conflicts=(yad yad-git)\nprovides=(yad)\nreplaces=(yad-eos)'
_helper_eos_branding_and_marking
popd >/dev/null
}
_diff_file_and_data() {
local file="$1"
local data="$2"
local datafile="$3"
local retval
echo "$data" > $datafile
#diff "$file" "$datafile"
meld "$file" "$datafile"
}
_ckbcomp_updatehook() {
local -r pname=ckbcomp
if [ ! -x /bin/$pname ] ; then
echo "info: package $pname is not installed but needed by the fast update"
return 2
fi
local url_pkgname="https://salsa.debian.org/installer-team/console-setup/raw/master/Keyboard/$pname"
local ret=0 # assume changes exist
local tmpfile=$(mktemp)
if ! curl --fail -Lsm 30 -o$tmpfile "$url_pkgname" ; then
echo "info: fast update check failed"
ret=3
elif diff $tmpfile /bin/$pname >/dev/null ; then
echo "no real changes"
ret=1
fi
rm -f $tmpfile
return $ret
}
# Special hooks. Implemented via package hooks.
_assets_download_break() {
return 0 # same contents under different asset tags, so always break after first download
}
ASSET_FAST_UPDATE_CHECKS=(
# hook returns:
# 0 when update exists
# 1 on no update
# 2 if cannot make the check (e.g. due to a non-installed package)
# 3 on error
ckbcomp _ckbcomp_updatehook
)
declare -A ASSET_PACKAGE_HOOKS=(
assets_mirrors _assets_download_break # special hook
# bashdb _bashdb_hook # no more needed
# budgie-control-center _budgie-control-center_hook
# downgrade _downgrade_hook_check_latest
# dracut _dracut_hook # Inform if the Arch version if not older than the EndeavourOS version
# eos-lightdm-gtk-theme _eos-lightdm-gtk-theme_hook # Clone package source of eos-lightdm-gtk-theme from EndeavourOS ARM
# inxi _inxi_hook_check_latest
# kalu _kalu_hook_fix_files
# nvidia-installer-db _nvidia-installer-db_hook
# paper-icon-theme-git _paper-icon-theme-git_hook
# paru _paru_hook
# rate-mirrors _rate-mirrors_hook
# yad _yad_hook_add_gspell
# yay _yay_hook_check_latest
)