From 5443350e2d3b7227ae72ec59eb0d6d838fa73b70 Mon Sep 17 00:00:00 2001 From: randomdan Date: Wed, 16 May 2007 15:54:26 +0000 Subject: PostgreSQL 8.2 series now in portage --- dev-db/libpq/Manifest | 9 - dev-db/libpq/files/digest-libpq-8.2.3 | 6 - dev-db/libpq/libpq-8.2.3.ebuild | 114 ----------- dev-db/postgresql/Manifest | 19 -- dev-db/postgresql/files/digest-postgresql-8.2.3 | 12 -- dev-db/postgresql/files/postgresql.conf-8.2 | 47 ----- dev-db/postgresql/files/postgresql.init-8.2 | 58 ------ dev-db/postgresql/postgresql-8.2.3.ebuild | 241 ------------------------ 8 files changed, 506 deletions(-) delete mode 100644 dev-db/libpq/Manifest delete mode 100644 dev-db/libpq/files/digest-libpq-8.2.3 delete mode 100644 dev-db/libpq/libpq-8.2.3.ebuild delete mode 100644 dev-db/postgresql/Manifest delete mode 100644 dev-db/postgresql/files/digest-postgresql-8.2.3 delete mode 100644 dev-db/postgresql/files/postgresql.conf-8.2 delete mode 100644 dev-db/postgresql/files/postgresql.init-8.2 delete mode 100644 dev-db/postgresql/postgresql-8.2.3.ebuild (limited to 'dev-db') diff --git a/dev-db/libpq/Manifest b/dev-db/libpq/Manifest deleted file mode 100644 index 40a419f..0000000 --- a/dev-db/libpq/Manifest +++ /dev/null @@ -1,9 +0,0 @@ -DIST postgresql-base-8.2.3.tar.bz2 8500472 RMD160 8ec01f0ea8ad3a7d380ea2a0564109c718207864 SHA1 a2948e2affdeafc5e81526bb10582a53e6b3601f SHA256 6ad1274bd8e7f3df1c4295d73b93b2176278b4f9b0dc375737bfe75cecefc6e8 -DIST postgresql-opt-8.2.3.tar.bz2 167549 RMD160 f9dad95527f22aaef809b52acbde2b80b0a1ed5a SHA1 ff37f7a5eaacdaaa4993023554ed180b636b1fcf SHA256 fc82d271c988b27515735db463e6f656f0417104f8f0cabfda5c515e15b1876e -EBUILD libpq-8.2.3.ebuild 3287 RMD160 6d8bfa242d9c033060af1b386acc41de11b4468c SHA1 4b374220b2632253d92d742c78ed9d8c85d9fd5a SHA256 8169f43aa40c460f1790f35b63b7a4db2a1eef551e301a70272a63a959cf5fb0 -MD5 94a192d8fa48d815a95b80887e334173 libpq-8.2.3.ebuild 3287 -RMD160 6d8bfa242d9c033060af1b386acc41de11b4468c libpq-8.2.3.ebuild 3287 -SHA256 8169f43aa40c460f1790f35b63b7a4db2a1eef551e301a70272a63a959cf5fb0 libpq-8.2.3.ebuild 3287 -MD5 99d0e94c29c81071b0e90121fd8d5c10 files/digest-libpq-8.2.3 536 -RMD160 2d77d5254876d35e02ea34bb044d916d3b5ee17f files/digest-libpq-8.2.3 536 -SHA256 69a41c059e70800b80e5a00543c50cde097d8dc44459030cce9ae48e356560c5 files/digest-libpq-8.2.3 536 diff --git a/dev-db/libpq/files/digest-libpq-8.2.3 b/dev-db/libpq/files/digest-libpq-8.2.3 deleted file mode 100644 index c98f44c..0000000 --- a/dev-db/libpq/files/digest-libpq-8.2.3 +++ /dev/null @@ -1,6 +0,0 @@ -MD5 c19b529c2a7b3c4850ae65b0a89f1883 postgresql-base-8.2.3.tar.bz2 8500472 -RMD160 8ec01f0ea8ad3a7d380ea2a0564109c718207864 postgresql-base-8.2.3.tar.bz2 8500472 -SHA256 6ad1274bd8e7f3df1c4295d73b93b2176278b4f9b0dc375737bfe75cecefc6e8 postgresql-base-8.2.3.tar.bz2 8500472 -MD5 2381dc8db8d90f78f4db940dc5544d9f postgresql-opt-8.2.3.tar.bz2 167549 -RMD160 f9dad95527f22aaef809b52acbde2b80b0a1ed5a postgresql-opt-8.2.3.tar.bz2 167549 -SHA256 fc82d271c988b27515735db463e6f656f0417104f8f0cabfda5c515e15b1876e postgresql-opt-8.2.3.tar.bz2 167549 diff --git a/dev-db/libpq/libpq-8.2.3.ebuild b/dev-db/libpq/libpq-8.2.3.ebuild deleted file mode 100644 index f70e7c0..0000000 --- a/dev-db/libpq/libpq-8.2.3.ebuild +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvs/lportage/dev-db/libpq/libpq-8.2.3.ebuild,v 1.1 2007-02-16 16:34:28 randomdan Exp $ - -inherit eutils gnuconfig flag-o-matic toolchain-funcs - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" - -DESCRIPTION="PostgreSQL libraries." -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/postgresql-base-${PV}.tar.bz2 - mirror://postgresql/source/v${PV}/postgresql-opt-${PV}.tar.bz2" -LICENSE="POSTGRESQL" -SLOT="4" -IUSE="kerberos nls pam pg-intdatetime readline ssl threads zlib" - -RDEPEND="!<=dev-db/postgresql-8.1.4 - kerberos? ( virtual/krb5 ) - pam? ( virtual/pam ) - readline? ( >=sys-libs/readline-4.1 ) - ssl? ( >=dev-libs/openssl-0.9.6-r1 ) - zlib? ( >=sys-libs/zlib-1.1.3 )" -DEPEND="${RDEPEND} - sys-devel/autoconf - >=sys-devel/bison-1.875 - nls? ( sys-devel/gettext )" - -S="${WORKDIR}/postgresql-${PV}" - -pkg_preinst() { - # Removing wrong symlink created by previous ebuild - if [[ -L "${ROOT}/usr/include/libpq" ]] ; then - rm -f "${ROOT}/usr/include/libpq" - fi -} - -src_unpack() { - unpack ${A} - cd "${S}" -} - -src_compile() { - filter-flags -ffast-math -feliminate-dwarf2-dups - - # Detect mips systems properly - gnuconfig_update - - cd "${S}" - - ./configure --prefix=/usr \ - --includedir=/usr/include/postgresql/libpq-${SLOT} \ - --sysconfdir=/etc/postgresql \ - --mandir=/usr/share/man \ - --host=${CHOST} \ - --with-docdir=/usr/share/doc/${PF} \ - --libdir=/usr/$(get_libdir) \ - --enable-depend \ - $(use_with kerberos krb5) \ - $(use_enable nls ) \ - $(use_with pam) \ - --without-perl \ - $(use_enable pg-intdatetime integer-datetimes ) \ - --without-python \ - $(use_with readline) \ - $(use_with ssl openssl) \ - --without-tcl \ - $(use_enable threads thread-safety ) \ - $(use_with zlib) \ - || die "configure failed" - - cd "${S}/src/interfaces/libpq" - emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "emake libpq failed" - - cd "${S}/src/bin/pg_config" - emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "emake pg_config failed" -} - -src_install() { - cd "${S}/src/interfaces/libpq" - emake DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" install || die "emake install libpq failed" - - cd "${S}/src/include" - emake DESTDIR="${D}" install || die "emake install headers failed" - - cd "${S}/src/bin/pg_config" - emake DESTDIR="${D}" install || die "emake install pg_config failed" - - cd "${S}" - dodoc README HISTORY - - dosym libpq-${SLOT}.a /usr/$(get_libdir)/libpq.a - - for f in $(ls -1 "${D}"/usr/include/postgresql/libpq-${SLOT}/*.h) ; do - dosym postgresql/libpq-${SLOT}/$(basename ${f}) /usr/include/ - done - - dodir /usr/include/libpq - for f in $(ls -1 "${D}"/usr/include/postgresql/libpq-${SLOT}/libpq/*.h) ; do - dosym ../postgresql/libpq-${SLOT}/libpq/$(basename ${f}) /usr/include/libpq/ - done - - cd "${D}/usr/include/postgresql/libpq-${SLOT}" - for f in $(find * -name '*.h' -print) ; do - destdir=$(dirname ${f}) - if [[ ! -d "${D}/usr/include/postgresql/${destdir}" ]] ; then - dodir "/usr/include/postgresql/${destdir}" - fi - dosym /usr/include/postgresql/libpq-${SLOT}/${f} "/usr/include/postgresql/${destdir}/" - done -} - -src_test() { - einfo "No tests available for libpq." -} diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest deleted file mode 100644 index a9d9531..0000000 --- a/dev-db/postgresql/Manifest +++ /dev/null @@ -1,19 +0,0 @@ -AUX postgresql.conf-8.2 1714 RMD160 d726aaffa860620b8b8c30f6f713d3a388adf1e5 SHA1 eb2e7ead1a24f655f513ae68c34e879d58a41928 SHA256 29ae16457bb8e356f84a3368948876480858ed7d346734649ba7049431cb11eb -MD5 fa89b0f3a1fb05a19d803bf69099eda8 files/postgresql.conf-8.2 1714 -RMD160 d726aaffa860620b8b8c30f6f713d3a388adf1e5 files/postgresql.conf-8.2 1714 -SHA256 29ae16457bb8e356f84a3368948876480858ed7d346734649ba7049431cb11eb files/postgresql.conf-8.2 1714 -AUX postgresql.init-8.2 1517 RMD160 0e4078f92c2b1492a7196491c46c102812cd06a7 SHA1 ebd62dc389485e4abd44bb14df959e615c791d39 SHA256 768c7313605d678a16ff0d1c8a47dfdb60ac05feeda602d3cd7433222c58041e -MD5 8a633f5ca3b867d2bbc08c5e0f3fafb6 files/postgresql.init-8.2 1517 -RMD160 0e4078f92c2b1492a7196491c46c102812cd06a7 files/postgresql.init-8.2 1517 -SHA256 768c7313605d678a16ff0d1c8a47dfdb60ac05feeda602d3cd7433222c58041e files/postgresql.init-8.2 1517 -DIST postgresql-base-8.2.3.tar.bz2 8500472 RMD160 8ec01f0ea8ad3a7d380ea2a0564109c718207864 SHA1 a2948e2affdeafc5e81526bb10582a53e6b3601f SHA256 6ad1274bd8e7f3df1c4295d73b93b2176278b4f9b0dc375737bfe75cecefc6e8 -DIST postgresql-docs-8.2.3.tar.bz2 2757963 RMD160 924a86210eca33cef9d373fc702ee7c911e27524 SHA1 8d9a48faed5442f8cade8738df2a89bb167902cc SHA256 88cf0a17ee03dd4e9d0cef282a7a730837abea1bcc804678029778b0dd456094 -DIST postgresql-opt-8.2.3.tar.bz2 167549 RMD160 f9dad95527f22aaef809b52acbde2b80b0a1ed5a SHA1 ff37f7a5eaacdaaa4993023554ed180b636b1fcf SHA256 fc82d271c988b27515735db463e6f656f0417104f8f0cabfda5c515e15b1876e -DIST postgresql-test-8.2.3.tar.bz2 985623 RMD160 fe6ee516bf5b985bbc374b1cadf9eb68c5f4709b SHA1 a322a5df3252e68c2ceec5c1554ace9b3eb353ca SHA256 4efdb72c8bf6f8784719147002ddd3458122b21f054a8f6a921365ddc753db32 -EBUILD postgresql-8.2.3.ebuild 8260 RMD160 1af3274bca7357451433f84fac7f04d711fd7c29 SHA1 b0e3ebfaadfd54fa26e35f303c23bc669a5303a9 SHA256 69d096974c73d4193dafaec1fd96573c4814ae1e10af6802d7e1b0ed4436b41b -MD5 3d3c9d21b5ad3bf15e435748b41d0e4c postgresql-8.2.3.ebuild 8260 -RMD160 1af3274bca7357451433f84fac7f04d711fd7c29 postgresql-8.2.3.ebuild 8260 -SHA256 69d096974c73d4193dafaec1fd96573c4814ae1e10af6802d7e1b0ed4436b41b postgresql-8.2.3.ebuild 8260 -MD5 012bb3d54cd96bd8fdd79bcc05cbabcc files/digest-postgresql-8.2.3 1075 -RMD160 786314334e2d716fe6ae7930025f8c66c927422f files/digest-postgresql-8.2.3 1075 -SHA256 29bc5b6dcfafa938976a0766d27ef259a0bfae76bce90a9772b429533c2cd523 files/digest-postgresql-8.2.3 1075 diff --git a/dev-db/postgresql/files/digest-postgresql-8.2.3 b/dev-db/postgresql/files/digest-postgresql-8.2.3 deleted file mode 100644 index dc537e2..0000000 --- a/dev-db/postgresql/files/digest-postgresql-8.2.3 +++ /dev/null @@ -1,12 +0,0 @@ -MD5 c19b529c2a7b3c4850ae65b0a89f1883 postgresql-base-8.2.3.tar.bz2 8500472 -RMD160 8ec01f0ea8ad3a7d380ea2a0564109c718207864 postgresql-base-8.2.3.tar.bz2 8500472 -SHA256 6ad1274bd8e7f3df1c4295d73b93b2176278b4f9b0dc375737bfe75cecefc6e8 postgresql-base-8.2.3.tar.bz2 8500472 -MD5 66a3ed6319e75b7aee2db0a1efedde59 postgresql-docs-8.2.3.tar.bz2 2757963 -RMD160 924a86210eca33cef9d373fc702ee7c911e27524 postgresql-docs-8.2.3.tar.bz2 2757963 -SHA256 88cf0a17ee03dd4e9d0cef282a7a730837abea1bcc804678029778b0dd456094 postgresql-docs-8.2.3.tar.bz2 2757963 -MD5 2381dc8db8d90f78f4db940dc5544d9f postgresql-opt-8.2.3.tar.bz2 167549 -RMD160 f9dad95527f22aaef809b52acbde2b80b0a1ed5a postgresql-opt-8.2.3.tar.bz2 167549 -SHA256 fc82d271c988b27515735db463e6f656f0417104f8f0cabfda5c515e15b1876e postgresql-opt-8.2.3.tar.bz2 167549 -MD5 81e227d2e1393573c5dd5f762fb99b1e postgresql-test-8.2.3.tar.bz2 985623 -RMD160 fe6ee516bf5b985bbc374b1cadf9eb68c5f4709b postgresql-test-8.2.3.tar.bz2 985623 -SHA256 4efdb72c8bf6f8784719147002ddd3458122b21f054a8f6a921365ddc753db32 postgresql-test-8.2.3.tar.bz2 985623 diff --git a/dev-db/postgresql/files/postgresql.conf-8.2 b/dev-db/postgresql/files/postgresql.conf-8.2 deleted file mode 100644 index 2395674..0000000 --- a/dev-db/postgresql/files/postgresql.conf-8.2 +++ /dev/null @@ -1,47 +0,0 @@ -# PostgreSQL's Database Directory -PGDATA="/var/lib/postgresql/data" - -# PostgreSQL User -PGUSER="postgres" - -# PostgreSQL Group -PGGROUP="postgres" - -# Extra options to run postmaster with -# -N is the maximal number of client connections -# -B is the number of shared buffers and has to be at least 2x the value for -N -# Please read the man-page to postmaster for more options. Many of these options -# can be set directly in the configuration-file. -PGOPTS="-N 512 -B 1024" - - -# SERVER SHUTDOWN: -# The server will receive 3 signals in the worst case: -# 1. SIGTERM -# This signals the server to ignore new connections and to -# wait for all clients to end their transactions before shutting down. -# Use WAIT_FOR_DISCONNECT to control how much time the clients -# should have until the next signal is being sent. -# 2. SIGINT -# Tell the server to forcefully disconnect all clients. -# Terminating a client results in a rollback of the open transactions for this client. -# Use WAIT_FOR_CLEANUP to determine how much time the server has -# for cleanup. (Set it to "forever" if you want to wait forever.) -# 3. SIGQUIT -# This will terminate the server immediately and results in a recovery run for the next start. - -# Wait for clients to disconnect (seconds or "forever") -WAIT_FOR_DISCONNECT=10 - -# Time the server has to clean up (seconds or "forever") -WAIT_FOR_CLEANUP=10 - -# If you have to export environment variables for the database process, -# this can be done here. -# Just define a new variable ENV_identifier="ENV_VAR_NAME=env_var_content", -# ENV_VAR_NAME will then be exported to the postgresql's environment. -# -# Example: -# ENV_plr="R_HOME=/usr/lib/R" -# This exports a variable R_HOME with the content "/usr/lib/R" - diff --git a/dev-db/postgresql/files/postgresql.init-8.2 b/dev-db/postgresql/files/postgresql.init-8.2 deleted file mode 100644 index 39978c6..0000000 --- a/dev-db/postgresql/files/postgresql.init-8.2 +++ /dev/null @@ -1,58 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvs/lportage/dev-db/postgresql/files/postgresql.init-8.2,v 1.1 2007-02-16 16:34:28 randomdan Exp $ - -opts="${opts} reload" - -depend() { - use net -} - -checkconfig() { - if [ ! -d "$PGDATA" ] ; then - eerror "Directory not found: $PGDATA" - eerror "Please make sure that PGDATA points to the right path." - eerror "You can run 'emerge postgresql --config' to setup a new database cluster." - return 1 - fi -} - -start() { - checkconfig || return 1 - - ebegin "Starting PostgreSQL" - - if [ -f "$PGDATA/postmaster.pid" ] ; then - rm -f "$PGDATA/postmaster.pid" - fi - - local env_vars - for var in ${!ENV_*} ; do env_vars="${env_vars} -e ${!var}" ; done - start-stop-daemon --start \ - --pidfile "${PGDATA}/postmaster.pid" \ - --chuid ${PGUSER}:${PGGROUP} \ - --exec /usr/bin/postmaster \ - ${env_vars} -- \ - -D "${PGDATA}" \ - --silent-mode=true \ - ${PGOPTS} - - eend $? -} - -stop() { - ebegin "Stopping PostgreSQL" - # Note: we have to do --oknodo here, otherwise it will always fail - # when there are open transactions. This bug has been corrected - # in baselayout-1.13.0_alpha8. - start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" \ - --retry -TERM/${WAIT_FOR_DISCONNECT}/-INT/${WAIT_FOR_CLEANUP}/-QUIT --oknodo - eend $? -} - -reload() { - ebegin "Reloading PostgreSQL configuration" - start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" --signal HUP --oknodo - eend $? -} diff --git a/dev-db/postgresql/postgresql-8.2.3.ebuild b/dev-db/postgresql/postgresql-8.2.3.ebuild deleted file mode 100644 index b12894c..0000000 --- a/dev-db/postgresql/postgresql-8.2.3.ebuild +++ /dev/null @@ -1,241 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvs/lportage/dev-db/postgresql/postgresql-8.2.3.ebuild,v 1.1 2007-02-16 16:34:28 randomdan Exp $ - -inherit eutils gnuconfig flag-o-matic multilib toolchain-funcs versionator - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" - -DESCRIPTION="Sophisticated and powerful Object-Relational DBMS." -HOMEPAGE="http://www.postgresql.org/" -SRC_URI="mirror://postgresql/source/v${PV}/${PN}-base-${PV}.tar.bz2 - mirror://postgresql/source/v${PV}/${PN}-opt-${PV}.tar.bz2 - doc? ( mirror://postgresql/source/v${PV}/${PN}-docs-${PV}.tar.bz2 ) - mirror://postgresql/source/v${PV}/${PN}-test-${PV}.tar.bz2" -LICENSE="POSTGRESQL" -SLOT="0" -IUSE="doc kerberos nls pam perl pg-intdatetime python readline selinux ssl tcl test xml zlib" - -RDEPEND="~dev-db/libpq-${PV} - >=sys-libs/ncurses-5.2 - kerberos? ( virtual/krb5 ) - pam? ( virtual/pam ) - perl? ( >=dev-lang/perl-5.6.1-r2 ) - python? ( >=dev-lang/python-2.2 dev-python/egenix-mx-base ) - readline? ( >=sys-libs/readline-4.1 ) - selinux? ( sec-policy/selinux-postgresql ) - ssl? ( >=dev-libs/openssl-0.9.6-r1 ) - tcl? ( >=dev-lang/tcl-8 ) - xml? ( dev-libs/libxml2 dev-libs/libxslt ) - zlib? ( >=sys-libs/zlib-1.1.3 )" -DEPEND="${RDEPEND} - sys-devel/autoconf - >=sys-devel/bison-1.875 - nls? ( sys-devel/gettext ) - xml? ( dev-util/pkgconfig )" - -PG_DIR="/var/lib/postgresql" -[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="512" - -pkg_setup() { - if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then - if [[ $(cat "${PG_DIR}/data/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must" - eerror "use pg_dump to export your existing databases to a file, and then" - eerror "pg_restore to import them when you have upgraded completely." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PG_DIR})." - die "Remove your database directory to continue" - fi - fi - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib postgres -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # Prepare package for future tests - if use test ; then - # Fix sandbox violation - sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" -i src/test/regress/{input,output}/tablespace.source - - - # We need to run the tests as a non-root user, portage seems the most fitting here, - # so if userpriv is enabled, we use it directly. If userpriv is disabled, we need to - # su - to a valid user, portage again, so we patch the test-scripts to do that. - mkdir -p "${S}/src/test/regress/tmp_check" - chown portage "${S}/src/test/regress/tmp_check" - einfo "Tests will be run as user portage." - if ! hasq userpriv ${FEATURES} ; then - mkdir -p "${S}/src/test/regress/results" - chown portage "${S}/src/test/regress/results" - sed -e "s|PORTAGETEMPDIRPG|${S}/src/test/regress|g" -i src/test/regress/pg_regress.sh - fi - fi -} - -src_compile() { - filter-flags -ffast-math -feliminate-dwarf2-dups - - # Detect mips systems properly - gnuconfig_update - - cd "${S}" - - ./configure --prefix=/usr \ - --includedir=/usr/include/postgresql/pgsql \ - --sysconfdir=/etc/postgresql \ - --mandir=/usr/share/man \ - --host=${CHOST} \ - --with-docdir=/usr/share/doc/${PF} \ - --libdir=/usr/$(get_libdir) \ - --enable-depend \ - $(use_with kerberos krb5) \ - $(use_enable nls ) \ - $(use_with pam) \ - $(use_with perl) \ - $(use_enable pg-intdatetime integer-datetimes ) \ - $(use_with python) \ - $(use_with readline) \ - $(use_with ssl openssl) \ - $(use_with tcl) \ - $(use_with zlib) \ - || die "configure failed" - - emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "main emake failed" - - cd "${S}/contrib" - emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib emake failed" - - if use xml ; then - cd "${S}/contrib/xml2" - emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib/xml2 emake failed" - fi -} - -src_install() { - if use perl ; then - mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" - sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ - "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile" - fi - - cd "${S}" - emake -j1 DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" install || die "main emake install failed" - - cd "${S}/contrib" - emake -j1 DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" install || die "contrib emake install failed" - - if use xml ; then - cd "${S}/contrib/xml2" - emake -j1 DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" install || die "contrib/xml2 emake install failed" - fi - - cd "${S}" - dodoc README HISTORY - dodoc contrib/adddepend/* - - cd "${S}/doc" - dodoc FAQ* README.* TODO bug.template - - if use doc ; then - cd "${S}/doc" - docinto FAQ_html - dodoc src/FAQ/* - docinto sgml - dodoc src/sgml/*.{sgml,dsl} - docinto sgml/ref - dodoc src/sgml/ref/*.sgml - docinto TODO.detail - dodoc TODO.detail/* - fi - - newinitd "${FILESDIR}/postgresql.init-${PV%.*}" postgresql || die "Inserting init.d-file failed" - newconfd "${FILESDIR}/postgresql.conf-${PV%.*}" postgresql || die "Inserting conf.d-file failed" -} - -pkg_postinst() { - elog "Execute the following command to setup the initial database environment:" - elog - elog "emerge --config =${PF}" - elog - elog "The autovacuum function, which was in contrib, has been moved to the main" - elog "PostgreSQL functions starting with 8.1." - elog "You can enable it in ${ROOT}/etc/postgresql/postgresql.conf." - elog - elog "If you need a global psqlrc-file, you can place it in '${ROOT}/etc/postgresql/'." -} - -pkg_config() { - einfo "Creating the data directory ..." - mkdir -p "${PG_DIR}/data" - chown -Rf postgres:postgres "${PG_DIR}" - chmod 0700 "${PG_DIR}/data" - - einfo "Initializing the database ..." - if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PG_DIR})." - die "Remove your database directory to continue" - else - if use kernel_linux ; then - local SEM=`sysctl -n kernel.sem | cut -f-3` - local SEMMNI=`sysctl -n kernel.sem | cut -f4` - local SEMMNI_MIN=`expr \( ${PG_MAX_CONNECTIONS} + 15 \) / 16` - local SHMMAX=`sysctl -n kernel.shmmax` - local SHMMAX_MIN=`expr 500000 + 30600 \* ${PG_MAX_CONNECTIONS}` - - if [ ${SEMMNI} -lt ${SEMMNI_MIN} ] ; then - eerror "The current value of SEMMNI is too low" - eerror "for PostgreSQL to run ${PG_MAX_CONNECTIONS} connections!" - eerror "Temporary setting this value to ${SEMMNI_MIN} while creating the initial database." - echo ${SEM} ${SEMMNI_MIN} > /proc/sys/kernel/sem - fi - - su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" - - if [ ! `sysctl -n kernel.sem | cut -f4` -eq ${SEMMNI} ] ; then - echo ${SEM} ${SEMMNI} > /proc/sys/kernel/sem - ewarn "Restoring the SEMMNI value to the previous value." - ewarn "Please edit the last value of kernel.sem in /etc/sysctl.conf" - ewarn "and set it to at least ${SEMMNI_MIN}:" - ewarn - ewarn " kernel.sem = ${SEM} ${SEMMNI_MIN}" - ewarn - fi - - if [ ${SHMMAX} -lt ${SHMMAX_MIN} ] ; then - eerror "The current value of SHMMAX is too low for postgresql to run." - eerror "Please edit /etc/sysctl.conf and set this value to at least ${SHMMAX_MIN}:" - eerror - eerror " kernel.shmmax = ${SHMMAX_MIN}" - eerror - fi - else - su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" - fi - - einfo - einfo "You can use the '${ROOT}/etc/init.d/postgresql' script to run PostgreSQL instead of 'pg_ctl'." - einfo - fi -} - -src_test() { - cd "${S}" - - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - if ! emake -j1 check ; then - hasq test ${FEATURES} && die "Make check failed. See above for details." - hasq test ${FEATURES} || eerror "Make check failed. See above for details." - fi - - einfo "Yes, there are other tests which could be run." - einfo "... and no, we don't plan to add/support them." - einfo "For now, the main regressions tests will suffice." - einfo "If you think other tests are necessary, please submit a" - einfo "bug including a patch for this ebuild to enable them." -} -- cgit v1.2.3