summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 245b9576ca8e58e3618d907efb9b5352c8d5518f (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
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

# See http://wiki.archlinux.org/index.php/Python_Package_Guidelines for more
# information on Python packaging.

# Maintainer: Nekmo <contacto@nekmo.com>
pkgname=simple-monitor-alert
pkgver=0.2.5
pkgrel=1
pkgdesc="A simple monitor with alerts for Unix/Linux under the KISS philosophy."
arch=("any")
url=""
license=('MIT')
groups=()
depends=('python' 'python-dateutil' 'python-future' 'python-requests' 'python-six'
         'python-pip' 'python-colorclass-git' 'python-humanize' 'python-terminaltables')
makedepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=(!emptydirs)
install=simple-monitor-alert.install
source=("simple_monitor_alert::git+https://github.com/Nekmo/simple-monitor-alert.git#branch=v0.2.5")
md5sums=("SKIP")
#source=()
#md5sums=()

package() {
  cd "$srcdir/simple_monitor_alert"
  python setup.py install --root="$pkgdir/" --optimize=1 --manual-install
  cd $pkgdir
  # Create directories
  mkdir -p usr/lib/simple-monitor-alert
  mkdir -p usr/lib/systemd/system
  mkdir -p etc/simple-monitor-alert/monitors-enabled
  # Move directories
  ls -l usr
  mv usr/alerts usr/lib/simple-monitor-alert/alerts
  mv usr/monitors usr/lib/simple-monitor-alert/monitors
  # Config file
  mv usr/sma-template.ini etc/simple-monitor-alert/sma.ini
  # Service
  mv usr/services/sma.service usr/lib/systemd/system
  # Create symlinks
  cd "$srcdir/simple_monitor_alert"
  BASE_DIR=$pkgdir python -m simple_monitor_alert.install create-symlinks
  BASE_DIR=$pkgdir python -m simple_monitor_alert.install enable-default-monitors
  # Clean
  cd $pkgdir
  rm -rf usr/services
}

# vim:set ts=2 sw=2 et: