[csw-devel] SF.net SVN: gar:[7784] csw/mgar/pkg/mysql5/branches/mysql-5.0.x

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Dec 28 20:53:25 CET 2009


Revision: 7784
          http://gar.svn.sourceforge.net/gar/?rev=7784&view=rev
Author:   wahwah
Date:     2009-12-28 19:53:25 +0000 (Mon, 28 Dec 2009)

Log Message:
-----------
mysql5: Added symlinks to allow other programs to find the shared libraries. http://www.opencsw.org/bugtrack/view.php?id=4098

Modified Paths:
--------------
    csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile

Property Changed:
----------------
    csw/mgar/pkg/mysql5/branches/mysql-5.0.x/


Property changes on: csw/mgar/pkg/mysql5/branches/mysql-5.0.x
___________________________________________________________________
Modified: svn:externals
   - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2

   + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2-checkpkg


Modified: csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile	2009-12-28 19:47:28 UTC (rev 7783)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile	2009-12-28 19:53:25 UTC (rev 7784)
@@ -2,13 +2,18 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-GARNAME = mysql5
-MYSQL_MINOR_VERSION = 0
-MYSQL_PATCHLEVEL = 87
-GARVERSION = 5.$(MYSQL_MINOR_VERSION).$(MYSQL_PATCHLEVEL)
+PROJ_NAME = mysql
+GARNAME = $(PROJ_NAME)5
+BASE_VERSION = 5.0
+PATCHLEVEL = 87
+GARVERSION = $(BASE_VERSION).$(PATCHLEVEL)
 CATEGORIES = server
 
+# Useful when making a series of builds on the same day
+# GARFLAVOR ?= DBG
+
 DISTNAME = mysql-$(GARVERSION)
+SPKG_SOURCEURL = http://www.mysql.com/
 
 DESCRIPTION = Multithreaded SQL database server
 define BLURB
@@ -16,108 +21,126 @@
   (Structured Query Language) database server.
 endef
 
-# Change prefix to /opt/csw/mysql5
-prefix = /opt/csw/mysql5
-sysconfdir = /etc/opt/csw/mysql5
-localstatedir = /var/opt/csw/mysql5
+# Change prefix to /opt/csw/$(GARNAME)
+prefix = /opt/csw/$(GARNAME)
+localstatedir = /var/opt/csw/$(GARNAME)
+sysconfdir = /etc/opt/csw/$(GARNAME)
+
+# Where to put the init script
 global_sysconfdir = /etc/opt/csw
+# Where to link the binaries
 global_bindir = /opt/csw/bin
 
-INITSMF = $(global_sysconfdir)/init\.d/cswmysql5
+INITSMF = $(global_sysconfdir)/init\.d/csw$(GARNAME)
 
+PACKAGES  = CSW$(GARNAME) CSW$(GARNAME)bench CSW$(GARNAME)client CSW$(GARNAME)devel
+PACKAGES += CSW$(GARNAME)rt CSW$(GARNAME)test
+
 PATCHFILES  = 0001-Use-libc-not-libcrypt.patch
 PATCHFILES += 0002-cast-user_info-pw_gid-to-gid_t.patch
 PATCHFILES += 0003-OpenCSW-perl-for-tests.patch
 PATCHFILES += 0004-basedir-and-datadir-in-the-cnf-files.patch
 
-PACKAGES  = CSWmysql5 CSWmysql5bench CSWmysql5client CSWmysql5devel
-PACKAGES += CSWmysql5rt CSWmysql5test
+SPKG_DESC_CSW$(GARNAME)       = Multithreaded SQL database
+SPKG_DESC_CSW$(GARNAME)bench  = MySQL $(BASE_VERSION) benchmarking
+SPKG_DESC_CSW$(GARNAME)client = MySQL $(BASE_VERSION) client binaries
+SPKG_DESC_CSW$(GARNAME)devel  = MySQL $(BASE_VERSION) header files
+SPKG_DESC_CSW$(GARNAME)rt     = MySQL $(BASE_VERSION) runtime files
+SPKG_DESC_CSW$(GARNAME)test   = MySQL $(BASE_VERSION) testing files
 
