[csw-devel] SF.net SVN: gar:[7720] csw/mgar/pkg/mysql5/trunk/Makefile

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Wed Dec 23 10:13:34 CET 2009


Revision: 7720
          http://gar.svn.sourceforge.net/gar/?rev=7720&view=rev
Author:   wahwah
Date:     2009-12-23 09:13:34 +0000 (Wed, 23 Dec 2009)

Log Message:
-----------
mysql5: Porting changes from the 5.1-optcsw branch to prevent the two from diverging too much.

Modified Paths:
--------------
    csw/mgar/pkg/mysql5/trunk/Makefile

Modified: csw/mgar/pkg/mysql5/trunk/Makefile
===================================================================
--- csw/mgar/pkg/mysql5/trunk/Makefile	2009-12-22 23:28:06 UTC (rev 7719)
+++ csw/mgar/pkg/mysql5/trunk/Makefile	2009-12-23 09:13:34 UTC (rev 7720)
@@ -3,10 +3,16 @@
 # $Id$
 
 GARNAME = mysql5
-GARVERSION = 5.1.40
+BASE_VERSION = 5.1
+PATCHLEVEL = 40
+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
@@ -14,24 +20,32 @@
   (Structured Query Language) database server.
 endef
 
-GARFLAVOR = DBG
-
 # Change prefix to /opt/csw/mysql5
 prefix = /opt/csw/mysql5
+localstatedir = /var/opt/csw/mysql5
 sysconfdir = /etc/opt/csw/mysql5
-localstatedir = /var/opt/csw/mysql5
+
+# 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/cswmysql-$(BASE_VERSION)
 
+PACKAGES  = CSWmysql5 CSWmysql5bench CSWmysql5client CSWmysql5devel
+PACKAGES += CSWmysql5rt CSWmysql5test
+
 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_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
 
 CATALOGNAME_CSWmysql5       = $(GARNAME)
 CATALOGNAME_CSWmysql5bench  = $(GARNAME)bench
@@ -46,13 +60,6 @@
 INCOMPATIBLE_PKGS_CSWmysql5devel  = CSWmysql4devel
 INCOMPATIBLE_PKGS_CSWmysql5test   = CSWmysql4test
 
-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
-
 # 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
@@ -72,8 +79,21 @@
 CSWmysql5client_programs += perror
 CSWmysql5client_programs += replace
 
+# 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$(libdir)/\$$ISALIST/mysql
+
 CSWmysql5devel_programs += mysql_config
 
+# Enable 64 bits build
+BUILD64 = 1
+
 PKGFILES_CSWmysql5bench   = $(prefix)/sql-bench.*
 PKGFILES_CSWmysql5client  = $(bindir)
 PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),$(call baseisadirs,$(bindir),$(bin_name)))
@@ -97,7 +117,7 @@
 REQUIRED_PKGS_CSWmysql5devel       = CSWmysql5
 REQUIRED_PKGS_CSWmysql5test        = CSWmysql5 CSWperl
 
-MASTER_SITES = ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.1/
+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
@@ -115,20 +135,11 @@
 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
-CONFIGURE_ARGS += --without-docs
+# Why not have a docs package?
+# CONFIGURE_ARGS += --without-docs
 CONFIGURE_ARGS += --enable-local-infile
 CONFIGURE_ARGS += --with-charset=utf8
 CONFIGURE_ARGS += --with-extra-charsets=all
@@ -146,46 +157,48 @@
 # TEST_SCRIPTS =
 TEST_TARGETS = check
 
-# Enable 64 bits build
-BUILD64 = 1
 
 USERGROUP = /etc/opt/csw/pkg/CSWmysql5/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.
 	cd $(WORKSRC) && autoreconf --force --install --symlink
 
-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
+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 ../../../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
+		$(PKGROOT)/opt/csw/share/mysql/doc/README.CSW
+	ginstall -m 755 -d $(PKGROOT)/etc/opt/csw/init.d
+	ginstall -m 755 $(FILEDIR)/cswmysql5 $(PKGROOT)/etc/opt/csw/init.d
+	ginstall -m 755 $(FILEDIR)/quick_start-csw $(PKGROOT)$(datadir)/mysql
+	ginstall -m 755 -d $(PKGROOT)$(global_sysconfdir)/pkg/CSWmysql5
 	ginstall -m 644 $(FILEDIR)/cswusergroup \
-		        $(DESTDIR)$(global_sysconfdir)/pkg/CSWmysql5
+		        $(PKGROOT)$(global_sysconfdir)/pkg/CSWmysql5
 	# 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 ../mysql5/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 ../mysql5/bin/`basename $$f` \
+		      $(PKGROOT)$(global_bindir)/`basename $$f`; \
 	done
+	gln -s $(ISA_DEFAULT64) $(PKGROOT)$(libdir)/64
 	@$(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