Commit 14f65e72 authored by Philip Müller's avatar Philip Müller

[pkg-upd] 4.10.1-3

parents
# Maintainer: Frede Hundewadt <fh@manjaro.org>
# Contributor: Philip Müller <philm@manjaro.org>
#_branch=v4.10.x-stable
_branch=master
_date=$(date +%Y%m%d)
pkgname=pacman-mirrors
pkgver=4.10.1
pkgrel=3
pkgdesc="Manjaro Linux mirror list for use by pacman"
arch=('any')
depends=('python' 'python-npyscreen')
makedepends=('git' 'python-babel' 'python-setuptools')
optdepends=('gtk3: for interactive mode (GUI)'
'python-gobject: for interactive mode (GUI)')
url="https://gitlab.manjaro.org/applications/pacman-mirrors.git"
conflicts=('pacman-mirrorlist' 'pacman-mirrorlist')
replaces=('pacman-mirrorlist' 'pacman-mirrorlist')
provides=("pacman-mirrorlist=$_date")
license=('GPL')
backup=(etc/pacman-mirrors.conf)
source=(git+$url#branch=$_branch
'pacman-mirrors-install.script'
'pacman-mirrors-upgrade.script'
'pacman-mirrors-install.hook'
'pacman-mirrors-upgrade.hook')
sha256sums=('SKIP'
'718a47605be1ca328255b19047dee6d331e0440f303b86d17485fe53937b7906'
'3b1df8c662161903653b0ae41d910019f87a58f3ecd8e02ea9ac8859b9c43f17'
'88befb1a9b167112e05544ec4a765705bf474209e7ef67c44ffc418e10e89bfa'
'6b6869d9dd85cd3a3cba49013dd2fc1c5f7a0934ba1284e21d4bbd24fa2540c6')
prepare() {
cd "${srcdir}"/pacman-mirrors
# do something here
}
package() {
cd "${srcdir}"/pacman-mirrors
make DESTDIR="${pkgdir}" install
install -D ${srcdir}/pacman-mirrors-install.script ${pkgdir}/usr/share/libalpm/scripts/pacman-mirrors-install
install -D ${srcdir}/pacman-mirrors-upgrade.script ${pkgdir}/usr/share/libalpm/scripts/pacman-mirrors-upgrade
install -Dm644 ${srcdir}/pacman-mirrors-install.hook ${pkgdir}/usr/share/libalpm/hooks/pacman-mirrors-install.hook
install -Dm644 ${srcdir}/pacman-mirrors-upgrade.hook ${pkgdir}/usr/share/libalpm/hooks/pacman-mirrors-upgrade.hook
}
# NOTE: will not run if the transaction is interrupted for any reason
[Trigger]
Operation = Install
Type = Package
Target = pacman-mirrors
[Action]
Description = Configuring pacman-mirrors ...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/pacman-mirrors-install
#!/bin/bash
if [ -f /etc/pacman-mirrors.conf.pacsave ]; then
echo "Your current config has been restored."
echo "A new pacman-mirrors.conf is created as /etc/pacman-mirrors-new-$(date +%Y%m%d).conf"
echo "Please verify you're not missing any changes"
mv /etc/pacman-mirrors.conf /etc/pacman-mirrors-new-$(date +%Y%m%d).conf
mv /etc/pacman-mirrors.conf.pacsave /etc/pacman-mirrors.conf
fi
if [ -f /etc/pacman.d/mirrorlist ]; then
# fetch new data files
pacman-mirrors --no-mirrorlist
else
# create mirrorlist
pacman-mirrors -f5
fi
echo "hint: use \`pacman-mirrors\` to generate and update your pacman mirrorlist."
# NOTE: will not run if the transaction is interrupted for any reason
[Trigger]
Operation = Upgrade
Type = Package
Target = pacman-mirrors
[Action]
Description = Configuring pacman-mirrors ...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/pacman-mirrors-upgrade
#!/bin/bash
pacman-mirrors --no-mirrorlist
echo "hint: use \`pacman-mirrors\` to generate and update your pacman mirrorlist."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment