summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMhd Sulhan2015-06-19 05:08:34 +0700
committerMhd Sulhan2015-06-19 05:08:34 +0700
commit5fd9173bdcfceeea0724d9d656874438d1242558 (patch)
treee96fadeaf878910f4a4725a382befa1958960832
downloadaur-5fd9173bdcfceeea0724d9d656874438d1242558.tar.gz
Postgresql database modeler.
-rw-r--r--.SRCINFO29
-rw-r--r--0001.patch81
-rw-r--r--PKGBUILD54
-rw-r--r--pgmodeler-git.install17
-rw-r--r--pgmodeler.desktop9
5 files changed, 190 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..7fe51f917a5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = pgmodeler-git
+ pkgdesc = PostgreSQL Database Modeler
+ pkgver = v0.8.1.beta.r3.ga0fcabf
+ pkgrel = 1
+ url = http://www.pgmodeler.com.br
+ install = pgmodeler-git.install
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = patch
+ depends = qtchooser
+ depends = qt5-base
+ depends = libxml2
+ depends = postgresql-libs
+ depends = desktop-file-utils
+ provides = pgmodeler
+ conflicts = pgmodeler
+ source = pgmodeler-git::git+https://github.com/pgmodeler/pgmodeler.git#branch=0.8.1-beta1
+ source = pgmodeler.desktop
+ source = pgmodeler-git.install
+ source = 0001.patch
+ md5sums = SKIP
+ md5sums = cfc645148c08399b2678d0dd68857706
+ md5sums = ea9cce04170c669434a402c966d257f9
+ md5sums = c7ec0019361f0ff97bc9a73acd794eb2
+
+pkgname = pgmodeler-git
+
diff --git a/0001.patch b/0001.patch
new file mode 100644
index 00000000000..ed385f9b9ef
--- /dev/null
+++ b/0001.patch
@@ -0,0 +1,81 @@
+From 5ed986351102ac3441d19427a87ca3c8cdd83697 Mon Sep 17 00:00:00 2001
+From: Mhd Sulhan <ms@kilabit.info>
+Date: Fri, 19 Jun 2015 01:45:22 +0700
+Subject: [PATCH 1/2] Allow user to set RPATHDIR instead of using
+ PRIVATELIBDIR.
+
+This allow to build pgmodeler in chroot environment with rpath point to
+RPATHDIR instead of path to build directory.
+---
+ pgmodeler.pri | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/pgmodeler.pri b/pgmodeler.pri
+index 5b07b98..76ec4bb 100644
+--- a/pgmodeler.pri
++++ b/pgmodeler.pri
+@@ -69,7 +69,11 @@ linux {
+ !defined(SCHEMASDIR, var): SCHEMASDIR = $$SHAREDIR/schemas
+
+ # Specifies where to find the libraries at runtime
+- QMAKE_RPATHDIR += $$PRIVATELIBDIR
++ defined(RPATHDIR, var) {
++ QMAKE_RPATHDIR += $$RPATHDIR
++ } else {
++ QMAKE_RPATHDIR += $$PRIVATELIBDIR
++ }
+
+ # Forcing the display of some warnings
+ CONFIG(debug, debug|release): QMAKE_CXXFLAGS += "-Wall -Wextra -Wuninitialized"
+@@ -113,7 +117,11 @@ macx {
+ !defined(SCHEMASDIR, var): SCHEMASDIR = $$BINDIR/schemas
+
+ # Specifies where to find the libraries at runtime
+- QMAKE_RPATHDIR += @executable_path/../Frameworks
++ defined(RPATHDIR, var) {
++ QMAKE_RPATHDIR += $$RPATHDIR
++ } else {
++ QMAKE_RPATHDIR += @executable_path/../Frameworks
++ }
+ }
+
+ # Creating constants based upon the custom paths so the GlobalAttributes
+@@ -213,6 +221,7 @@ defineTest(printBuildDetails) {
+ log(" LANGDIR = $$LANGDIR $$LB")
+ log(" SAMPLESDIR = $$SAMPLESDIR $$LB")
+ log(" SCHEMASDIR = $$SCHEMASDIR $$LB $$LB")
++ log(" QMAKE_RPATHDIR= $$QMAKE_RPATHDIR")
+ log("* To change a variable value run qmake again setting the desired value e.g.: $$LB")
+ log(" > qmake PREFIX+=/usr/local -r pgmodeler.pro $$LB $$LB")
+ log("* Proceed with build process by running: $$LB")
+--
+2.4.4
+
+
+From cab1633801b5b87f9dca7213462762e93066fc73 Mon Sep 17 00:00:00 2001
+From: Mhd Sulhan <ms@kilabit.info>
+Date: Fri, 19 Jun 2015 04:15:30 +0700
+Subject: [PATCH 2/2] Fix log output format.
+
+---
+ pgmodeler.pri | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pgmodeler.pri b/pgmodeler.pri
+index 76ec4bb..a45851d 100644
+--- a/pgmodeler.pri
++++ b/pgmodeler.pri
+@@ -220,8 +220,8 @@ defineTest(printBuildDetails) {
+ log(" DOCDIR = $$DOCDIR $$LB")
+ log(" LANGDIR = $$LANGDIR $$LB")
+ log(" SAMPLESDIR = $$SAMPLESDIR $$LB")
+- log(" SCHEMASDIR = $$SCHEMASDIR $$LB $$LB")
+- log(" QMAKE_RPATHDIR= $$QMAKE_RPATHDIR")
++ log(" SCHEMASDIR = $$SCHEMASDIR $$LB")
++ log(" QMAKE_RPATHDIR= $$QMAKE_RPATHDIR $$LB $$LB")
+ log("* To change a variable value run qmake again setting the desired value e.g.: $$LB")
+ log(" > qmake PREFIX+=/usr/local -r pgmodeler.pro $$LB $$LB")
+ log("* Proceed with build process by running: $$LB")
+--
+2.4.4
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e49f53068e3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Sulhan <ms at kilabit.info>
+pkgname=pgmodeler-git
+pkgver=v0.8.1.beta.r3.ga0fcabf
+pkgrel=1
+pkgdesc="PostgreSQL Database Modeler"
+arch=('i686' 'x86_64')
+url="http://www.pgmodeler.com.br"
+license=('GPL3')
+install=${pkgname}.install
+depends=('qtchooser' 'qt5-base' 'libxml2' 'postgresql-libs' 'desktop-file-utils')
+makedepends=('git' 'patch')
+provides=('pgmodeler')
+conflicts=('pgmodeler')
+source=(
+ "${pkgname}::git+https://github.com/pgmodeler/pgmodeler.git#branch=0.8.1-beta1"
+ "pgmodeler.desktop"
+ "pgmodeler-git.install"
+ "0001.patch"
+)
+md5sums=(
+ 'SKIP'
+ 'cfc645148c08399b2678d0dd68857706'
+ 'ea9cce04170c669434a402c966d257f9'
+ 'c7ec0019361f0ff97bc9a73acd794eb2'
+)
+
+_prefix="/usr"
+
+pkgver() {
+ cd "${srcdir}/${pkgname}"
+ ( set -o pipefail
+ # Only uses annotated tags to derive a version number,
+ # add --tags to use un-annotated tags as well
+ git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+build() {
+ cd "${srcdir}/${pkgname}"
+ ## Apply patches.
+ patch -p1 < ../0001.patch
+ ## Build.
+ qmake pgmodeler.pro PREFIX="${pkgdir}${_prefix}" RPATHDIR="${_prefix}/lib/pgmodeler"
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+ make install
+ install -D -m 0644 "${srcdir}/pgmodeler.desktop" "${pkgdir}/usr/share/applications/pgmodeler.desktop"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pgmodeler-git.install b/pgmodeler-git.install
new file mode 100644
index 00000000000..a972e2e444d
--- /dev/null
+++ b/pgmodeler-git.install
@@ -0,0 +1,17 @@
+## arg 1: the new package version
+post_install() {
+ update-desktop-database -q
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ post_install
+}
+
+## arg 1: the old package version
+post_remove() {
+ post_install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pgmodeler.desktop b/pgmodeler.desktop
new file mode 100644
index 00000000000..b281e5bb04c
--- /dev/null
+++ b/pgmodeler.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=pgmodeler
+Exec=/usr/bin/pgmodeler
+Icon=/usr/share/pgmodeler/conf/pgmodeler_logo.png
+Type=Application
+Categories=Application;Development;
+MimeType=text/x-pgmodeler
+Comment=PostgreSQL Database Modeler