diff options
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-quantum_2013.1.bb')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-quantum_2013.1.bb | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-quantum_2013.1.bb b/meta-openstack/recipes-devtools/python/python-quantum_2013.1.bb new file mode 100644 index 0000000..f17b01e --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-quantum_2013.1.bb | |||
| @@ -0,0 +1,159 @@ | |||
| 1 | DESCRIPTION = "Quantum (virtual network service)" | ||
| 2 | HOMEPAGE = "https://launchpad.net/quantum" | ||
| 3 | SECTION = "devel/python" | ||
| 4 | LICENSE = "Apache-2.0" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" | ||
| 6 | |||
| 7 | PR = "r0" | ||
| 8 | SRCNAME = "quantum" | ||
| 9 | |||
| 10 | SRC_URI = "https://launchpad.net/${SRCNAME}/grizzly/${PV}/+download/${SRCNAME}-${PV}.tar.gz \ | ||
| 11 | file://fix-amqlib-version.patch \ | ||
| 12 | file://quantum.conf \ | ||
| 13 | file://ovs_quantum_plugin.ini \ | ||
| 14 | file://linuxbridge_conf.ini \ | ||
| 15 | file://quantum-server.init \ | ||
| 16 | file://quantum-agent.init \ | ||
| 17 | " | ||
| 18 | |||
| 19 | #SRC_URI[md5sum] = "06ba502f288e30519f2f13c7b189bfb8" | ||
| 20 | #SRC_URI[sha256sum] = "1fa925e2d95b7c508ad826d3020d67e1f720efa53e5c41eaca790116f2a0f691" | ||
| 21 | |||
| 22 | SRC_URI[md5sum] = "1ad2338b25cfde582de479678533113e" | ||
| 23 | SRC_URI[sha256sum] = "edae19fe45849168bc9cace82b63a11a3b9d2292ba733d4c536657c1c722e61e" | ||
| 24 | |||
| 25 | S = "${WORKDIR}/${SRCNAME}-${PV}" | ||
| 26 | |||
| 27 | inherit setuptools update-rc.d | ||
| 28 | |||
| 29 | do_install_append() { | ||
| 30 | |||
| 31 | QUANTUM_CONF_DIR=${D}${sysconfdir}/quantum | ||
| 32 | |||
| 33 | install -d ${QUANTUM_CONF_DIR} | ||
| 34 | install -d ${QUANTUM_CONF_DIR}/plugins/openvswitch | ||
| 35 | install -d ${QUANTUM_CONF_DIR}/plugins/linuxbridge | ||
| 36 | |||
| 37 | install -m 600 ${WORKDIR}/quantum.conf ${QUANTUM_CONF_DIR}/ | ||
| 38 | install -m 600 ${WORKDIR}/ovs_quantum_plugin.ini ${QUANTUM_CONF_DIR}/plugins/openvswitch/ | ||
| 39 | install -m 600 ${WORKDIR}/linuxbridge_conf.ini ${QUANTUM_CONF_DIR}/plugins/linuxbridge/ | ||
| 40 | install -m 600 ${S}/etc/api-paste.ini ${QUANTUM_CONF_DIR}/ | ||
| 41 | install -m 600 ${S}/etc/policy.json ${QUANTUM_CONF_DIR}/ | ||
| 42 | |||
| 43 | PLUGIN=openvswitch | ||
| 44 | |||
| 45 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
| 46 | install -d ${D}${sysconfdir}/init.d | ||
| 47 | sed "s:@plugin@:/etc/quantum/plugins/$PLUGIN/ovs_quantum_plugin.ini:" \ | ||
| 48 | < ${WORKDIR}/quantum-server.init >${WORKDIR}/quantum-server.init.sh | ||
| 49 | install -m 0755 ${WORKDIR}/quantum-server.init.sh ${D}${sysconfdir}/init.d/quantum-server | ||
| 50 | sed "s:@suffix@:$PLUGIN:" < ${WORKDIR}/quantum-agent.init >${WORKDIR}/quantum-$PLUGIN.init.sh | ||
| 51 | install -m 0755 ${WORKDIR}/quantum-$PLUGIN.init.sh ${D}${sysconfdir}/init.d/quantum-$PLUGIN-agent | ||
| 52 | fi | ||
| 53 | } | ||
| 54 | |||
| 55 | pkg_postinst_${SRCNAME} () { | ||
| 56 | if [ "x$D" != "x" ]; then | ||
| 57 | exit 1 | ||
| 58 | fi | ||
| 59 | |||
| 60 | # quick fix | ||
| 61 | #exit 1 | ||
| 62 | sudo -u postgres createdb quantum | ||
| 63 | } | ||
| 64 | |||
| 65 | PACKAGES += " \ | ||
| 66 | ${SRCNAME} \ | ||
| 67 | ${SRCNAME}-doc \ | ||
| 68 | ${SRCNAME}-server \ | ||
| 69 | ${SRCNAME}-plugin-openvswitch \ | ||
| 70 | ${SRCNAME}-plugin-linuxbridge \ | ||
| 71 | ${SRCNAME}-dhcp-agent \ | ||
| 72 | ${SRCNAME}-l3-agent \ | ||
| 73 | ${SRCNAME}-metadata-agent \ | ||
| 74 | ${SRCNAME}-extra-agents \ | ||
| 75 | " | ||
| 76 | |||
| 77 | FILES_${PN} = "${libdir}/*" | ||
| 78 | |||
| 79 | FILES_${SRCNAME} = " \ | ||
| 80 | ${bindir}/quantum-db-manage \ | ||
| 81 | ${bindir}/quantum-rootwrap \ | ||
| 82 | ${bindir}/quantum-debug \ | ||
| 83 | ${bindir}/quantum-netns-cleanup \ | ||
| 84 | ${bindir}/quantum-ovs-cleanup \ | ||
| 85 | ${sysconfdir}/${SRCNAME}/* " | ||
| 86 | |||
| 87 | FILES_${SRCNAME}-server = "${bindir}/quantum-server \ | ||
| 88 | ${sysconfdir}/init.d/quantum-server \ | ||
| 89 | " | ||
| 90 | |||
| 91 | FILES_${SRCNAME}-plugin-openvswitch = " \ | ||
| 92 | ${bindir}/quantum-openvswitch-agent \ | ||
| 93 | ${sysconfdir}/${SRCNAME}/plugins/openvswitch/ovs_quantum_plugin.ini \ | ||
| 94 | ${sysconfdir}/init.d/quantum-openvswitch-agent \ | ||
| 95 | " | ||
| 96 | |||
| 97 | FILES_${SRCNAME}-plugin-linuxbridge = " \ | ||
| 98 | ${bindir}/quantum-linuxbridge-agent \ | ||
| 99 | ${sysconfdir}/${SRCNAME}/plugins/linuxbridge/linuxbridge_conf.ini \ | ||
| 100 | ${sysconfdir}/init.d/quantum-linuxbridge-agent \ | ||
| 101 | " | ||
| 102 | |||
| 103 | FILES_${SRCNAME}-dhcp-agent = "${bindir}/quantum-dhcp-agent \ | ||
| 104 | ${sysconfdir}/${SRCNAME}/dhcp_agent.ini \ | ||
| 105 | ${sysconfdir}/init.d/dhcp_agent \ | ||
| 106 | " | ||
| 107 | |||
| 108 | FILES_${SRCNAME}-l3-agent = "${bindir}/quantum-l3-agent \ | ||
| 109 | ${sysconfdir}/${SRCNAME}/l3_agent.ini \ | ||
| 110 | ${sysconfdir}/init.d/l3_agent \ | ||
| 111 | " | ||
| 112 | |||
| 113 | FILES_${SRCNAME}-metadata-agent = "${bindir}/quantum-metadata-agent \ | ||
| 114 | ${sysconfdir}/${SRCNAME}/metadata_agent.ini \ | ||
| 115 | ${sysconfdir}/init.d/metadata_agent \ | ||
| 116 | " | ||
| 117 | |||
| 118 | FILES_${SRCNAME}-extra-agents = "${bindir}/*" | ||
| 119 | |||
| 120 | FILES_${SRCNAME}-doc = "${datadir}/*" | ||
| 121 | |||
| 122 | RDEPENDS_${PN} += "python-paste \ | ||
| 123 | python-pastedeploy \ | ||
| 124 | python-routes \ | ||
| 125 | python-amqplib \ | ||
| 126 | python-anyjson \ | ||
| 127 | python-alembic \ | ||
| 128 | python-eventlet \ | ||
| 129 | python-greenlet \ | ||
| 130 | python-httplib2 \ | ||
| 131 | python-iso8601 \ | ||
| 132 | python-kombu \ | ||
| 133 | python-netaddr \ | ||
| 134 | python-quantumclient \ | ||
| 135 | python-sqlalchemy \ | ||
| 136 | python-webob \ | ||
| 137 | python-keystoneclient \ | ||
| 138 | python-oslo.config \ | ||
| 139 | python-pyudev \ | ||
| 140 | python-novaclient \ | ||
| 141 | python-mako \ | ||
| 142 | python-markupsafe \ | ||
| 143 | " | ||
| 144 | |||
| 145 | RDEPENDS_${SRCNAME} = "${PN} \ | ||
| 146 | postgresql postgresql-client python-psycopg2" | ||
| 147 | |||
| 148 | RDEPENDS_${SRCNAME}-server = "${SRCNAME}" | ||
| 149 | RDEPENDS_${SRCNAME}-plugin-openvswitch = "${SRCNAME} openvswitch-switch " | ||
| 150 | RDEPENDS_${SRCNAME}-plugin-linuxbridge = "${SRCNAME} bridge-utils" | ||
| 151 | RDEPENDS_${SRCNAME}-dhcp-agent = "${SRCNAME} dnsmasq" | ||
| 152 | RDEPENDS_${SRCNAME}-l3-agent = "${SRCNAME} ${SRCNAME}-metadata-agent iputils" | ||
| 153 | |||
| 154 | RRECOMMENDS_${SRCNAME}-server = "${SRCNAME}-plugin-openvswitch" | ||
| 155 | |||
| 156 | INITSCRIPT_PACKAGES = "${SRCNAME}-server ${SRCNAME}-plugin-openvswitch ${SRCNAME}-plugin-linuxbridge" | ||
| 157 | INITSCRIPT_NAME_${SRCNAME}-server = "quantum-server" | ||
| 158 | INITSCRIPT_NAME_${SRCNAME}-plugin-openvswitch = "quantum-openvswitch-agent" | ||
| 159 | INITSCRIPT_NAME_${SRCNAME}-plugin-linuxbridge = "quantum-linuxbridge-agent" | ||