-CATALOGNAME_CSWmysql5       = $(GARNAME)
-CATALOGNAME_CSWmysql5bench  = $(GARNAME)bench
-CATALOGNAME_CSWmysql5client = $(GARNAME)client
-CATALOGNAME_CSWmysql5devel  = $(GARNAME)devel
-CATALOGNAME_CSWmysql5rt     = $(GARNAME)rt
-CATALOGNAME_CSWmysql5test   = $(GARNAME)test
+CATALOGNAME_CSW$(GARNAME)       = $(GARNAME)
+CATALOGNAME_CSW$(GARNAME)bench  = $(GARNAME)bench
+CATALOGNAME_CSW$(GARNAME)client = $(GARNAME)client
+CATALOGNAME_CSW$(GARNAME)devel  = $(GARNAME)devel
+CATALOGNAME_CSW$(GARNAME)rt     = $(GARNAME)rt
+CATALOGNAME_CSW$(GARNAME)test   = $(GARNAME)test
 
-SPKG_DESC_CSWmysql5       = Multithreaded SQL database
-SPKG_DESC_CSWmysql5bench  = MySQL 5 benchmarking
-SPKG_DESC_CSWmysql5client = MySQL 5 client binaries
-SPKG_DESC_CSWmysql5devel  = MySQL 5 header files
-SPKG_DESC_CSWmysql5rt     = MySQL 5 runtime files
-SPKG_DESC_CSWmysql5test   = MySQL 5 testing files
 
 ARCHALL_CSWmysql5bench = 1
 
 # Defining the client programs, which are going to pick up the 32- and 64-bit
 # binaries, symbolic links, isaexec stuff and man pages.
-CSWmysql5client_programs  = myisamlog
-CSWmysql5client_programs += myisampack
-CSWmysql5client_programs += mysql
-CSWmysql5client_programs += mysqlaccess
-CSWmysql5client_programs += mysqladmin
-CSWmysql5client_programs += mysqlbin
-CSWmysql5client_programs += mysqlbinlog
-CSWmysql5client_programs += mysqlcheck
-CSWmysql5client_programs += mysql_client_test
-CSWmysql5client_programs += mysqldump
-CSWmysql5client_programs += mysqlhotcopy
-CSWmysql5client_programs += mysqlimport
-CSWmysql5client_programs += mysqlshow
-CSWmysql5client_programs += mysql_zap
-CSWmysql5client_programs += perror
-CSWmysql5client_programs += replace
+CSW$(GARNAME)client_programs  = myisamlog
+CSW$(GARNAME)client_programs += myisampack
+CSW$(GARNAME)client_programs += mysql
+CSW$(GARNAME)client_programs += mysqlaccess
+CSW$(GARNAME)client_programs += mysqladmin
+CSW$(GARNAME)client_programs += mysqlbin
+CSW$(GARNAME)client_programs += mysqlbinlog
+CSW$(GARNAME)client_programs += mysqlcheck
+CSW$(GARNAME)client_programs += mysql_client_test
+CSW$(GARNAME)client_programs += mysqldump
+CSW$(GARNAME)client_programs += mysqlhotcopy
+CSW$(GARNAME)client_programs += mysqlimport
+CSW$(GARNAME)client_programs += mysqlshow
+CSW$(GARNAME)client_programs += mysql_zap
+CSW$(GARNAME)client_programs += perror
+CSW$(GARNAME)client_programs += replace
 
-CSWmysql5devel_programs += mysql_config
+# Without this EXTRA_LD_OPTIONS setting, /opt/csw/bin/mysql fails with a shared
+# library not found.  EXTRA_LIB was tried too, but did not work, as the -R path
+# ended up with having two $ISALIST tokens.
+#
+# Without this setting it looks for:
+# /opt/csw/$(GARNAME)/lib/amd64/libmysqlclient.so.15
+# The library is at:
+# /opt/csw/$(GARNAME)/lib/amd64/mysql/libmysqlclient.so.15
+EXTRA_LD_OPTIONS  = -R$(libdir)/\$$ISALIST/mysql
 
