summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5786e25b0f7647b8aeacc9a7fa3a50b80bdc89e4 (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
# Maintainer: Anthony Ruhier <anthony.ruhier@gmail.com>

_name=netbox
pkgname=${_name}
pkgver=2.3.1
_realver="${pkgver}"
pkgrel=2
pkgdesc="IP address management (IPAM) and data center infrastructure management (DCIM) tool."
arch=('any')
url="https://github.com/digitalocean/${_name}"
license=('Apache-2.0')
depends=('python'
         'gunicorn'
         'libffi'
	 'libpgf'
	 'openssl'
	 'python-coreapi'
	 'python-pycryptodomex'
	 'python-django'
	 'python-django-cors-headers'
	 'python-django-debug-toolbar'
	 'python-django-filter'
	 'python-django-mptt'
	 'python-django-rest-framework'
	 'python-django-rest-swagger'
	 'python-django-tables2'
	 'python-graphviz'
	 'python-lxml'
	 'python-markdown'
	 'python-natsort'
	 'python-ncclient'
	 'python-netaddr'
	 'python-openapi-codec'
	 'python-paramiko'
	 'python-pillow'
	 'python-py-gfm'
	 'python-pytz'
	 'python-psycopg2'
	 'python-simplejson'
	 'python-xmltodict'
	 'python-yaml')

conflicts=("${_name}-git")
replaces=("${_name}-git")
install="${_name}.install"
source=("${url}/archive/v${_realver}.tar.gz"
        "${_name}-system.service"
        "${_name}.tmpfile"
	"gunicorn_config.py")
sha256sums=('284c830fcacf99febd1f650fb323cc9ce1c4c31044e4ee70eb791c53f3f10ddb'
            'dc83de37ff9151de3d309fd43c6eff3b30886882012b81fd3ff2f3a5a706bea6'
            '1028bac96ddcd18c10646dff26027b4891fcab4381436e2b6ea3302887a5586f'
            '7a5ae05cad7ec14193a43ef080776b5525c80b6258762a6cb6a108db83861ff9')
backup=('etc/netbox/gunicorn_config.py' 'etc/netbox/configuration.py')

package() {
	install -d -m775 "$pkgdir/etc/${_name}"
	install -d "$pkgdir/opt/"${_name}
	cp -r ${_name}-${_realver}/${_name}/. "$pkgdir/opt/${_name}"

	install -D -m644 ${_name}-system.service "$pkgdir/usr/lib/systemd/system/${_name}.service"
	install -D -m644 ${_name}.tmpfile "$pkgdir/usr/lib/tmpfiles.d/${_name}.conf"

	install -d "$pkgdir/etc/${_name}"
	install -D -m644 gunicorn_config.py "$pkgdir/etc/netbox/gunicorn_config.py"
	install -D -m644 ${_name}-${_realver}/${_name}/${_name}/configuration.example.py "$pkgdir/etc/netbox/configuration.py"
	ln -s /etc/netbox/configuration.py "$pkgdir/opt/netbox/netbox/configuration.py"
}

# vim: set ts=2 sw=2 ft=sh noet: