summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD30
-rw-r--r--fix-appstream-data.hook14
-rw-r--r--fix-appstream-data.sh10
-rw-r--r--pamac.install48
5 files changed, 101 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7809548ad5a4..1a33c10c6629 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = pamac-aur
- pkgdesc = A Gtk3 frontend for libalpm
- pkgver = 10.0.0
+ pkgdesc = A Gtk3 frontend, Package Manager based on libalpm with AUR and Appstream support
+ pkgver = 10.0.1
pkgrel = 1
url = https://gitlab.manjaro.org/applications/pamac
install = pamac.install
@@ -13,10 +13,13 @@ pkgbase = pamac-aur
license = GPL3
makedepends = gettext
makedepends = itstool
- makedepends = vala>=0.45
+ makedepends = vala>=0.46
+ makedepends = gtk3>=3.22
+ makedepends = asciidoc
makedepends = meson
makedepends = ninja
makedepends = gobject-introspection
+ makedepends = libappindicator-gtk3
makedepends = xorgproto
depends = glib2>=2.42
depends = json-glib
@@ -34,13 +37,19 @@ pkgbase = pamac-aur
depends = archlinux-appstream-data
optdepends = polkit-gnome: needed for authentification in Cinnamon, Gnome
optdepends = lxsession: needed for authentification in Xfce, LXDE etc.
- optdepends = pamac-tray-appindicator: tray icon for KDE
- provides = pamac=10.0.0-1
+ provides = pamac=10.0.1-1
+ provides = pamac-tray-appindicator
conflicts = pamac
+ conflicts = pamac-tray-appindicator
options = !emptydirs
+ options = !strip
backup = etc/pamac.conf
- source = pamac-10.0.0-1.tar.gz::https://gitlab.manjaro.org/applications/pamac/-/archive/4431c12f2b7920ef437b9a30068f7a545d72549d/pamac-4431c12f2b7920ef437b9a30068f7a545d72549d.tar.gz
- sha256sums = 142bb64f748e4edcedc71daa6997e403a4e7c4161b2aaf5dc522dee377cd7914
+ source = pamac-10.0.1-1.tar.gz::https://gitlab.manjaro.org/applications/pamac/-/archive/6138310b94dd26058521080930d313f4c788cbb4/pamac-6138310b94dd26058521080930d313f4c788cbb4.tar.gz
+ source = fix-appstream-data.sh
+ source = fix-appstream-data.hook
+ sha256sums = cf415ee1227d97c0ed64ea7f91a96d27217e01e4a2a6ba29f73fd1ab5f9fc3e0
+ sha256sums = e9fe7c14d15cbce1d337749cf317e4460bce485b102b5c228b7efa479998d4fa
+ sha256sums = c2b943318a01ba1f3dabbf32e48e6a6f4b4b774e167ab86c6bfee31aa4a3424c
pkgname = pamac-aur
diff --git a/PKGBUILD b/PKGBUILD
index 853bc91ddca2..215a642fbaa7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,14 +5,16 @@ ENABLE_FLATPAK=0
ENABLE_SNAPD=0
pkgname=pamac-aur
-pkgver=10.0.0
+pkgver=10.0.1
pkgrel=1
_pkgfixver=$pkgver
-_commit='4431c12f2b7920ef437b9a30068f7a545d72549d'
-sha256sums=('142bb64f748e4edcedc71daa6997e403a4e7c4161b2aaf5dc522dee377cd7914')
+_commit='6138310b94dd26058521080930d313f4c788cbb4'
+sha256sums=('cf415ee1227d97c0ed64ea7f91a96d27217e01e4a2a6ba29f73fd1ab5f9fc3e0'
+ 'e9fe7c14d15cbce1d337749cf317e4460bce485b102b5c228b7efa479998d4fa'
+ 'c2b943318a01ba1f3dabbf32e48e6a6f4b4b774e167ab86c6bfee31aa4a3424c')
-pkgdesc="A Gtk3 frontend for libalpm"
+pkgdesc="A Gtk3 frontend, Package Manager based on libalpm with AUR and Appstream support"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://gitlab.manjaro.org/applications/pamac"
license=('GPL3')
@@ -21,15 +23,16 @@ depends=('glib2>=2.42' 'json-glib' 'libsoup' 'dbus-glib' 'polkit' 'vte3>=0.38' '
'appstream-glib' 'archlinux-appstream-data')
optdepends=('polkit-gnome: needed for authentification in Cinnamon, Gnome'
- 'lxsession: needed for authentification in Xfce, LXDE etc.'
- 'pamac-tray-appindicator: tray icon for KDE')
-makedepends=('gettext' 'itstool' 'vala>=0.45' 'meson' 'ninja' 'gobject-introspection' 'xorgproto')
+ 'lxsession: needed for authentification in Xfce, LXDE etc.')
+makedepends=('gettext' 'itstool' 'vala>=0.46' 'gtk3>=3.22' 'asciidoc' 'meson' 'ninja' 'gobject-introspection' 'libappindicator-gtk3' 'xorgproto')
backup=('etc/pamac.conf')
-conflicts=('pamac')
-provides=("pamac=$pkgver-$pkgrel")
-options=(!emptydirs)
+conflicts=('pamac' 'pamac-tray-appindicator')
+provides=("pamac=$pkgver-$pkgrel" 'pamac-tray-appindicator')
+options=(!emptydirs !strip)
+
install=pamac.install
-source=("pamac-$pkgver-$pkgrel.tar.gz::$url/-/archive/$_commit/pamac-$_commit.tar.gz")
+source=("pamac-$pkgver-$pkgrel.tar.gz::$url/-/archive/$_commit/pamac-$_commit.tar.gz"
+ fix-appstream-data.sh fix-appstream-data.hook)
define_meson=''
if [ "${ENABLE_FLATPAK}" = 1 ]; then
depends+=('flatpak')
@@ -53,6 +56,7 @@ build() {
cd builddir
meson --buildtype=release \
--prefix=/usr \
+ -Denable-appindicator=true \
--sysconfdir=/etc $define_meson
# build
ninja
@@ -62,5 +66,9 @@ package() {
cd "$srcdir/pamac-$_commit/builddir"
DESTDIR="$pkgdir" ninja install
+ # cp -r "$srcdir/pamac-$_commit/data/gnome-shell/pamac-updates@manjaro.org" "$pkgdir/usr/share/gnome-shell/extensions"
+ # fix appstream issue
+ install -Dm644 "$srcdir/fix-appstream-data.hook" "$pkgdir/etc/pacman.d/hooks/fix-appstream-data.hook"
+ install -Dm755 "$srcdir/fix-appstream-data.sh" "$pkgdir/etc/pacman.d/hooks.bin/fix-appstream-data.sh"
}
# vim:set ts=2 sw=2 et:
diff --git a/fix-appstream-data.hook b/fix-appstream-data.hook
new file mode 100644
index 000000000000..9bdff11a3a3e
--- /dev/null
+++ b/fix-appstream-data.hook
@@ -0,0 +1,14 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Type = Path
+Target = usr/share/app-info/xmls/*.xml.gz
+
+# attention: hook name before: update-appstream-cache.hook
+
+[Action]
+Description = fix appstream datas for pamac
+When = PostTransaction
+Depends = gzip
+Exec = /etc/pacman.d/hooks.bin/fix-appstream-data.sh
+NeedsTargets
diff --git a/fix-appstream-data.sh b/fix-appstream-data.sh
new file mode 100644
index 000000000000..e6c365c059b5
--- /dev/null
+++ b/fix-appstream-data.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+tmp="/tmp/fix-appstream-data"
+while read -r archive; do
+ if [[ $(zcat "${archive}" | grep -cm1 '<em>') == "1" ]]; then
+ zcat "${archive}" | sed 's|<em>||g;s|<\/em>||g;s|<strong>||g;s|<\/strong>||g' | gzip > "${tmp}"
+ cp "${tmp}" "${archive}"
+ rm "${tmp}"
+ echo " archive ${archive} fixed"
+ fi
+done
diff --git a/pamac.install b/pamac.install
index fb3df4aa94ef..524f2455707c 100644
--- a/pamac.install
+++ b/pamac.install
@@ -1,17 +1,38 @@
+msg() {
+ ALL_OFF="\e[1;0m"
+ BOLD="\e[1;1m"
+ GREEN="${BOLD}\e[1;32m"
+ local mesg=$1; shift
+ printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
+}
+
+restore_conf() {
+ PAMAC_NEW="$(date +%m%d%M%S)"
+ if [ -f "/etc/pamac.conf.pacsave" ]; then
+ msg "You had an old /etc/pamac.conf.pacsave file. We restore it for you."
+ msg "You can find your new pamac.conf saved as \`/etc/pamac-new-${PAMAC_NEW}.conf\`"
+ mv /etc/pamac.conf /etc/pamac-new-${PAMAC_NEW}.conf
+ mv /etc/pamac.conf.pacsave /etc/pamac.conf
+ fi
+}
+
post_install() {
- # enable flatpak repo
+ # enable flatpak repo
if [ -f /usr/bin/flatpak ]; then
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
fi
# enable systemd timers
- ln -sf /usr/lib/systemd/system/pamac-cleancache.timer /etc/systemd/system/multi-user.target.wants
- #ln -sf /usr/lib/systemd/system/pamac-mirrorlist.timer /etc/systemd/system/multi-user.target.wants
+ mkdir -p /etc/systemd/system/timers.target.wants
+ ln -sf /usr/lib/systemd/system/pamac-cleancache.timer /etc/systemd/system/timers.target.wants/pamac-cleancache.timer
+ # ln -sf /usr/lib/systemd/system/pamac-mirrorlist.timer /etc/systemd/system/timers.target.wants/pamac-mirrorlist.timer
# polkit agent
printf '==> An authentication agent is required\n'
printf ' Cinnamon, Deepin, GNOME, GNOME Flashback, KDE, LXDE, LXQt, MATE and Xfce\n'
printf ' have an authentication agent already.\n'
printf ' See https://wiki.archlinux.org/index.php/Polkit#Authentication_agents\n'
printf ' for other desktop environments.\n'
+ # restore old conf
+ restore_conf
}
post_upgrade() {
@@ -19,10 +40,25 @@ post_upgrade() {
if [ -f /usr/bin/flatpak ]; then
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
fi
+ # restore old conf
+ if [ "$(vercmp $2 7.3.5-3)" -lt 0 ]; then
+ restore_conf
+ fi
+
+ if [ "$(vercmp $2 8.0.3-5)" -lt 0 ]; then
+ # remove wrong placed symlinks
+ msg "Updating timer symlinks"
+ [[ -e /etc/systemd/system/multi-user.target.wants/pamac-cleancache.timer ]] && rm -f /etc/systemd/system/multi-user.target.wants/pamac-cleancache.timer
+ # [[ -e /etc/systemd/system/multi-user.target.wants/pamac-mirrorlist.timer ]] && rm -f /etc/systemd/system/multi-user.target.wants/pamac-mirrorlist.timer
+ # enable systemd timers
+ mkdir -p /etc/systemd/system/timers.target.wants
+ ln -sf /usr/lib/systemd/system/pamac-cleancache.timer /etc/systemd/system/timers.target.wants/pamac-cleancache.timer
+ # ln -sf /usr/lib/systemd/system/pamac-mirrorlist.timer /etc/systemd/system/timers.target.wants/pamac-mirrorlist.timer
+ fi
}
post_remove() {
# disable systemd timers
- rm -f /etc/systemd/system/multi-user.target.wants/pamac-cleancache.timer
- #rm -f /etc/systemd/system/multi-user.target.wants/pamac-mirrorlist.timer
-} \ No newline at end of file
+ rm -f /etc/systemd/system/timers.target.wants/pamac-cleancache.timer
+ # rm -f /etc/systemd/system/timers.target.wants/pamac-mirrorlist.timer
+}