-PKGFILES_CSWmysql5bench   = $(prefix)/sql-bench.*
-PKGFILES_CSWmysql5client  = $(bindir)
-PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),$(call baseisadirs,$(bindir),$(bin_name)))
-PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),$(mandir)/man1/$(bin_name)\.1)
-PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),/opt/csw/bin/$(bin_name))
-PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),/opt/csw/sbin/$(bin_name))
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),$(call baseisadirs,$(bindir),$(bin_name)))
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),$(mandir)/man1/$(bin_name)\.1)
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),/opt/csw/bin/$(bin_name))
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),/opt/csw/sbin/$(bin_name))
-PKGFILES_CSWmysql5devel  += $(mandir)/man1/mysql_config\.1
-PKGFILES_CSWmysql5devel  += $(prefix)/include.*
-PKGFILES_CSWmysql5devel  += /opt/csw/include/mysql
+CSW$(GARNAME)devel_programs += mysql_config
 
-PKGFILES_CSWmysql5rt      = $(prefix)/lib/.*\.so.*
-PKGFILES_CSWmysql5test    = $(prefix)/mysql-test.*
+# Enable 64 bits build
+BUILD64 = 1
 
-REQUIRED_PKGS_CSWmysql5bench       = CSWmysql5
-REQUIRED_PKGS_CSWmysql5client      = CSWmysql5rt
-REQUIRED_PKGS_CSWmysql5            = CSWmysql5client CSWmysql5rt
-REQUIRED_PKGS_CSWmysql5devel       = CSWmysql5
-REQUIRED_PKGS_CSWmysql5test        = CSWmysql5 CSWperl
+PKGFILES_CSW$(GARNAME)bench   = $(prefix)/sql-bench.*
+PKGFILES_CSW$(GARNAME)client  = $(bindir)
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),$(call baseisadirs,$(bindir),$(bin_name)))
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),$(mandir)/man1/$(bin_name)\.1)
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),/opt/csw/bin/$(bin_name))
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),/opt/csw/sbin/$(bin_name))
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),$(call baseisadirs,$(bindir),$(bin_name)))
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),$(mandir)/man1/$(bin_name)\.1)
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),/opt/csw/bin/$(bin_name))
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),/opt/csw/sbin/$(bin_name))
+PKGFILES_CSW$(GARNAME)devel  += $(mandir)/man1/mysql_config\.1
+PKGFILES_CSW$(GARNAME)devel  += $(prefix)/include.*
+PKGFILES_CSW$(GARNAME)devel  += /opt/csw/include/mysql
 
-MASTER_SITES = ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.$(MYSQL_MINOR_VERSION)/
+PKGFILES_CSW$(GARNAME)rt      = $(libdir)
+PKGFILES_CSW$(GARNAME)rt     += $(libdir)/.*
+PKGFILES_CSW$(GARNAME)test    = $(prefix)/mysql-test.*
+
+REQUIRED_PKGS_CSW$(GARNAME)            = CSW$(GARNAME)client
+REQUIRED_PKGS_CSW$(GARNAME)           += CSW$(GARNAME)rt
+# REQUIRED_PKGS_CSW$(GARNAME)           += CSWosslrt
+REQUIRED_PKGS_CSW$(GARNAME)           += CSWzlib
+# REQUIRED_PKGS_CSW$(GARNAME)rt          = CSWosslrt
+REQUIRED_PKGS_CSW$(GARNAME)rt         += CSWzlib
+REQUIRED_PKGS_CSW$(GARNAME)bench       = CSW$(GARNAME)
+REQUIRED_PKGS_CSW$(GARNAME)bench      += CSWperl
+REQUIRED_PKGS_CSW$(GARNAME)client      = CSW$(GARNAME)rt
+# REQUIRED_PKGS_CSW$(GARNAME)client     += CSWosslrt
+REQUIRED_PKGS_CSW$(GARNAME)client     += CSWncurses
+REQUIRED_PKGS_CSW$(GARNAME)client     += CSWzlib
+REQUIRED_PKGS_CSW$(GARNAME)devel       = CSW$(GARNAME)
+REQUIRED_PKGS_CSW$(GARNAME)test        = CSW$(GARNAME)
+REQUIRED_PKGS_CSW$(GARNAME)test       += CSWperl
+
+MASTER_SITES = ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-$(BASE_VERSION)/
 DISTFILES  = mysql-$(GARVERSION).tar.gz
