summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-barbican_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-barbican_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-barbican_git.bb100
1 files changed, 100 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-barbican_git.bb b/meta-openstack/recipes-devtools/python/python-barbican_git.bb
new file mode 100644
index 0000000..838346c
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-barbican_git.bb
@@ -0,0 +1,100 @@
1DESCRIPTION = "Barbican is a ReST API designed for the secure storage, provisioning and management of secrets."
2HOMEPAGE = "https://wiki.openstack.org/wiki/Barbican"
3SECTION = "devel/python"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=fc8be9e7dffe97390d1216b01fd0be01"
6
7PR = "r0"
8SRCNAME = "barbican"
9
10SRC_URI = "git://github.com/stackforge/barbican.git;branch=master \
11 file://barbican.init \
12 "
13
14SRCREV="177d4499af6b261f48814503e3565f433e86cc66"
15PV="2014.1+git${SRCPV}"
16S = "${WORKDIR}/git"
17
18inherit update-rc.d setuptools identity hosts useradd default_configs
19
20do_install_append() {
21 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
22 BARBICAN_CONF_DIR=${D}${sysconfdir}/${SRCNAME}
23
24 install -d ${BARBICAN_CONF_DIR}
25 cp -r ${TEMPLATE_CONF_DIR}/* ${BARBICAN_CONF_DIR}
26
27 install -d ${D}${localstatedir}/lib/barbican
28
29 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
30 install -d ${D}${sysconfdir}/init.d
31
32 for binary in api; do
33 sed "s:@suffix@:$binary:" < ${WORKDIR}/barbican.init >${WORKDIR}/barbican-$binary.init.sh
34 install -m 0755 ${WORKDIR}/barbican-$binary.init.sh ${D}${sysconfdir}/init.d/barbican-$binary
35 done
36 fi
37}
38
39USERADD_PACKAGES = "${PN}"
40GROUPADD_PARAM_${PN} = "--system barbican"
41USERADD_PARAM_${PN} = "--system --home /var/lib/barbican -g barbican \
42 --no-create-home --shell /bin/false barbican"
43
44PACKAGES += "${SRCNAME} \
45 ${SRCNAME}-setup "
46
47FILES_${PN} = "${libdir}/* \
48"
49FILES_${SRCNAME} = "${sysconfdir}/${SRCNAME}/* \
50 ${sysconfdir}/init.d/barbican-api \
51 ${bindir}/* \
52 ${localstatedir}/* \
53"
54
55ALLOW_EMPTY_${SRCNAME}-setup = "1"
56pkg_postinst_${SRCNAME}-setup () {
57 if [ "x$D" != "x" ]; then
58 exit 1
59 fi
60
61 chown -R barbican:barbican ${sysconfdir}/${SRCNAME}
62 chown -R barbican:barbican ${localstatedir}/lib/barbican
63}
64
65DEPENDS += " \
66 python-pip \
67 python-pbr \
68 "
69
70RDEPENDS_${SRCNAME} = "${PN} \
71 ${SRCNAME}-setup \
72 uwsgi \
73 python-falcon \
74 python-oslo.messaging"
75
76RDEPENDS_${PN} += " \
77 python-pip \
78 python-pbr \
79 python-alembic \
80 python-babel \
81 python-eventlet \
82 python-falcon \
83 python-iso8601 \
84 python-jsonschema \
85 python-kombu \
86 python-netaddr \
87 python-pastedeploy \
88 python-paste \
89 python-pycrypto \
90 python-pysqlite \
91 python-keystoneclient \
92 python-sqlalchemy \
93 python-stevedore \
94 python-webob \
95 python-wsgiref \
96 "
97
98INITSCRIPT_PACKAGES = "${SRCNAME}"
99INITSCRIPT_NAME_${SRCNAME} = "barbican-api"
100INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}"