Date: Saturday, June 29, 2019 @ 07:44:48
  Author: pierre
Revision: 357037

upgpkg: pkgstats 2.4.1-1

Modified:
  pkgstats/trunk/PKGBUILD
Deleted:
  pkgstats/trunk/pkgstats.service
  pkgstats/trunk/pkgstats.sh
  pkgstats/trunk/pkgstats.timer

------------------+
 PKGBUILD         |   24 +++++++++++------
 pkgstats.service |    9 ------
 pkgstats.sh      |   71 -----------------------------------------------------
 pkgstats.timer   |    7 -----
 4 files changed, 15 insertions(+), 96 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2019-06-29 07:08:35 UTC (rev 357036)
+++ PKGBUILD    2019-06-29 07:44:48 UTC (rev 357037)
@@ -1,7 +1,7 @@
 # Maintainer: Pierre Schmitz <pie...@archlinux.de>
 
 pkgname=pkgstats
-pkgver=2.4
+pkgver=2.4.1
 pkgrel=1
 pkgdesc='Submit a list of installed packages to the Arch Linux project'
 url='https://pkgstats.archlinux.de/'
@@ -8,14 +8,20 @@
 arch=('any')
 license=('GPL')
 depends=('bash' 'curl' 'pacman' 'sed' 'coreutils' 'systemd' 'grep')
-source=(pkgstats.{sh,timer,service})
-sha256sums=('4c96e0946c44435a3853fffd4fe99ae25aea3efa9a567b918eb9ca27c6cf9b52'
-            '86207164a13640edb58657f16329f60f2d84d7d3e5b9336e48aa0d607906078e'
-            '986608f2fff417693b663474db3f36b8fb2ae4eb111ad177c616ce02bb431b23')
+makedepends=('git')
+checkdepends=('bash-bats')
+source=("${pkgname}::git+https://github.com/archlinux-de/pkgstats-cli.git?signed#tag=${pkgver}";)
+sha1sums=('SKIP')
+validpgpkeys=('4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC')
 
+check() {
+       cd ${srcdir}/${pkgname}
+
+       make test
+}
+
 package() {
-       install -D pkgstats.sh "$pkgdir/usr/bin/pkgstats"
-       install -Dt "$pkgdir/usr/lib/systemd/system" -m644 
pkgstats.{timer,service}
-       install -d "$pkgdir/usr/lib/systemd/system/timers.target.wants"
-       ln -st "$pkgdir/usr/lib/systemd/system/timers.target.wants" 
../pkgstats.timer
+       cd ${srcdir}/${pkgname}
+
+       make DESTDIR=${pkgdir} install
 }

Deleted: pkgstats.service
===================================================================
--- pkgstats.service    2019-06-29 07:08:35 UTC (rev 357036)
+++ pkgstats.service    2019-06-29 07:44:48 UTC (rev 357037)
@@ -1,9 +0,0 @@
-[Unit]
-Description=Submit pkgstats
-After=network-online.target
-
-[Service]
-Type=oneshot
-ExecStart=/usr/bin/pkgstats -q
-User=nobody
-Group=nobody

Deleted: pkgstats.sh
===================================================================
--- pkgstats.sh 2019-06-29 07:08:35 UTC (rev 357036)
+++ pkgstats.sh 2019-06-29 07:44:48 UTC (rev 357037)
@@ -1,71 +0,0 @@
-#!/bin/bash
-
-pkgstatsver='2.4'
-showonly=false
-quiet=false
-option='-q -s -S -L'
-
-usage() {
-       echo "usage: ${0} [option]"
-       echo 'options:'
-       echo '  -v      show the version of pkgstats'
-       echo '  -d      enable debug mode'
-       echo '  -h      show this help'
-       echo '  -s      show what information would be sent'
-       echo '          (but do not send anything)'
-       echo '  -q      be quiet except on errors'
-       echo ''
-       echo 'pkgstats sends a list of all installed packages,'
-       echo 'the architecture and the mirror you are using'
-       echo 'to the Arch Linux project.'
-       echo ''
-       echo 'Statistics are available at https://pkgstats.archlinux.de/'
-}
-
-while getopts 'vdhsq' parameter; do
-       case ${parameter} in
-               v)      echo "pkgstats, version ${pkgstatsver}"; exit 0;;
-               d)      option="${option} --trace-ascii -";;
-               s)      showonly=true;;
-               q)      quiet=true;;
-               *)      usage; exit 1;;
-       esac
-done
-
-${quiet} || echo 'Collecting data...'
-pkglist="$(mktemp --tmpdir pkglist.XXXXXX)"
-trap 'rm -f "${pkglist}"' EXIT
-pacman -Qq > "${pkglist}"
-arch="$(uname -m)"
-if [[ -f /proc/cpuinfo ]]; then
-       if grep -qE '^flags\s*:.*\slm\s' /proc/cpuinfo; then
-               cpuarch='x86_64'
-       else
-               cpuarch='i686'
-       fi
-else
-       cpuarch=''
-fi
-mirror="$(pacman-conf --repo extra Server 2> /dev/null | head -1 | sed -E 
's#(.*/)extra/os/.*#\1#;s#(.*://).*@#\1#')"
-
-if ${showonly}; then
-       echo 'packages='
-       cat  "${pkglist}"
-       echo ''
-       echo "arch=${arch}"
-       echo "cpuarch=${cpuarch}"
-       echo "pkgstatsver=${pkgstatsver}"
-       echo "mirror=${mirror}"
-       echo "quiet=${quiet}"
-else
-       ${quiet} || echo 'Submitting data...'
-       curl ${option} \
-               -A "pkgstats/${pkgstatsver}" \
-               --data-urlencode "packages@${pkglist}" \
-               --data-urlencode "arch=${arch}" \
-               --data-urlencode "cpuarch=${cpuarch}" \
-               --data-urlencode "mirror=${mirror}" \
-               --data-urlencode "quiet=${quiet}" \
-               'https://pkgstats.archlinux.de/post' \
-       || echo 'Sorry, data could not be sent.' >&2
-fi

Deleted: pkgstats.timer
===================================================================
--- pkgstats.timer      2019-06-29 07:08:35 UTC (rev 357036)
+++ pkgstats.timer      2019-06-29 07:44:48 UTC (rev 357037)
@@ -1,7 +0,0 @@
-[Unit]
-Description=Weekly pkgstats submission
-
-[Timer]
-OnCalendar=weekly
-AccuracySec=1d
-Persistent=true

Reply via email to