pgadmin4 add to repo

This commit is contained in:
idriskalp
2020-03-25 18:28:42 +03:00
parent d5488a6aac
commit 29c036b174
13 changed files with 287 additions and 163 deletions
-32
View File
@@ -1,32 +0,0 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt.
from pisi.actionsapi import autotools
from pisi.actionsapi import shelltools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
def setup():
shelltools.system("sed -i -e 's/wx-config/wx-config-2.8/' configure")
shelltools.system("sed -i 's/wxrc/wxrc-2.8/g' stringextract pgadmin/ui/embed-xrc")
shelltools.export("WX_CONFIG", "/usr/bin/wx-config-2.8 ")
shelltools.export("WXDIR", "/usr ")
autotools.configure("--disable-static \
--disable-debug \
--with-wx=/usr \
--disable-dependency-tracking \
--with-wx-config=/usr/bin/wx-config-2.8 \
--with-wx-version=2.8")
def build():
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
pisitools.insinto("/usr/share/pixmaps", "pkg/debian/pgadmin3.xpm")
@@ -1,31 +0,0 @@
From d17a268572648b8e45ba6dc5854549a1dbf81c0a Mon Sep 17 00:00:00 2001
From: Wander Nauta <info@wandernauta.nl>
Date: Sun, 19 Apr 2015 16:37:41 +0200
Subject: [PATCH] Move misplaced unlock of s_currentObjectMutex
The current implementation would unlock the mutex, even if it didn't own
it.
---
pgadmin/frm/events.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pgadmin/frm/events.cpp b/pgadmin/frm/events.cpp
index 4baaf42..f2ad570 100644
--- a/pgadmin/frm/events.cpp
+++ b/pgadmin/frm/events.cpp
@@ -750,11 +750,11 @@ void frmMain::OnSelRightClick(wxTreeEvent &event)
//
s_currentObjectMutex.Lock();
currentObject = browser->GetObject(item);
+ s_currentObjectMutex.Unlock();
}
if (currentObject)
doPopup(browser, event.GetPoint(), currentObject);
- s_currentObjectMutex.Unlock();
}
--
2.3.5
@@ -1,11 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Name=pgadmin3
Comment=Graphical client for PostgreSQL
Comment[tr]=PostgreSQL için grafiksel istemci
GenericName=PostgreSQL Tools
GenericName[tr]=PostgreSQL Yönetim Aracı
Exec=pgadmin3
Icon=pgadmin3
Type=Application
Categories=Application;Development;
-81
View File
@@ -1,81 +0,0 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>pgadmin3</Name>
<Homepage>http://www.pgadmin.org</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>BSD</License>
<IsA>app:gui</IsA>
<Summary>Graphical client for PostgreSQL</Summary>
<Description>pgadmin3 is a powerful administration and development platform for the PostgreSQL database, free for any use.</Description>
<Archive sha1sum="2b62630d3ee90b44c440d673ca8bb3dcfe010e18" type="targz">https://ftp.postgresql.org/pub/pgadmin/pgadmin3/v1.22.2/src/pgadmin3-1.22.2.tar.gz</Archive>
<BuildDependencies>
<Dependency>postgresql-lib</Dependency>
<Dependency>libxslt-devel</Dependency>
<Dependency>openssl-devel</Dependency>
<Dependency>wxGTK2.8-devel</Dependency>
<!--Dependency>wxMaxima</Dependency-->
</BuildDependencies>
<!--Patches>
<Patch level="2">0001-Move-misplaced-unlock-of-s_currentObjectMutex.patch</Patch>
</Patches-->
</Source>
<Package>
<Name>pgadmin3</Name>
<RuntimeDependencies>
<Dependency>postgresql-lib</Dependency>
<Dependency>libxslt</Dependency>
<Dependency>libgcc</Dependency>
<Dependency>zlib</Dependency>
<Dependency>libxml2</Dependency>
<Dependency>openssl</Dependency>
<Dependency>wxGTK2.8</Dependency>
<Dependency>wxBase</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="data">/usr/share/pgadmin3</Path>
<Path fileType="data">/usr/share/applications</Path>
<Path fileType="data">/usr/share/pixmaps</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/usr/share/applications/pgadmin3.desktop">pgadmin3.desktop</AdditionalFile>
</AdditionalFiles>
</Package>
<History>
<Update release="4">
<Date>2018-09-09</Date>
<Version>1.22.2</Version>
<Comment>Rebuild New T.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="3">
<Date>2017-01-25</Date>
<Version>1.22.2</Version>
<Comment>Version bump.</Comment>
<Name>Stefan Gronewold</Name>
<Email>groni@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2016-06-08</Date>
<Version>1.22</Version>
<Comment>Release Bump</Comment>
<Name>Pisi Linux Community</Name>
<Email>admin@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2016-02-26</Date>
<Version>1.22</Version>
<Comment>First release</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
</History>
</PISI>
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>pgadmin3</Name>
<Summary xml:lang="tr">PostgreSQL grafik arabirimi</Summary>
<Description xml:lang="tr">wxGTK temelli PostgreSQL grafik arabirimi</Description>
</Source>
</PISI>
+85
View File
@@ -0,0 +1,85 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 2
# See the file http://www.gnu.org/copyleft/gpl.txt
from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
def setup():
# fixes build. so build uses python3 instead of python2
pisitools.dosed("runtime/pgAdmin4.pro", "python-config", "python3-config")
# fixes import error while sphinx builds documentation
pisitools.dosed("web/pgadmin/browser/__init__.py", "_commit, default_render_json", "_commit, _render_json")
shelltools.system(""" export PYTHONVERSION="$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')" """)
shelltools.system(""" sed -E "s|/usr/pgadmin4/web|/usr/lib/pgadmin4/web|g; \
s|/usr/pgadmin4/lib/python[0-9\\.]+|/usr/lib/python${PYTHONVERSION}|g" \
-i runtime/ConfigWindow.ui """)
shelltools.system(""" sed "s|##PYTHONVERSION##|${PYTHONVERSION}|g" -i runtime/Server.cpp """)
shelltools.system(" sed -E -i requirements.txt \
-e '/blinker>?=/d' \
-e '/extras>?=/d' \
-e '/Flask>?=/d' \
-e '/Flask-Login>?=/d' \
-e '/Flask-Migrate>?=/d' \
-e '/Flask-SQLAlchemy>?=/d' \
-e '/Flask-WTF>?=/d' \
-e '/pycrypto>?=/d' \
-e '/passlib>?=/d' \
-e '/pytz>?=/d' \
-e '/simplejson>?=/d' \
-e '/six>?=/d' \
-e '/speaklater>?=/d' \
-e '/sqlparse>?=/d' \
-e '/WTForms>?=/d' \
-e '/psutil>?=/d' \
-e '/psycopg2>?=/d' \
-e '/python-dateutil>?=/d' \
-e '/SQLAlchemy>?=/d' \
-e '/Flask-Gravatar>?=/d' \
-e '/Flask-Mail>?=/d' \
-e '/Flask-Principal>?=/d' \
-e '/Flask-Paranoid>?=/d' \
-e '/htmlmin>?=/d' \
-e '/Flask-Security>?=/d' \
-e '/Flask-HTMLmin>?=/d' \
-e '/Flask-Compress>?=/d' \
-e '/sshtunnel>?=/d' \
-e '/Werkzeug>?=/d' ")
shelltools.system("cat requirements.txt")
shelltools.export("LANG", "en_US.UTF-8")
shelltools.export(" LC_ALL", "en_US.UTF-8")
pisitools.dosed("docs/en_US/Makefile.sphinx", "PYTHON = python", "PYTHON = python3")
shelltools.cd("runtime")
shelltools.system("convert +set date:create +set date:modify pgAdmin4.ico pgAdmin4.png")
shelltools.system("qmake CONFIG+=release")
def build():
autotools.make("docs")
shelltools.cd("runtime")
autotools.make()
def install():
pisitools.insinto("/usr/lib/pgadmin4/runtime", "runtime/pgAdmin4")
pisitools.insinto("/usr/lib/pgadmin4/web", "web/*")
pisitools.insinto("/usr/lib/pgadmin4/docs", "docs*")
pisitools.insinto("/usr/share/icons/hicolor/256x256/apps", "runtime/pgAdmin4-0.png", "pgAdmin4.png")
pisitools.insinto("/usr/share/icons/hicolor/48x48/apps", "runtime/pgAdmin4-1.png", "pgAdmin4.png")
pisitools.insinto("/usr/share/icons/hicolor/32x32/apps", "runtime/pgAdmin4-2.png", "pgAdmin4.png")
pisitools.insinto("/usr/share/icons/hicolor/16x16/apps", "runtime/pgAdmin4-3.png", "pgAdmin4.png")
# add documentation
pisitools.dohtml("docs/en_US/_build/*")
if get.buildTYPE() != "_emul32":
pisitools.dodoc("LICENSE", "README")
@@ -0,0 +1,2 @@
SERVER_MODE = False
HELP_PATH = "/usr/lib/pgadmin4/docs/en_US/_build/html/"
@@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=pgAdmin 4
Exec=/usr/lib/pgadmin4/runtime/pgAdmin4
Icon=pgAdmin4
Type=Application
Categories=Application;Development;Database;
MimeType=text/html
DocPath=/usr/lib/pgadmin4/docs/en_US/_build/html/index.html
Comment=PostgreSQL Tools
Keywords=database;db;sql;query;administration;development;
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
cd /usr/lib/pgadmin4
exec runtime/pgAdmin4 "\$@""
@@ -0,0 +1,33 @@
From 8d3c335b578e7c33942a92194f01ad95c227809f Mon Sep 17 00:00:00 2001
From: anthraxx <levente@leventepolyak.net>
Date: Wed, 19 Dec 2018 01:10:25 +0100
Subject: [PATCH] python: de-vendor venv paths
---
runtime/Server.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/runtime/Server.cpp b/runtime/Server.cpp
index 15344c11..203fe1a9 100644
--- a/runtime/Server.cpp
+++ b/runtime/Server.cpp
@@ -135,11 +135,11 @@ Server::Server(quint16 port, QString key, QString logFileName)
add_to_path(pythonHome, venvPath.canonicalFilePath());
#else
// Build (and canonicalise) the virtual environment path
- QFileInfo venvBinPath(app_dir + "/../venv/bin");
- QFileInfo venvLibPath(app_dir + "/../venv/lib/python");
- QFileInfo venvDynLibPath(app_dir + "/../venv/lib/python/lib-dynload");
- QFileInfo venvSitePackagesPath(app_dir + "/../venv/lib/python/site-packages");
- QFileInfo venvPath(app_dir + "/../venv");
+ QFileInfo venvBinPath("/usr/bin");
+ QFileInfo venvLibPath("/usr/lib/python##PYTHONVERSION##");
+ QFileInfo venvDynLibPath("/usr/lib/python##PYTHONVERSION##/lib-dynload");
+ QFileInfo venvSitePackagesPath("/usr/lib/python##PYTHONVERSION##/site-packages");
+ QFileInfo venvPath("/usr/lib/python##PYTHONVERSION##");
// Prepend the bin directory to the path
add_to_path(path_env, venvBinPath.canonicalFilePath(), true);
--
2.20.1
@@ -0,0 +1,3 @@
#!/bin/sh
cd /usr/lib/pgadmin4
python web/pgAdmin4.py "\$@"
@@ -0,0 +1,12 @@
diff -uprb pgadmin4-4.13.orig/runtime/pgAdmin4.pro pgadmin4-4.13/runtime/pgAdmin4.pro
--- pgadmin4-4.13.orig/runtime/pgAdmin4.pro 2019-10-16 10:07:59.000000000 +0300
+++ pgadmin4-4.13/runtime/pgAdmin4.pro 2019-11-05 18:33:18.524516120 +0200
@@ -75,7 +75,7 @@ else {
QMAKE_CXXFLAGS += $$system($$PYTHON_CONFIG --includes)
QMAKE_LFLAGS += $$system($$PYTHON_CONFIG --ldflags)
- LIBS += $$system($$PYTHON_CONFIG --libs)
+ LIBS += $$system(PYTHON_LIBS=`$$PYTHON_CONFIG --libs --embed` || PYTHON_LIBS=`$$PYTHON_CONFIG --libs`; echo $PYTHON_LIBS)
contains( LIBS, -lpython2.* ) {
DEFINES += PYTHON2
+138
View File
@@ -0,0 +1,138 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>pgadmin4</Name>
<Homepage>https://www.pgadmin.org/</Homepage>
<Packager>
<Name>İdris Kalp</Name>
<Email>idriskalp@gmail.com</Email>
</Packager>
<License>custom</License>
<IsA>app:gui</IsA>
<Summary>Comprehensive design and management interface for PostgreSQL</Summary>
<Description>pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.</Description>
<Archive sha1sum="53e44e5707ab04fd8b499d840a71ad8637cde3c0" type="targz">https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v4.19/source/pgadmin4-4.19.tar.gz</Archive>
<BuildDependencies>
<Dependency>python3-devel</Dependency>
<Dependency>qt5-base-devel</Dependency>
<Dependency>postgresql-lib</Dependency>
<Dependency>imagemagick-devel</Dependency>
<Dependency>python3-setuptools</Dependency>
<Dependency>python3-sphinx</Dependency>
<Dependency>python3-extras</Dependency>
<Dependency>python3-fixtures</Dependency>
<Dependency>python3-html5lib</Dependency>
<Dependency>python3-pbr</Dependency>
<Dependency>python3-mimeparse</Dependency>
<Dependency>python3-pyrsistent</Dependency>
<Dependency>python3-blinker</Dependency>
<Dependency>python3-flask</Dependency>
<Dependency>python3-flask-login</Dependency>
<Dependency>python3-flask-migrate</Dependency>
<Dependency>python3-flask-sqlalchemy</Dependency>
<Dependency>python3-flask-wtf</Dependency>
<Dependency>python3-passlib</Dependency>
<Dependency>python3-pytz</Dependency>
<Dependency>python3-simplejson</Dependency>
<Dependency>python3-six</Dependency>
<Dependency>python3-speaklater</Dependency>
<Dependency>python3-sqlparse</Dependency>
<Dependency>python3-wtforms</Dependency>
<Dependency>python3-psutil</Dependency>
<Dependency>python3-Jinja2</Dependency>
<Dependency>python3-paramiko</Dependency>
<Dependency>python3-psycopg2</Dependency>
<Dependency>python3-cryptography</Dependency>
<Dependency>python3-sqlalchemy</Dependency>
<Dependency>python3-testtools</Dependency>
<Dependency>python3-webencodings</Dependency>
<Dependency>python3-werkzeug</Dependency>
<Dependency>python3-dateutil</Dependency>
<Dependency>python3-flask-gravatar</Dependency>
<Dependency>python3-flask-mail</Dependency>
<Dependency>python3-flask-principal</Dependency>
<Dependency>python3-flask-paranoid</Dependency>
<Dependency>python3-sshtunnel</Dependency>
<Dependency>python3-flask-security</Dependency>
<Dependency>python3-flask-compress</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">pgadmin4-python-de-vendor-venv-paths.patch</Patch>
<Patch level="1">python-3.8.patch</Patch>
</Patches>
</Source>
<Package>
<Name>pgadmin4</Name>
<Summary>Comprehensive design and management interface for PostgreSQL</Summary>
<RuntimeDependencies>
<Dependency>python3</Dependency>
<Dependency>qt5-base</Dependency>
<Dependency>postgresql-lib</Dependency>
<Dependency>imagemagick</Dependency>
<Dependency>python3-blinker</Dependency>
<Dependency>python3-flask</Dependency>
<Dependency>python3-flask-login</Dependency>
<Dependency>python3-flask-migrate</Dependency>
<Dependency>python3-flask-sqlalchemy</Dependency>
<Dependency>python3-flask-wtf</Dependency>
<Dependency>python3-passlib</Dependency>
<Dependency>python3-pytz</Dependency>
<Dependency>python3-simplejson</Dependency>
<Dependency>python3-six</Dependency>
<Dependency>python3-speaklater</Dependency>
<Dependency>python3-sqlparse</Dependency>
<Dependency>python3-wtforms</Dependency>
<Dependency>python3-psutil</Dependency>
<Dependency>python3-Jinja2</Dependency>
<Dependency>python3-paramiko</Dependency>
<Dependency>python3-psycopg2</Dependency>
<Dependency>python3-cryptography</Dependency>
<Dependency>python3-sqlalchemy</Dependency>
<Dependency>python3-testtools</Dependency>
<Dependency>python3-webencodings</Dependency>
<Dependency>python3-werkzeug</Dependency>
<Dependency>python3-dateutil</Dependency>
<Dependency>python3-flask-gravatar</Dependency>
<Dependency>python3-flask-mail</Dependency>
<Dependency>python3-flask-principal</Dependency>
<Dependency>python3-flask-paranoid</Dependency>
<Dependency>python3-sshtunnel</Dependency>
<Dependency>python3-flask-security</Dependency>
<Dependency>python3-flask-compress</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="data">/usr/share</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0755" target="/usr/bin/pgadmin4">pgadmin4</AdditionalFile>
<AdditionalFile owner="root" permission="0755" target="/usr/bin/pgadmin4-server">pgadmin4-server</AdditionalFile>
<AdditionalFile owner="root" permission="0755" target="/usr/share/applications/pgAdmin4.desktop">pgAdmin4.desktop</AdditionalFile>
<AdditionalFile owner="root" permission="0755" target="/usr/lib/pgadmin4/web/config_distro.py">config_distro.py</AdditionalFile>
</AdditionalFiles>
</Package>
<Package>
<Name>pgadmin4-docs</Name>
<Summary>Documentation files for pgadmin4</Summary>
<RuntimeDependencies>
<Dependency release="current">pgadmin4</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="doc">/usr/share/doc/pgadmin4</Path>
</Files>
</Package>
<History>
<Update release="1">
<Date>2020-03-24</Date>
<Version>4.19</Version>
<Comment>First release</Comment>
<Name>Idris Kalp</Name>
<Email>idriskalp@gmail.com</Email>
</Update>
</History>
</PISI>