Permalink
Browse files

Branch pgAgent 3.0.0

git-svn-id: svn://svn.pgadmin.org/branches/REL-3_0_0_PATCHES@7698 a7884b65-44f6-0310-8a51-81a127f17b15
  • Loading branch information...
0 parents commit ca980a64df1ac616e9ef69e49906824b67a4023f @dpage dpage committed Mar 13, 2009
@@ -0,0 +1,180 @@
+#######################################################################
+#
+# pgAgent - PostgreSQL tools
+# Copyright (C) 2002 - 2008, The pgAdmin Development Team
+# This software is released under the Artistic Licence
+#
+# CMakeLists.txt - CMake build configuration
+#
+#######################################################################
+
+################################################################################
+# Initial setup
+################################################################################
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+IF(COMMAND cmake_policy)
+ CMAKE_POLICY(SET CMP0003 NEW)
+ENDIF(COMMAND cmake_policy)
+
+SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+
+SET(CMAKE_FIND_LIBRARY_PREFIXES "")
+SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
+
+SET(STATIC_BUILD YES CACHE BOOL "Statically link the executable?")
+
+################################################################################
+# Apple stuff
+################################################################################
+IF(APPLE)
+ # Setup default values
+ IF(NOT HAVE_CACHED_VALUES)
+ IF(EXISTS /Developer/SDKs/MacOSX10.5.sdk)
+ SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
+ SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.5.sdk" CACHE FILEPATH "isysroot used for universal binary support" FORCE)
+ ELSE()
+ IF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
+ SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
+ SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.4u.sdk" CACHE FILEPATH "isysroot used for universal binary support" FORCE)
+ ELSE()
+ MESSAGE(FATAL_ERROR "No supported SDK could be found!")
+ ENDIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
+ ENDIF(EXISTS /Developer/SDKs/MacOSX10.5.sdk)
+ ENDIF(NOT HAVE_CACHED_VALUES)
+
+ # Target Tiger
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.4")
+ENDIF(APPLE)
+
+################################################################################
+# Project config
+################################################################################
+PROJECT(pgagent)
+
+# If changing the version number, remember to change here and under the CPack
+# settings in this file, as well as the definition for pgagent_schema_version()
+# in pgagent.sql and upgrade_pgagent.sql if the major version number is
+# changed. The full version number also needs to be included in pgAgent.rc and
+# pgaevent/pgamsgevent.rc at present.
+SET(VERSION 3.0.0)
+
+# CPack stuff
+SET(CPACK_PACKAGE_VERSION_MAJOR 3)
+SET(CPACK_PACKAGE_VERSION_MINOR 0)
+SET(CPACK_PACKAGE_VERSION_PATCH 0)
+SET(CPACK_PACKAGE_NAME "pgAgent")
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "pgAgent is a job scheduling engine for PostgreSQL")
+SET(CPACK_PACKAGE_VENDOR "the pgAdmin Development Team")
+IF(WIN32)
+ SET(CPACK_GENERATOR ZIP)
+ELSE(WIN32)
+ SET(CPACK_GENERATOR TGZ)
+ENDIF(WIN32)
+SET(CPACK_SOURCE_GENERATOR TGZ)
+SET(CPACK_SOURCE_IGNORE_FILES "\\\\.DS_Store;/CVS/;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;.*~;cscope.*")
+
+ADD_DEFINITIONS(-DPGAGENT_VERSION_MAJOR=${CPACK_PACKAGE_VERSION_MAJOR})
+
+# This must come after we set the CPACK variables!!
+INCLUDE(CPack)
+
+################################################################################
+# Find wxWidgets
+################################################################################
+SET(WX_DEBUG NO CACHE BOOL "Use the debug build of wxWidgets?")
+SET(WX_STATIC ${STATIC_BUILD})
+SET(WX_VERSION "2.8")
+SET(WX_UNICODE YES)
+SET(WX_MODULES "base")
+
+FIND_PACKAGE(WX REQUIRED)
+
+INCLUDE_DIRECTORIES(${WX_INCLUDE_DIRS})
+ADD_DEFINITIONS(${WX_DEFINITIONS})
+LINK_DIRECTORIES(${WX_LIBRARY_DIRS})
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WX_CXX_FLAGS}")
+
+################################################################################
+# Find PostgreSQL
+################################################################################
+SET(PG_STATIC ${WX_STATIC})
+
+FIND_PACKAGE(PG REQUIRED)
+
+INCLUDE_DIRECTORIES(${PG_INCLUDE_DIRS})
+LINK_DIRECTORIES(${PG_LIBRARY_DIRS})
+
+################################################################################
+# Let's rock!
+################################################################################
+INCLUDE_DIRECTORIES(${pgagent_SOURCE_DIR}
+ ${pgagent_SOURCE_DIR}/include)
+
+FILE(GLOB _cpp_files *.cpp)
+FILE(GLOB _h_files include/*.h)
+
+SET(_srcs ${_cpp_files} ${_h_files})
+
+IF(WIN32)
+ SET(_srcs ${_srcs} pgagent.rc)
+ENDIF(WIN32)
+
+ADD_EXECUTABLE(pgagent ${_srcs})
+TARGET_LINK_LIBRARIES(pgagent ${PG_LIBRARIES} ${WX_LIBRARIES})
+
+# Installation
+IF (WIN32)
+ INSTALL(TARGETS pgagent DESTINATION .)
+ INSTALL(FILES ${pgagent_SOURCE_DIR}/pgagent.sql DESTINATION .)
+ INSTALL(FILES ${pgagent_SOURCE_DIR}/pgagent_upgrade.sql DESTINATION .)
+ELSE(WIN32)
+ INSTALL(TARGETS pgagent DESTINATION bin)
+ INSTALL(FILES ${pgagent_SOURCE_DIR}/pgagent.sql DESTINATION share)
+ INSTALL(FILES ${pgagent_SOURCE_DIR}/pgagent_upgrade.sql DESTINATION share)
+ENDIF(WIN32)
+
+INSTALL(FILES ${pgagent_SOURCE_DIR}/README DESTINATION .)
+INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION .)
+
+################################################################################
+# pgaevent
+################################################################################
+IF(WIN32)
+ ADD_SUBDIRECTORY(pgaevent)
+ENDIF(WIN32)
+
+################################################################################
+# Build summary
+################################################################################
+MESSAGE(STATUS " ")
+
+MESSAGE(STATUS "================================================================================")
+MESSAGE(STATUS "Configuration summary:")
+MESSAGE(STATUS " ")
+MESSAGE(STATUS " Project : ${PROJECT_NAME}")
+MESSAGE(STATUS " Description : ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
+MESSAGE(STATUS " Version : ${VERSION}")
+MESSAGE(STATUS " ")
+MESSAGE(STATUS " PostgreSQL version : ${PG_VERSION_STRING}")
+MESSAGE(STATUS " PostgreSQL path : ${PG_ROOT_DIR}")
+MESSAGE(STATUS " PostgreSQL config binary : ${PG_CONFIG_PATH}")
+MESSAGE(STATUS " PostgreSQL include path : ${PG_INCLUDE_DIRS}")
+MESSAGE(STATUS " PostgreSQL library path : ${PG_LIBRARY_DIRS}")
+MESSAGE(STATUS " ")
+MESSAGE(STATUS " wxWidgets version : ${WX_VERSION_STRING}")
+MESSAGE(STATUS " wxWidgets path : ${WX_ROOT_DIR}")
+MESSAGE(STATUS " wxWidgets config binary : ${WX_CONFIG_PATH}")
+MESSAGE(STATUS " wxWidgets Static linking : ${WX_STATIC}")
+MESSAGE(STATUS " wxWidgets Debug? : ${WX_DEBUG}")
+MESSAGE(STATUS "================================================================================")
+MESSAGE(STATUS " ")
+
+################################################################################
+# Give ourselves a hint that we have cached values - must be last!
+################################################################################
+IF(NOT HAVE_CACHED_VALUES)
+ SET(HAVE_CACHED_VALUES 1 CACHE INTERNAL "Flag to indicate that we have cached values")
+ENDIF(NOT HAVE_CACHED_VALUES)
+
+
119 LICENSE
@@ -0,0 +1,119 @@
+BY INSTALLING OR DISTRIBUTING PGADMIN AND RELATED SOFTWARE, YOU AGREE WITH
+THE FOLLOWING DISCLAIMER:
+
+PGADMIN AND RELATED SOFTWARE IS PROVIDED WITHOUT GUARANTEE OR WARRANTY OF
+ANY KIND. TO THE FULLEST EXTENT ALLOWED BY LAW YOU AGREE THAT THE PGADMIN
+DEVELOPMENT TEAM MEMBERS, CONTRIBUTERS OR DISTRIBUTORS OF THE SOFTWARE CANNOT
+AND WILL NOT BE HELD LIABLE FOR ANY DIRECT OR INDIRECT DAMAGE OR LOSSES CAUSED
+WHOLLY OR IN PART BY THE SOFTWARE.
+
+IN COUNTRIES WHERE THE ABSENCE OF LIABILITY MAY NOT EXIST OR BE RESTRICTED
+BY LAW, PGADMIN DEVELOPMENT TEAM MEMBERS, CONTRIBUTORS AND DISTRIBUTORS
+LIABILITY SHALL BE LIMITED TO ONE EURO.
+
+The Artistic License
+====================
+
+Preamble
+
+The intent of this document is to state the conditions under which a Package
+may be copied, such that the Copyright Holder maintains some semblance of
+artistic control over the development of the package, while giving the users
+of the package the right to use and distribute the Package in a more-or-less
+customary fashion, plus the right to make reasonable modifications.
+
+Definitions:
+
+"Package" refers to the collection of files distributed by the Copyright
+Holder, and derivatives of that collection of files created through textual
+modification.
+
+"Standard Version" refers to such a Package if it has not been modified, or
+has been modified in accordance with the wishes of the Copyright Holder.
+
+"Copyright Holder" is whoever is named in the copyright or copyrights for the
+package.
+
+"You" is you, if you're thinking about copying or distributing this Package.
+
+"Reasonable copying fee" is whatever you can justify on the basis of media
+cost, duplication charges, time of people involved, and so on. (You will not
+be required to justify it to the Copyright Holder, but only to the computing
+community at large as a market that must bear the fee.)
+
+"Freely Available" means that no fee is charged for the item itself, though
+there may be fees involved in handling the item. It also means that recipients
+of the item may redistribute it under the same conditions they received it.
+
+1. You may make and give away verbatim copies of the source form of the
+ Standard Version of this Package without restriction, provided that you
+ duplicate all of the original copyright notices and associated disclaimers.
+
+2. You may apply bug fixes, portability fixes and other modifications derived
+ from the Public Domain or from the Copyright Holder. A Package modified in
+ such a way shall still be considered the Standard Version.
+
+3. You may otherwise modify your copy of this Package in any way, provided that
+ you insert a prominent notice in each changed file stating how and when you
+ changed that file, and provided that you do at least ONE of the following:
+
+ a) place your modifications in the Public Domain or otherwise make them
+ Freely Available, such as by posting said modifications to Usenet or an
+ equivalent medium, or placing the modifications on a major archive site
+ such as ftp.uu.net, or by allowing the Copyright Holder to include your
+ modifications in the Standard Version of the Package.
+
+ b) use the modified Package only within your corporation or organization.
+
+ c) rename any non-standard executables so the names do not conflict with
+ standard executables, which must also be provided, and provide a separate
+ manual page for each non-standard executable that clearly documents how
+ it differs from the Standard Version.
+
+ d) make other distribution arrangements with the Copyright Holder.
+
+4. You may distribute the programs of this Package in object code or executable
+ form, provided that you do at least ONE of the following:
+
+ a) distribute a Standard Version of the executables and library files,
+ together with instructions (in the manual page or equivalent) on where
+ to get the Standard Version.
+
+ b) accompany the distribution with the machine-readable source of the
+ Package with your modifications.
+
+ c) accompany any non-standard executables with their corresponding Standard
+ Version executables, giving the non-standard executables non-standard
+ names, and clearly documenting the differences in manual pages (or
+ equivalent), together with instructions on where to get the Standard
+ Version.
+
+ d) make other distribution arrangements with the Copyright Holder.
+
+5. You may charge a reasonable copying fee for any distribution of this
+ Package. You may charge any fee you choose for support of this Package. You
+ may not charge a fee for this Package itself. However, you may distribute
+ this Package in aggregate with other (possibly commercial) programs as part
+ of a larger (possibly commercial) software distribution provided that you do
+ not advertise this Package as a product of your own.
+
+6. The scripts and library files supplied as input to or produced as output
+ from the programs of this Package do not automatically fall under the
+ copyright of this Package, but belong to whomever generated them, and may be
+ sold commercially, and may be aggregated with this Package.
+
+7. C or perl subroutines supplied by you and linked into this Package shall not
+ be considered part of this Package.
+
+8. The name of the Copyright Holder may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+The End
+
+
+
51 README
@@ -0,0 +1,51 @@
+pgAgent
+=======
+
+This document describes the compilation of pgAgent, a job scheduler for
+PostgreSQL.
+
+pgAgent is managed using pgAdmin (http://www.pgadmin.org). The pgAdmin
+documentation contains details of the setup and use of pgAgent with your
+PostgreSQL system. The latest build of the documentation can be found at
+http://www.pgadmin.org/docs/dev/pgagent.html.
+
+Building pgAgent
+----------------
+
+You will need:
+
+- A C/C++ compiler, such as GCC or Microsoft Visual C++ on Windows.
+- CMake 2.6 (from www.cmake.org)
+- A wxWidgets 2.8.x installation, configured per the requirements for
+ pgAdmin:
+ http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/pgadmin3/INSTALL
+- A PostgreSQL 8.3 or higher installation
+
+1) Unpack the pgAgent source code
+2) Create a build directory in which the code will be built.
+3) Run ccmake from the build directory (on Windows, use the CMake graphical
+ interface). By default, ccmake will generate Unix Makefiles - consult the
+ documentation if you wish to generate other types of output:
+
+$ ccmake /path/to/pgagent
+
+4) If required, press 'c' to generate a default configuration:
+
+CMAKE_BUILD_TYPE Release
+CMAKE_INSTALL_PREFIX /usr/local
+CMAKE_OSX_ARCHITECTURES ppc;i386
+CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk
+PostgreSQL_CONFIG_EXECUTABLE /usr/local/pgsql/bin/pg_config
+wxWidgets_CONFIG_EXECUTABLE /usr/local/bin/wx-config
+wxWidgets_USE_DEBUG OFF
+wxWidgets_USE_STATIC ON
+wxWidgets_USE_UNICODE ON
+wxWidgets_wxrc_EXECUTABLE /usr/bin/wxrc
+
+5) Use the ccmake interface to adjust any settings as required. When configured
+ as required, press 'c' to re-configure (if required) and 'g' to generate the
+ build files and exit.
+
+6) Run 'make' to build pgAgent on Mac or Unix, or open the generated project
+ files in VC++ on Windows and build the solution in the desired configuration.
+
Oops, something went wrong.

0 comments on commit ca980a6

Please sign in to comment.