-DISTFILES += cswmysql5 quick_start-csw README.CSW ChangeLog
-DISTFILES += CSWmysql5.preinstall
-DISTFILES += CSWmysql5.postinstall
+DISTFILES += csw$(GARNAME) quick_start-csw README.CSW ChangeLog
+DISTFILES += CSW$(GARNAME).preinstall
+DISTFILES += CSW$(GARNAME).postinstall
 DISTFILES += cswusergroup
 
 UFILES_REGEX = mysql-(\d+(?:\.\d+)*).tar.gz
 
-REQUIRED_PKGS = CSWncurses CSWzlib
+# TODO: Do the proper prerequsite pkgs.
 PREREQUISITE_PKGS = $(REQUIRED_PKGS)
 
 EXTRA_CFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
 EXTRA_CXXFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
 
-# Without this EXTRA_LD_OPTIONS setting, /opt/csw/bin/mysql fails with a shared
-# library not found.  EXTRA_LIB was tried too, but did not work, as the -R path
-# ended up with having two $ISALIST tokens.
-#
-# Without this setting it looks for:
-# /opt/csw/mysql5/lib/amd64/libmysqlclient.so.15
-# The library is at:
-# /opt/csw/mysql5/lib/amd64/mysql/libmysqlclient.so.15
-EXTRA_LD_OPTIONS  = -R/opt/csw/mysql5/lib/\$$ISALIST/mysql
-
 # Set ./configure options
 CONFIGURE_ARGS  = $(DIRPATHS)
 CONFIGURE_ARGS += --disable-assembler
@@ -130,50 +153,66 @@
 CONFIGURE_ARGS += --with-zlib-dir=/opt/csw
 CONFIGURE_ARGS += --with-ssl=/opt/csw
 CONFIGURE_ARGS += --with-plugins=max-no-ndb
+CONFIGURE_ARGS_DBG = --with-debug
+CONFIGURE_ARGS += $(CONFIGURE_ARGS_$(GARFLAVOR))
 
 # TODO: Make the tests pass. They don't at the moment.
 TEST_SCRIPTS =
 
-# Enable 64 bits build
-BUILD64 = 1
 
-USERGROUP = /etc/opt/csw/pkg/CSWmysql5/cswusergroup
+USERGROUP = /etc/opt/csw/pkg/CSW$(GARNAME)/cswusergroup
 
-PROTOTYPE_MODIFIERS = ownmysql
-PROTOTYPE_FILES_ownmysql = /var/opt/csw/mysql5
-PROTOTYPE_USER_ownmysql = mysql
-PROTOTYPE_GROUP_ownmysql = mysql
-PROTOTYPE_PERMS_ownmysql = 0700
-PROTOTYPE_CLASS_ownmysql = ugfiles
+PROTOTYPE_MODIFIERS = dbdir
+PROTOTYPE_FILES_dbdir = $(localstatedir)
+PROTOTYPE_USER_dbdir = mysql
+PROTOTYPE_GROUP_dbdir = mysql
+PROTOTYPE_PERMS_dbdir = 0700
+PROTOTYPE_CLASS_dbdir = ugfiles
 
 SPKG_CLASSES = none ugfiles
 
 include gar/category.mk
 
+CFLAGS := $(filter-out -I%,$(CFLAGS))
+
 pre-configure-modulated:
-	# To work around the libtool version mismatch problem.
+	# To work around the following libtool version mismatch problem:
+	# libtool: Version mismatch error.  This is libtool 2.2.6, but the
+	# libtool: definition of this LT_INIT comes from libtool 2.2.6b.
+	# libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6
+	# http://lists.opencsw.org/pipermail/maintainers/2009-December/005066.html
 	cd $(WORKSRC) && autoreconf --force --install --symlink
+	@$(MAKECOOKIE)
 
