blob: c74e50d5154a113f3c30a43b888a16fc1a6c43ad (
plain)
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
|
# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
# Contributor : xav <xav at ethertricks dot net>
set -u
pkgname='sflowtool'
pkgver='3.41'
pkgrel='1'
pkgdesc='CLI utility and scripts for analyzing sFlow data'
arch=('i686' 'x86_64')
url='http://www.inmon.com/technology/sflowTools.php'
license=('custom')
optdepends=('perl: scripts support')
makedepends=('automake')
#_verwatch=('http://www.inmon.com/technology/sflowTools.php' ".*/${pkgname}-\([0-9\.]\+\)\.tar\.gz" 'l')
_giturl="https://github.com/sflow/${pkgname}"
#_verwatch=("${_giturl}/releases" "${_giturl#*github.com}/archive/v\(.*\)\.tar\.gz" 'l') #rss
_verwatch=("${_giturl}/releases.atom" '\s\+<title>sflowtool\sversion\s\([^<]\+\)</title>.*' 'f') #rss
source=("${pkgname}-${pkgver}.tar.gz::${_giturl}/archive/v${pkgver}.tar.gz"
#"http://www.inmon.com/bin/${pkgname}-${pkgver}.tar.gz"
'http://www.inmon.com/bin/sflowutils.tar.gz'
'LICENSE')
sha256sums=('66e5bc56709798906c136f5b725e85628a7eea91e9958c7a597eedb4e2a58f08'
'45f6a0f96bdb6a1780694b9a4ef9bbd2fd719b9f7f3355c6af1427631b311d56'
'863b86b7a4fc7632cfc3f9ead7e76f6e7751aca8b64030ff97b3b46f991c6482')
prepare() {
set -u
cd "${pkgname}-${pkgver}"
sed -i -e 's:^#!/bin/awk:#!/usr/bin/awk:g' '../utils/ipTrafficMatrix' '../utils/ipTopTalkers'
if [ ! -s 'configure' ]; then
aclocal
autoconf
automake --add-missing
fi
./configure --prefix='/usr' --mandir='/usr/share/man'
set +u
}
build() {
set -u
cd "${pkgname}-${pkgver}"
make -s -j1 # not big enough for nproc
set +u
}
package(){
set -u
cd "${pkgname}-${pkgver}"
make -j1 DESTDIR="${pkgdir}" install
install -d "${pkgdir}/usr/share/${pkgname}"/{utils,contrib}
cp -pR "${srcdir}/utils" "${srcdir}/contrib" "${pkgdir}/usr/share/${pkgname}/"
install -Dpm644 "${srcdir}/README" -t "${pkgdir}/usr/share/${pkgname}/"
install -Dpm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}/"
sed -i -e 's:\r::g' "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
set +u
# Ensure there are no forbidden paths. Place at the end of package() and comment out as you find or need exceptions. (git-aurcheck)
! test -d "${pkgdir}/bin" || { echo "Line ${LINENO} Forbidden: /bin"; false; }
! test -d "${pkgdir}/sbin" || { echo "Line ${LINENO} Forbidden: /sbin"; false; }
! test -d "${pkgdir}/lib" || { echo "Line ${LINENO} Forbidden: /lib"; false; }
! test -d "${pkgdir}/share" || { echo "Line ${LINENO} Forbidden: /share"; false; }
! test -d "${pkgdir}/usr/sbin" || { echo "Line ${LINENO} Forbidden: /usr/sbin"; false; }
! test -d "${pkgdir}/usr/local" || { echo "Line ${LINENO} Forbidden: /usr/local"; false; }
! grep -lr "/sbin" "${pkgdir}" || { echo "Line ${LINENO} Forbidden: /sbin"; false; }
! grep -lr "/usr/tmp" "${pkgdir}" || { echo "Line ${LINENO} Forbidden: /usr/tmp"; false; }
# Don't know how to fix these.
#! grep -lr "/usr/local" "${pkgdir}" || { echo "Line ${LINENO} Forbidden: /usr/local"; false; }
# The one left is related to the above problem
#! pcre2grep -Ilr "(?<!usr)/bin" "${pkgdir}" || { echo "Line ${LINENO} Forbidden: /bin"; false; }
}
set +u
|