blob: 0aaaef1bac3e0c34efb61410432860b075415f1c (
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
|
# Maintainer: HLFH <gaspard@dhautefeuille.eu>
pkgname=archey4-git
_pkgname=archey4
pkgver=4.14.3.0.r1.gd4a6b16
pkgrel=1
pkgdesc="A simple system information tool written in Python"
arch=('any')
url="https://github.com/HorlogeSkynet/archey4.git"
license=('GPL3')
groups=('utils')
depends=('python>=3.6' 'python-distro' 'python-netifaces')
makedepends=('python-setuptools')
optdepends=('bind-tools: WAN_IP would be detected faster'
'lm_sensors: Temperature would be more accurate'
'pciutils: GPU wouldn'"'"'t be detected without it'
'procps-ng: Many entries wouldn'"'"'t work without it'
'virt-what: Model would contain details about the hypervisor'
'wmctrl: WindowManager would be more accurate')
provides=('archey')
conflicts=('archey-git' 'archey2' 'archey3' 'archey3-git' 'pyarchey' 'archey4')
install="${_pkgname}.install"
backup=("etc/${_pkgname}/config.json")
source=(git+https://github.com/HorlogeSkynet/${_pkgname})
b2sums=('SKIP')
pkgver() {
cd "${srcdir}/${_pkgname}"
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/v//;s/-/./g'
}
build() {
cd "${srcdir}/${_pkgname}"
# Prepare the manual page.
sed \
-e "s/\${DATE}/$(date +'%B %Y')/1" \
-e "s/\${VERSION}/${pkgver}/1" \
archey.1 > dist/archey.1
python3 setup.py build
}
package() {
cd "${srcdir}/${_pkgname}"
python3 setup.py -q install \
--root="$pkgdir" \
--optimize=1 \
--skip-build
# Configuration file.
install -D -m0644 config.json "${pkgdir}/etc/${_pkgname}/config.json"
# Manual page.
install -D -m0644 dist/archey.1 "${pkgdir}/usr/share/man/man1/archey.1"
# Meta-data files.
install -D -m0644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
install -D -m0644 README.md "${pkgdir}/usr/share/${_pkgname}/README.md"
install -D -m0644 COPYRIGHT.md "${pkgdir}/usr/share/${_pkgname}/COPYRIGHT.md"
}
check() {
cd "${srcdir}/${_pkgname}"
python3 -m unittest
}
|