]> gitweb.michael.orlitzky.com - mjo-overlay.git/commitdiff
dev-db/pgmodeler: new package
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 14 Dec 2014 22:02:24 +0000 (17:02 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 17 Dec 2014 22:07:01 +0000 (17:07 -0500)
dev-db/pgmodeler/Manifest [new file with mode: 0644]
dev-db/pgmodeler/metadata.xml [new file with mode: 0644]
dev-db/pgmodeler/pgmodeler-0.7.2_alpha1.ebuild [new file with mode: 0644]

diff --git a/dev-db/pgmodeler/Manifest b/dev-db/pgmodeler/Manifest
new file mode 100644 (file)
index 0000000..fe92881
--- /dev/null
@@ -0,0 +1,3 @@
+DIST v0.7.2-alpha1.tar.gz 2202278 SHA256 4659fd9afd223c105642ba05233b8726d14494ab891994010685743145d654d5 SHA512 bc2f359e3473d36a9abd17bce6f94cdfa51ccbde909800ba2ab768aaeb8d38b12d821f4f0a2392e648778ffc81581c8c67945af1c0b60e3a6fedd5334850df05 WHIRLPOOL a5c8a895f741a65963f31dbdc250df74e1889c175e776ce2b6a746348eac6c11d302df9ca630472985ca9006825b5d6e04f2a5334ddce8e7d9cabe8b443adffa
+EBUILD pgmodeler-0.7.2_alpha1.ebuild 2572 SHA256 420e8622666ede697e9533b747030a9876b5d64d6c62f46df2b1c07a43c75112 SHA512 22de86ed2561ffac39056c2f82031d7cef1f2eeda1c6dbe6170e772aecb7aa9e82c12dd757e8b73bcf13ed436df5bf611688802eede90507c45182334c03c3c2 WHIRLPOOL e8dc17bd3cec1f1b0ccb0f5fc8c9be095b4abdda067e4793df8b0d5a0542d6a03acd6382488d2fe24dfbd79e7a1be8bd97a9019ad60485e4207bb16141e29dc0
+MISC metadata.xml 204 SHA256 952ab0590546361a53b9508ff73fa79f531e792e091f2ea2925d0c4be30a10c2 SHA512 123731ee05ba6ec77a736c2aa55148c0c329327a340ff9fe7b2c9ec1df5fb2f68d63495ef53710cc6b94fa4a81f831d0d40b83db6f48a2b046ae1f95fdb406af WHIRLPOOL ff9e85f6f972856b1340abffbede50056a6c6b98c36f17f43b58106dc87fefaab23f15f563c18bcd801fd6da69e9c49af92b349aa93f85ab9637f4f5ab5db3c5
diff --git a/dev-db/pgmodeler/metadata.xml b/dev-db/pgmodeler/metadata.xml
new file mode 100644 (file)
index 0000000..f3b97aa
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer>
+    <email>mjo@gentoo.org</email>
+  </maintainer>
+</pkgmetadata>
diff --git a/dev-db/pgmodeler/pgmodeler-0.7.2_alpha1.ebuild b/dev-db/pgmodeler/pgmodeler-0.7.2_alpha1.ebuild
new file mode 100644 (file)
index 0000000..dc11d5c
--- /dev/null
@@ -0,0 +1,99 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit qmake-utils multilib
+
+DESCRIPTION="Design, diagram, and deploy PostgreSQL databases"
+HOMEPAGE="http://www.pgmodeler.com.br/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV/_/-}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="dev-db/postgresql-base
+       dev-libs/libxml2
+       dev-qt/qtcore:5
+       dev-qt/qtgui:5
+       dev-qt/qtnetwork:5
+       dev-qt/qtprintsupport:5
+       dev-qt/qtwidgets:5"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+DOCS=( CHANGELOG.md README.md )
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+src_prepare() {
+       # Don't build the plugins, their build system doesn't work with a
+       # non-default LIBDIR. See,
+       #
+       #   https://github.com/pgmodeler/pgmodeler/issues/479
+       #
+       sed -i -e '/plugins\/dummy/d' -e '/plugins\/xml2object/d' pgmodeler.pro \
+               || die 'failed to disable plugins'
+
+       sed -i -e 's/TARGET = pgmodeler/TARGET = pgmodeler-bin/' main/main.pro \
+               || die 'failed to rename binary'
+}
+
+src_configure() {
+       local bindir="${D}usr/bin"
+       local libdir="${D}usr/$(get_libdir)"
+       local resdir="${D}usr/share/${PN}"
+       mkdir -p "${bindir}" "${libdir}" "${resdir}" || die
+
+       eqmake5 "${PN}.pro" \
+               BINDIR+="${bindir}" LIBDIR+="${libdir}" RESDIR+="${resdir}"
+}
+
+src_compile() {
+       emake
+}
+
+src_install() {
+       default
+
+       # Install our shell script wrapper.
+       cat <<-EOF > "${T}/pgmodeler"
+       #!/bin/bash
+
+       export PGMODELER_ROOT="${ROOT}usr/share/pgmodeler"
+
+       # There is no good way to install pgmodeler globally for more than one
+       # user, since it requires write access to its own conf files. As a
+       # workaround, we install the upstream conf files globally, and copy them
+       # to the user's home directory before launching pgmodeler.
+       USERDIR="\${HOME}/.pgmodeler"
+       if [ ! -d "\${USERDIR}/conf" ]; then
+               mkdir -p "\${USERDIR}"
+               cp --no-clobber -a "\${PGMODELER_ROOT}/conf" "\${USERDIR}/"
+       fi
+
+       export PGMODELER_CONF_DIR="\${USERDIR}/conf"
+       export PGMODELER_SCHEMAS_DIR="\${PGMODELER_ROOT}/schemas"
+       export PGMODELER_LANG_DIR="\${PGMODELER_ROOT}/lang"
+       export PGMODELER_TMP_DIR="${ROOT}tmp"
+       export PGMODELER_PLUGINS_DIR="\${PGMODELER_ROOT}/plugins" # Not installed
+       export PGMODELER_CHANDLER_PATH="${ROOT}usr/bin/pgmodeler-ch"
+
+       pgmodeler-bin
+       EOF
+
+       dobin "${T}/pgmodeler"
+}
+
+src_test() {
+       einfo ">>> Test phase: ${CATEGORY}/${PF}"
+       cd "${S}/tests" || die
+       eqmake5 tests.pro
+       emake
+       # Before `make install`, all of the binaries and libraries are
+       # stored in ${S}/build.
+       PGMODELER_ROOT="${S}/build" ../build/tests || die "tests failed"
+}