### this file is sourced not run
PKGVER=1.22.0
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=pgadmin3-$PKGVER.tar.gz
MD5SUM=18b34f355f0ee5df762b08b5e51a121e
SRC_URL=https://ftp.postgresql.org/pub/pgadmin3/release/v$PKGVER/src/$TARBALL
BUNDLE=

SLACKREQ='gtk2 wxwidgets libxml2 libxslt postgresql openssl libssh2' # build-time: python-sphinx-doc 
SLACKDESC="pgadmin3: pgadmin3 $PKGVER (Postgres Database Administrator)  
pgadmin3:  
pgadmin3: pgAdmin is the most popular and feature rich Open Source 
pgadmin3: administration and development platform for PostgreSQL. pgAdmin is 
pgadmin3: designed to answer the needs of all users, from writing simple SQL 
pgadmin3: queries to developing complex databases. The graphical interface 
pgadmin3: supports all PostgreSQL features and makes administration easy. The 
pgadmin3: application also includes a syntax highlighting SQL editor, a 
pgadmin3: server-side code editor, an SQL/batch/shell job scheduling agent, 
pgadmin3: support for the Slony-I replication engine and much more.  
pgadmin3: http://www.pgadmin.org/
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/pgadmin* && 

	CONFFLAGS="$CONFFLAGS \
		--with-libgcrypt \
		--with-libz
		--with-wx-version=$(wx-config --release)" &&
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	
	# desktop file
	mkdir -p /usr/share/applications /usr/share/pixmaps &&
	install -m644 /tmp/pkg/pgAdmin3.png /usr/share/pixmaps &&
	install -m644 /tmp/pkg/pgadmin3.desktop /usr/share/applications
}

<< "EOF"
sh-4.2# ./configure --help
`configure' configures pgadmin3 1.22.0 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local/pgadmin3]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/pgadmin3/bin', `/usr/local/pgadmin3/lib' etc.  You can specify
an installation prefix other than `/usr/local/pgadmin3' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/pgadmin3]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --enable-dependency-tracking
                          do not reject slow dependency extractors
  --disable-dependency-tracking
                          speeds up one-time build
  --enable-debug	build a debug version of pgAdmin3
  --enable-static	build a statically linked version of pgAdmin3
  --enable-appbundle	Build a Mac OS X appbundle
  --enable-databasedesigner	build the database designer of pgAdmin3
  --disable-rpath         do not hardcode runtime library paths

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-pgsql=DIR	root directory for PostgreSQL installation
  --with-arch-i386	include an i386 image in an OS X Universal build
  --with-arch-x86_64	include an x86_64 image in an OS X Universal build
  --with-arch-ppc	include a PPC image in an OS X Universal build
  --with-arch-ppc64	include a PPC64 image in an OS X Universal build
  --with-wx-version=<version>	the wxWidgets version in major.minor format (default: 2.8)
  --with-wx=DIR		root directory for wxWidgets installation
  --with-libxml2=DIR	root directory for libxml2 installation
  --with-libxslt=DIR	root directory for libxslt installation
  --with-libgcrypt        Use Libgcrypt for crypto
  --with-openssl          Use OpenSSL for crypto
  --with-libz             Use Libz for compression
  --with-gnu-ld           assume the C compiler uses GNU ld default=no
  --with-libssl-prefix[=DIR]  search for libssl in DIR/include and DIR/lib
  --without-libssl-prefix     don't search for libssl in includedir and libdir
  --with-libgcrypt-prefix[=DIR]  search for libgcrypt in DIR/include and DIR/lib
  --without-libgcrypt-prefix     don't search for libgcrypt in includedir and libdir
  --with-libz-prefix[=DIR]  search for libz in DIR/include and DIR/lib
  --without-libz-prefix     don't search for libz in includedir and libdir
  --with-sphinx-build=FILE sphinx-build executable to build the docs with

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to <pgadmin-support@postgresql.org>.
sh-4.3# 
EOF