-post-install-modulated:
-	ginstall -m 755 -d $(DESTDIR)$(localstatedir)
-	ginstall -m 755 -d $(DESTDIR)$(datadir)/mysql/doc
-	ginstall -m 644 $(FILEDIR)/ChangeLog $(DESTDIR)$(datadir)/mysql/doc
-	ginstall -m 644 $(FILEDIR)/README.CSW $(DESTDIR)$(datadir)/mysql/doc
-	ginstall -m 755 -d $(DESTDIR)/opt/csw/share/mysql/doc
-	ln -sf ../../../mysql5/share/mysql/doc/README.CSW \
-		$(DESTDIR)/opt/csw/share/mysql/doc/README.CSW
-	ginstall -m 755 -d $(DESTDIR)/etc/opt/csw/init.d
-	ginstall -m 755 $(FILEDIR)/cswmysql5 $(DESTDIR)/etc/opt/csw/init.d
-	ginstall -m 755 $(FILEDIR)/quick_start-csw $(DESTDIR)$(datadir)/mysql
-	ginstall -m 755 -d $(DESTDIR)$(global_sysconfdir)/pkg/CSWmysql5
+post-merge:
+	ginstall -m 755 -d $(PKGROOT)$(localstatedir)
+	ginstall -m 755 -d $(PKGROOT)$(datadir)/mysql/doc
+	ginstall -m 644 $(FILEDIR)/ChangeLog $(PKGROOT)$(datadir)/mysql/doc
+	ginstall -m 644 $(FILEDIR)/README.CSW $(PKGROOT)$(datadir)/mysql/doc
+	ginstall -m 755 -d $(PKGROOT)/opt/csw/share/mysql/doc
+	ln -sf ../../../$(GARNAME)/share/mysql/doc/README.CSW \
+		$(PKGROOT)/opt/csw/share/mysql/doc/README.CSW
+	ginstall -m 755 -d $(PKGROOT)/etc/opt/csw/init.d
+	ginstall -m 755 $(FILEDIR)/csw$(GARNAME) $(PKGROOT)/etc/opt/csw/init.d
+	ginstall -m 755 $(FILEDIR)/quick_start-csw $(PKGROOT)$(datadir)/mysql
+	ginstall -m 755 -d $(PKGROOT)$(global_sysconfdir)/pkg/CSW$(GARNAME)
 	ginstall -m 644 $(FILEDIR)/cswusergroup \
-		        $(DESTDIR)$(global_sysconfdir)/pkg/CSWmysql5
+		        $(PKGROOT)$(global_sysconfdir)/pkg/CSW$(GARNAME)
 	# A symlink for mysql5 include files
-	ginstall -m 755 -d $(DESTDIR)/opt/csw/include
-	ln -s ../mysql5/include/mysql $(DESTDIR)/opt/csw/include/mysql
+	ginstall -m 755 -d $(PKGROOT)/opt/csw/include
+	ln -s ../$(GARNAME)/include/mysql $(PKGROOT)/opt/csw/include/mysql
 	# Create symlinks to binaries
-	ginstall -m 755 -d $(DESTDIR)$(global_bindir)
-	for f in $(DESTDIR)$(bindir)/*; do \
-		ln -s ../mysql5/bin/`basename $$f` $(DESTDIR)$(global_bindir)/`basename $$f`; \
+	ginstall -m 755 -d $(PKGROOT)$(global_bindir)
+	for f in $(PKGROOT)$(bindir)/*; do \
+		ln -s ../$(GARNAME)/bin/`basename $$f` \
+		      $(PKGROOT)$(global_bindir)/`basename $$f`; \
 	done
+	# /opt/csw/$(GARNAME)/lib/sparc9/mysql -- by GAR, it's logical
+	# /opt/csw/$(GARNAME)/lib/mysql/sparcv9 -- expected by other packages
+	gln -s ../$(ISA_DEFAULT64)/mysql $(PKGROOT)$(libdir)/mysql/$(ISA_DEFAULT64)
+	# For other applications to link against
+	gln -s $(ISA_DEFAULT64) $(PKGROOT)$(libdir)/64
+	gln -s $(ISA_DEFAULT64) $(PKGROOT)$(libdir)/mysql/64
+	gln -s . $(PKGROOT)$(libdir)/$(ISA_DEFAULT)
+	gln -s . $(PKGROOT)$(libdir)/mysql/$(ISA_DEFAULT)
 	@$(MAKECOOKIE)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list