summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastiaan Lokhorst2018-06-10 11:52:01 +0200
committerSebastiaan Lokhorst2018-07-11 11:22:42 +0200
commita26e19b4cc532a9c16ae2f95a089b4c4d2045ab5 (patch)
tree0a94b8d1a18ba40a41330d33710374ba9fabef9c
parent294760cf1f024d3154c468e79e6cc4888a3723a5 (diff)
downloadaur-a26e19b4cc532a9c16ae2f95a089b4c4d2045ab5.tar.gz
Split into build and package, as recommended by the package guidelines
-rw-r--r--PKGBUILD8
-rw-r--r--odoo.install4
2 files changed, 9 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f3638d55822..44b7d80bd14 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -70,10 +70,16 @@ md5sums=('16203d271c3b1f38357f0c6129669e3c'
backup=('etc/odoo/odoo.conf')
install=odoo.install
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}.post${_pkgsubver}
+ python setup.py build
+}
+
package()
{
cd ${srcdir}/${pkgname}-${pkgver}.post${_pkgsubver}
- python setup.py install --root="${pkgdir}"
+ python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+
mkdir -p ${pkgdir}/etc/{conf.d,odoo}
mkdir -p ${pkgdir}/usr/lib/systemd/system
install -Dm 644 ${srcdir}/odoo.conf ${pkgdir}/etc/odoo/odoo.conf
diff --git a/odoo.install b/odoo.install
index 574fe9aac89..0d29dfcc1de 100644
--- a/odoo.install
+++ b/odoo.install
@@ -1,6 +1,6 @@
post_upgrade() {
- # the systemd-sysusers hook is run *after* this function,
- # so the odoo user might not exist yet
+ # hooks are ran *after* this function, so we have to call
+ # systemd-sysusers manually to make sure the odoo user exists
systemd-sysusers
mkdir -p /var/lib/odoo
chown -R odoo:odoo /var/lib/odoo