diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile new file mode 100644 index 0000000..7a0cd9a --- /dev/null +++ b/pkg/deb/Makefile @@ -0,0 +1,64 @@ +PGADMIN_NAME=pgAdmin4 + +RUNTIME_SRC_DIR=../../runtime +PACKAGE_NAME_RUNTIME=pgadmin4-runtime +RUNTIME_INSTALL_DIR=debian/$(PACKAGE_NAME_RUNTIME) + +WEB_SRC_DIR=../../web +PACKAGE_NAME_WEB=pgadmin4-web +WEB_INSTALL_DIR=debian/$(PACKAGE_NAME_WEB) + +QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake + +APP_MAJOR_VERSION=$(shell awk '/APP_MAJOR =/ {print $$3}' $(WEB_SRC_DIR)/config.py) +APP_MINOR_VERSION=$(shell awk '/APP_MINOR =/ {print $$3}' $(WEB_SRC_DIR)/config.py) +PGADMIN_VERSION_NAME=$(shell echo $(APP_MAJOR_VERSION).$(APP_MINOR_VERSION)) +PYTHON_SITE_PACKAGE=$(shell python -c "import site; print site.getsitepackages()[1]") + +prep: + # Update spec file, patches, etc, before running spectool: + git pull + +allclean: + git clean -df + +clean: + dpkg-buildpackage -Tclean + $(MAKE) -C $(RUNTIME_SRC_DIR) clean + rm -rf debian/$(PACKAGE_NAME_RUNTIME) + rm -rf debian/$(PACKAGE_NAME_WEB) + rm -rf debian/tmp + rm -rf debian/files + rm -rf debian/*substvars* + rm -rf debian/*.log + rm -rf pgadmin*.deb + #rm -rf $(RUNTIME_SRC_DIR)/Makefile + rm -rf $(WEB_SRC_DIR)/config_local.py + +runtime: prep + #$(QMAKE) pgAdmin4.pro + $(MAKE) -C $(RUNTIME_SRC_DIR) + dpkg-buildpackage -us -uc -b + + mkdir -p $(RUNTIME_INSTALL_DIR)/usr/$(PACKAGE_NAME_RUNTIME)/$(PGADMIN_VERSION_NAME) + @echo "[General]" > $(RUNTIME_INSTALL_DIR)/usr/$(PACKAGE_NAME_RUNTIME)/$(PGADMIN_VERSION_NAME)/pgadmin4.ini + @echo "ApplicationPath=$(PYTHON_SITE_PACKAGE)/$(PACKAGE_NAME_WEB)" >> $(RUNTIME_INSTALL_DIR)/usr/$(PACKAGE_NAME_RUNTIME)/$(PGADMIN_VERSION_NAME)/pgadmin4.ini + @echo "PythonPath=$(PYTHON_SITE_PACKAGE)" >> $(RUNTIME_INSTALL_DIR)/usr/$(PACKAGE_NAME_RUNTIME)/$(PGADMIN_VERSION_NAME)/pgadmin4.ini + + cp $(RUNTIME_SRC_DIR)/pgAdmin4 $(RUNTIME_INSTALL_DIR)/usr/$(PACKAGE_NAME_RUNTIME)/$(PGADMIN_VERSION_NAME) + dpkg-deb --build debian/$(PACKAGE_NAME_RUNTIME) + mv debian/$(PACKAGE_NAME_RUNTIME).deb . + echo "$(PACKAGE_NAME_RUNTIME).deb (Runtime) File is generated" + +web: prep + cp $(WEB_SRC_DIR)/config.py $(WEB_SRC_DIR)/config_local.py + sed -i 's/SERVER_MODE = True/SERVER_MODE = False/g' $(WEB_SRC_DIR)/config_local.py + dpkg-buildpackage -us -uc -b + mkdir -p $(WEB_INSTALL_DIR)/$(PYTHON_SITE_PACKAGE) + cp -r $(WEB_SRC_DIR) $(WEB_INSTALL_DIR)/$(PYTHON_SITE_PACKAGE)/$(PACKAGE_NAME_WEB) + dpkg-deb --build debian/$(PACKAGE_NAME_WEB) + mv debian/$(PACKAGE_NAME_WEB).deb . + echo "$(PACKAGE_NAME_WEB).deb (Web) File is generated" + +all: web runtime + diff --git a/pkg/deb/README b/pkg/deb/README new file mode 100644 index 0000000..7420991 --- /dev/null +++ b/pkg/deb/README @@ -0,0 +1,72 @@ +pgAdmin 4 +========= + +pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the +PostgreSQL (http://www.postgresql.org) database. + +At present, it is an experimental/proof of concept project. Use at your own +risk, and don't blame us if it breaks anything! + +Architecture +------------ + +pgAdmin 4 is being written as a web application in Python, using jQuery and +Bootstrap for the client side processing and UI. On the server side, Flask is +being utilised. + +Although developed using web technologies, we intend for pgAdmin 4 to be usable +either on a web server using a browser, or standalone on a workstation. The +runtime/ subdirectory contains a QT based runtime application intended to allow +this - it is essentially a browser and Python interpretor in one package which +will be capable of hosting the Python application and presenting it to the user +as a desktop application. + +Building +-------- + +To build the runtime, the following packages must be installed: + +- QT 4.6 or above (older versions may work, but haven't been tested). +- Python 2.6 or above. +- debhelper, dpkg-dev,aptitude,devscripts,build-essential,qt-sdk,python-dev,libqt5webkit5-dev +- Requirement2 / Requirment3 throught app-get install. + +Assuming both qmake and python-config are in the path: + +$ cd $PGADMIN4_SRC/runtime +$ qmake +# qmake will generate Makefile + +Edit Makefile +Remove -lpython2.7 from LFLAGS and add to LIBS @ the end +Ex: +LIBS = $(SUBLIBS) -L/usr/X11R6/lib64 -lQt5WebKitWidgets -L/usr/lib/x86_64-linux-gnu -lQt5Quick -lQt5OpenGL -lQt5PrintSupport -lQt5WebKit -lQt5Qml -lQt5Location -lQt5Widgets -lQt5Network -lQt5Positioning -lQt5Sensors -lQt5Gui -lQt5Core -lGL -lpthread -lpython2.7 + +$ cd $PGADMIN4_SRC/pkg/deb +$ make web | runtime | all + +It would generate + +pgAdmin 4 is completely experiemental and unsupported! + +Project info +------------ + +The source code repository can be found here: + +http://git.postgresql.org/gitweb/?p=pgadmin4.git;a=summary + +A Redmine project for pgAdmin 4 can be found at the address below. A PostgreSQL +community account is required to access this site. Please note that at present +only project developers can log bug and feature requests: + +https://redmine.postgresql.org/projects/pgadmin4 + +If you wish to discuss pgAdmin 4, or contribute to the project, please use the +pgAdmin Hackers mailing list: + +pgadmin-hackers@postgresql.org + +-- +Dave Page +pgAdmin Project Lead diff --git a/pkg/deb/debian/changelog b/pkg/deb/debian/changelog new file mode 100644 index 0000000..e7fdc4f --- /dev/null +++ b/pkg/deb/debian/changelog @@ -0,0 +1,14 @@ +pgadmin4 (1.0-dev) experiemental; urgency=low + + + * pgAdmin 4 is designed to answer the needs of all users, from writing + simple SQL queries to developing complex databases. The graphical + interface supports all PostgreSQL features and makes administration + easy. The application also includes a syntax highlighting SQL editor, a + server-side code editor, an SQL/batch/shell job scheduling agent, + support for the Slony-I replication engine and much more. Server + connection may be made using TCP/IP or Unix Domain Sockets (on *nix + platforms), and may be SSL encrypted for security. No additional + drivers are required to communicate with the database server + + -- pgamin4 hackers Tue, 26 Apr 2016 22:56:02 +0200 diff --git a/pkg/deb/debian/control b/pkg/deb/debian/control new file mode 100644 index 0000000..f3eac80 --- /dev/null +++ b/pkg/deb/debian/control @@ -0,0 +1,62 @@ +Source: pgadmin4 +Section: misc +Priority: optional +Maintainer: pgamin4 hackers +Build-Depends: debhelper, dpkg-dev,aptitude,devscripts,build-essential,qt-sdk,python-dev,libqt5webkit5-dev +Standards-Version: 1.0.0 + +Package: pgadmin4 +Architecture: all +Description: graphical administration tool for PostgreSQL + pgAdmin 4 is a database design and management application for use with + PostgreSQL. The application can be used to manage PostgreSQL 7.3 and above + running on any platform. + . + pgAdmin 4 is designed to answer the needs of all users, from writing + simple SQL queries to developing complex databases. The graphical + interface supports all PostgreSQL features and makes administration + easy. The application also includes a syntax highlighting SQL editor, a + server-side code editor, an SQL/batch/shell job scheduling agent, + support for the Slony-I replication engine and much more. Server + connection may be made using TCP/IP or Unix Domain Sockets (on *nix + platforms), and may be SSL encrypted for security. No additional + drivers are required to communicate with the database server. + . + Homepage: http://www.pgadmin.org/ + +Package: pgadmin4-web +Architecture: all +#Depends: python-flask,python-babel,python-flask-gravatar,python-flask-login,python-flask-mail,python-flask-principal,python-flask-sqlalchemy,python-flask-security,python-flask-wtf,python-jinja2,python-markupsafe,python-sqlalchemy,python-wtforms,python-werkzeug,python-argparse,python-linker,python-django-htmlmin,python-html5lib,python-itsdangerous,python-passlib,python-psycopg2,python-pytz,python-six,python-speaklater,python-pycrypto,python-simplejson,python-beautifulsoup4,python-wsgiref,python-importlib +Depends: python-flask,python-babel,python-flask-login,python-flask-principal,python-flask-sqlalchemy,python-jinja2,python-markupsafe,python-sqlalchemy,python-werkzeug,python-argparse,python-html5lib,python-itsdangerous,python-passlib,python-psycopg2,python-six,python-speaklater,python-simplejson,python-wsgiref,python-importlib +Description: graphical administration tool for PostgreSQL - documentation + pgAdmin 4 is a database design and management application for use with + PostgreSQL. The application can be used to manage PostgreSQL 7.3 and above + running on any platform. + . + pgAdmin 4 is designed to answer the needs of all users, from writing + simple SQL queries to developing complex databases. The graphical + interface supports all PostgreSQL features and makes administration + easy. The application also includes a syntax highlighting SQL editor, a + server-side code editor, an SQL/batch/shell job scheduling agent, + support for the Slony-I replication engine and much more. Server + connection may be made using TCP/IP or Unix Domain Sockets (on *nix + platforms), and may be SSL encrypted for security. No additional + drivers are required to communicate with the database server. + . + Homepage: http://www.pgadmin.org/ + +Package: pgadmin4-runtime +#Depends: pgadmin4-web (= ${Source-Version}), ${shlibs:Depends} +Depends: pgadmin4-web +Architecture: all +#Enhances: pgadmin4(= ${Source-Version}) +#Conflicts: pgadmin4 (<< 1.0.2-1) +#Replaces: pgadmin4 (<< 1.0.2-1) +Description: graphical administration tool for PostgreSQL - documentation + pgAdmin III is a database design and management application for use with + PostgreSQL. + . + This package contains the documentation for pgAdmin III in English language. + This package is mandatory to get the pgAdmin III help system to run smoothly. + . + Homepage: http://www.pgadmin.org/ diff --git a/pkg/deb/debian/rules b/pkg/deb/debian/rules new file mode 100755 index 0000000..affd14f --- /dev/null +++ b/pkg/deb/debian/rules @@ -0,0 +1,97 @@ +#!/usr/bin/make -f + +PACKAGE_NAME_RUNTIME=pgadmin4-runtime +PACKAGE_NAME_WEB=pgadmin4-web +BINARY_NAME_RUNTIME=pgAdmin4 +SRC_DIR=$(CURDIR)/../../runtime + +configure: + #qmake ~pareshmore/svn/pgadmin4/runtime/pgAdmin4.pro + +build: + #$(MAKE) -C $(SRC_DIR) + + +clean: + #dh_testdir + #dh_testroot + #dh_clean + #rm -rf $(CURDIR)/$(BINARY_NAME) + #$(MAKE) -C $(SRC_DIR) clean + #rm *.deb + + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installman + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# binary-arch/binary-indep +# in another 'make' thread. +spec-binary-indep: + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + + + +# Must not depend on anything. This is to be called by +# binary-arch/binary-indep +# in another 'make' thread. +spec-binary-arch: + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installmenu + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + + #make -f debian/rules $(doPgA3Wx)-clean + +# Build architecture independant packages using the common target. +binary-indep: build install + $(MAKE) -f debian/rules DH_OPTIONS=-i spec-binary-indep + +# Build architecture dependant packages using the common target. +binary-arch: build install + $(MAKE) -f debian/rules DH_OPTIONS=-a spec-binary-arch + +binary: binary-indep binary-arch +.PHONY: build clean orig binary-indep binary-arch binary install +