summaryrefslogtreecommitdiff
path: root/raveos-mirrorlist
diff options
context:
space:
mode:
Diffstat (limited to 'raveos-mirrorlist')
-rw-r--r--raveos-mirrorlist/PKGBUILD27
-rw-r--r--raveos-mirrorlist/raveos-core-mirrorlist6
-rw-r--r--raveos-mirrorlist/raveos-mirrorlist.install26
3 files changed, 59 insertions, 0 deletions
diff --git a/raveos-mirrorlist/PKGBUILD b/raveos-mirrorlist/PKGBUILD
new file mode 100644
index 0000000..2660c38
--- /dev/null
+++ b/raveos-mirrorlist/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: RaveOS Team
+#
+# raveos-mirrorlist
+# ------------------
+# A raveos-core-repo elsodleges + tartalek (GitHub Releases) szerverlistaja.
+# Telepiteskor/frissiteskor a .install script automatikusan atallitja a
+# meglevo /etc/pacman.conf [raveos-core-repo] szekciojat inline Server=
+# sorrol Include=-ra, hogy a mar telepitett rendszerek is megkapjak a
+# GitHub tartalek mirrort - de csak akkor, ha a fajl meg a regi, eredeti
+# allapotban van (kezzel modositott configot nem nyul).
+
+pkgname=raveos-mirrorlist
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="RaveOS core-repo mirrorlist (elsodleges + GitHub tartalek szerver)"
+arch=('any')
+url="https://git.rp1.hu/RaveOS"
+license=('GPL')
+backup=('etc/pacman.d/raveos-core-mirrorlist')
+install=raveos-mirrorlist.install
+source=()
+sha256sums=()
+
+package() {
+ install -Dm644 "${startdir}/raveos-core-mirrorlist" \
+ "${pkgdir}/etc/pacman.d/raveos-core-mirrorlist"
+}
diff --git a/raveos-mirrorlist/raveos-core-mirrorlist b/raveos-mirrorlist/raveos-core-mirrorlist
new file mode 100644
index 0000000..18703d1
--- /dev/null
+++ b/raveos-mirrorlist/raveos-core-mirrorlist
@@ -0,0 +1,6 @@
+# RaveOS core-repo mirrorlist
+# Elsodleges + tartalek (GitHub Releases) szerver a raveos-core-repo-hoz.
+# Pacman sorrendben probalja, automatikusan a kovetkezore valt hiba eseten.
+
+Server = https://page.rp1.hu/x86_64/
+Server = https://github.com/rave-os/RaveOS-core-repo-mirror/releases/download/core-repo-x86_64/
diff --git a/raveos-mirrorlist/raveos-mirrorlist.install b/raveos-mirrorlist/raveos-mirrorlist.install
new file mode 100644
index 0000000..ce67191
--- /dev/null
+++ b/raveos-mirrorlist/raveos-mirrorlist.install
@@ -0,0 +1,26 @@
+post_install() {
+ _patch_pacman_conf
+}
+
+post_upgrade() {
+ _patch_pacman_conf
+}
+
+_patch_pacman_conf() {
+ conf=/etc/pacman.conf
+ [ -f "$conf" ] || return 0
+
+ # Csak akkor nyulunk hozza, ha pontosan a regi, egysoros Server= allapotot
+ # talaljuk (meg nincs Include-ra atallitva) - igy nem irunk felul kezzel
+ # modositott konfigot.
+ if grep -qF 'Server = https://page.rp1.hu/x86_64/' "$conf" \
+ && ! grep -qF 'Include = /etc/pacman.d/raveos-core-mirrorlist' "$conf"; then
+ sed -i \
+ '\|^Server = https://page.rp1.hu/x86_64/$|c\Include = /etc/pacman.d/raveos-core-mirrorlist' \
+ "$conf"
+ # Ha a masodlagos Server sor is mar ott volt kulon sorban, azt kivesszuk,
+ # mert most mar az Include fajl adja mindket szervert.
+ sed -i '\|^Server = https://github.com/rave-os/RaveOS-core-repo-mirror/releases/download/core-repo-x86_64/$|d' "$conf"
+ echo "raveos-mirrorlist: /etc/pacman.conf frissitve (raveos-core-repo -> Include mirrorlist, GitHub tartalek szerverrel)"
+ fi
+}