[Pkg-mysql-commits] r2065 - mysql-5.5/branches/experimental/debian

Nicholas Bamber periapt at alioth.debian.org
Thu Apr 26 20:28:31 UTC 2012


Author: periapt
Date: 2012-04-26 20:28:30 +0000 (Thu, 26 Apr 2012)
New Revision: 2065

Modified:
   mysql-5.5/branches/experimental/debian/changelog
   mysql-5.5/branches/experimental/debian/rules
Log:
* Converted to short form debhelper rules
  - Renamed stamp files to end in '-stamp' so that they are cleaned up
    automatically by dh_clean
  - Removed commented out lines
  - Removed obsolete -DINSTALL_LIBDIR clause from pic build
  - Overrode dh_auto_install so that the rules only run once

Modified: mysql-5.5/branches/experimental/debian/changelog
===================================================================
--- mysql-5.5/branches/experimental/debian/changelog	2012-04-17 06:32:05 UTC (rev 2064)
+++ mysql-5.5/branches/experimental/debian/changelog	2012-04-26 20:28:30 UTC (rev 2065)
@@ -67,6 +67,12 @@
       * encoding issues
       * out of date FSF address
       * Updated License short name from "PD" to "public-domain"
+  * Converted to short form debhelper rules
+    - Renamed stamp files to end in '-stamp' so that they are cleaned up
+      automatically by dh_clean
+    - Removed commented out lines
+    - Removed obsolete -DINSTALL_LIBDIR clause from pic build
+    - Overrode dh_auto_install so that the rules only run once
 
  -- Clint Byrum <clint at ubuntu.com>  Tue, 14 Feb 2012 11:48:47 -0800
 

Modified: mysql-5.5/branches/experimental/debian/rules
===================================================================
--- mysql-5.5/branches/experimental/debian/rules	2012-04-17 06:32:05 UTC (rev 2064)
+++ mysql-5.5/branches/experimental/debian/rules	2012-04-26 20:28:30 UTC (rev 2065)
@@ -3,15 +3,15 @@
 export DH_VERBOSE=1
 export DEB_BUILD_HARDENING=1
 
-PACKAGE=mysql-5.5
+PACKAGE:=mysql-5.5
 
-TMP=$(CURDIR)/debian/tmp/
+TMP:=$(CURDIR)/debian/tmp/
 
-ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-ARCH_OS = $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
+ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEBVERSION = $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | sed 's/^.*-//' )
+DEBVERSION := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | sed 's/^.*-//' )
 
 export MYSQL_BUILD_CC=$(DEB_HOST_GNU_TYPE)-gcc
 export MYSQL_BUILD_CXX=$(DEB_HOST_GNU_TYPE)-g++
@@ -23,65 +23,74 @@
 DEB_UPSTREAM_VERSION_MAJOR_MINOR := $(shell echo $(DEB_UPSTREAM_VERSION) | sed -r -n 's/^([0-9]+\.[0-9]+).*/\1/p')
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-EXPORTED_SOURCE_TARBALL = debian/mysql-source-5.5.tar.gz
+EXPORTED_SOURCE_TARBALL := debian/mysql-source-5.5.tar.gz
 
-DISTRIBUTION = $(shell lsb_release -i -s)
+DISTRIBUTION := $(shell lsb_release -i -s)
 
-MAKE_J = -j$(shell if [ -f /proc/cpuinfo ] ; then grep -c processor.* /proc/cpuinfo ; else echo 1 ; fi)
+MAKE_J := -j$(shell if [ -f /proc/cpuinfo ] ; then grep -c processor.* /proc/cpuinfo ; else echo 1 ; fi)
 ifeq (${MAKE_J}, -j0)
-  MAKE_J = -j1
+  MAKE_J := -j1
 endif
 
-MAKE_TEST_TARGET=test-force
+MAKE_TEST_TARGET:=test-force
 ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),)
 # make test-bt is the testsuite run by the MySQL build team 
 # before a release, but it is long
-    MAKE_TEST_TARGET=test-bt
+    MAKE_TEST_TARGET:=test-bt
 endif
 ifeq ($(ARCH_OS),hurd)
 # Tests not fully working under Hurd
 # See http://bugs.mysql.com/bug.php?id=64685
-    MAKE_TEST_TARGET=test
+    MAKE_TEST_TARGET:=test
 endif
 
-USE_ASSEMBLER=--enable-assembler 
+USE_ASSEMBLER:=--enable-assembler 
 
 ifneq (,$(filter $(ARCH), amd64 i386))
-    TESTSUITE_FAIL_CMD=exit 1
+    TESTSUITE_FAIL_CMD:=exit 1
 else
-    TESTSUITE_FAIL_CMD=true
+    TESTSUITE_FAIL_CMD:=true
 endif
 
-BUILDDIR = builddir
-BUILDDIR_PIC = builddir-pic
+BUILDDIR := builddir
+BUILDDIR_PIC := builddir-pic
 builddir = $(if $(findstring -pic,$@),$(BUILDDIR_PIC),$(BUILDDIR))
 
 # This causes seg11 crashes if LDAP is used for groups in /etc/nsswitch.conf
 # so it is disabled by default although, according to MySQL, it brings >10%
 # performance gain if enabled. See #299382.
 ifeq ($(STATIC_MYSQLD), 1)
-    USE_STATIC_MYSQLD=--with-mysqld-ldflags=-all-static
+    USE_STATIC_MYSQLD:=--with-mysqld-ldflags=-all-static
 endif
 	
 # See http://blogs.innodb.com/wp/2010/04/innodb-performance-aio-linux/
 # Also #659565
 ifneq (,$(findstring linux-gnu,$(DEB_HOST_GNU_TYPE)))
-    USE_LINUX_NATIVE_AIO=-DLINUX_NATIVE_AIO=ON
+    USE_LINUX_NATIVE_AIO:=-DLINUX_NATIVE_AIO=ON
 endif
 
-configure-stamp-pic: FORCE_FPIC_CFLAGS=-fPIC
-configure-stamp-pic: FORCE_FPIC=-DWITH_PIC=On -DINSTALL_LIBDIR=lib/mysql
+override_dh_auto_clean: 
+	@echo "RULES.$@"
+	dh_testdir 
+	dh_testroot
+	[ ! -d mysql-test/var ] || rm -rf mysql-test/var
+	rm -rf $(BUILDDIR) $(BUILDDIR_PIC)
+	debconf-updatepo
+	rm -f $(EXPORTED_SOURCE_TARBALL)
 
-configure: patch configure-stamp
-configure-pic: patch configure-stamp-pic
-configure-stamp configure-stamp-pic:
+override_dh_prep: 
+
+override_dh_auto_configure: configure-stamp configure-pic-stamp
+
+configure-pic-stamp: FORCE_FPIC_CFLAGS=-fPIC
+configure-pic-stamp: FORCE_FPIC=-DWITH_PIC=On
+
+configure-stamp configure-pic-stamp:
 	@echo "RULES.$@"
 	dh_testdir
-
 ifneq ($(ARCH_OS),hurd)
 	if [ ! -d /proc/self ]; then echo "/proc IS NEEDED" 1>&2; exit 1; fi 
 endif
-
 	( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \
 	sh -c  'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin"} \
 	    	CC=$${MYSQL_BUILD_CC:-gcc} \
@@ -111,92 +120,44 @@
 	    -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
 	    -DWITH_FEDERATED_STORAGE_ENGINE=ON \
 		-DWITH_EXTRA_CHARSETS=all ..'
-		
-	#       --sysconfdir=/etc/mysql  -- Appends /etc/mysql after ~/ in the my.cnf search patch!
-	#
-	#	--with-debug
-	
 	touch $@
 
 
-build: build-stamp build-stamp-pic
+override_dh_auto_build: build-stamp build-pic-stamp
 
-build-stamp: configure
+MAKE_PIC = cd $(builddir) && $(MAKE) $(MAKE_J)
+
+build-stamp:
 	@echo "RULES.$@"
-	dh_testdir
-	
 	[ -f $(EXPORTED_SOURCE_TARBALL) ] || tar -zcf $(EXPORTED_SOURCE_TARBALL) \
 	--exclude=debian . \
 	--transform="s,^\./,mysql-5.5/,"
-
 	cd $(builddir) && $(MAKE) $(MAKE_J)
+	touch $@
 
+build-pic-stamp:
+	@echo "RULES.$@"
+	$(MAKE_PIC) -C scripts
+	$(MAKE_PIC) -C libmysqld
+	touch $@
+
+override_dh_auto_test:
+	@echo "RULES.$@"
 ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
-	# Don't know why the following is necessary...
 	cp unittest/unit.pl $(builddir)/unittest/
 	cp -r mysql-test/* $(builddir)/mysql-test/
 	cp -r sql/share/* $(builddir)/sql/share/
 	cp -r scripts/*sql $(builddir)/scripts/
-	if [ ! -f testsuite-stamp ] ; then \
-	  cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \
-	fi
+	cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; 
 endif
 
-	touch testsuite-stamp
+override_dh_auto_install: auto_install-stamp
 
-	touch build-stamp
-
-MAKE_PIC = cd $(builddir) && $(MAKE) $(MAKE_J)
-
-build-stamp-pic: configure-pic
+auto_install-stamp:
 	@echo "RULES.$@"
-	# Build libmysqld dependencies
-	#(MAKE_PIC) -C include
-	#(MAKE_PIC) -C sql link_sources
-	#(MAKE_PIC) -C libmysql link_sources
-	#(MAKE_PIC) -C strings
-	#(MAKE_PIC) -C regex
-	#(MAKE_PIC) -C mysys
-	#(MAKE_PIC) -C dbug
-	#(MAKE_PIC) -C vio
-	#(MAKE_PIC) -C storage
-	#(MAKE_PIC) -C extra/yassl
-	#(MAKE_PIC) -C cmd-line-utils
-	#(MAKE_PIC) -C sql lex_hash.h
-	$(MAKE_PIC) -C scripts
-	# Build libmysqld itself
-	$(MAKE_PIC) -C libmysqld
-	
-	touch $@
-
-clean: clean-patched unpatch
-	rm -rf debian/patched
-clean-patched:
-	@echo "RULES.clean-patched"
-	dh_testdir 
-	dh_testroot
-	rm -f configure-stamp*
-	rm -f build-stamp*
-	rm -f testsuite-stamp
-	
-	[ ! -f Makefile ] || $(MAKE) clean
-	[ ! -d mysql-test/var ] || rm -rf mysql-test/var
-	
-	rm -rf $(BUILDDIR) $(BUILDDIR_PIC)
-
-	debconf-updatepo
-	rm -f $(EXPORTED_SOURCE_TARBALL)
-	dh_clean -v
-
-
-install:
-install install-pic: build
-	@echo "RULES.$@"
 	dh_testdir
 	dh_testroot
 	dh_prep
-	dh_installdirs
-
 	# some self written manpages which hopefully
 	# gets overwritten sooner or later with upstreams
 	mkdir -p $(TMP)/usr/share/man/man1/
@@ -204,10 +165,8 @@
 	cp debian/additions/*.1 $(TMP)/usr/share/man/man1/
 	mkdir -p $(TMP)/etc/mysql/conf.d/
 	cp debian/additions/mysqld_safe_syslog.cnf $(TMP)/etc/mysql/conf.d/
-
 	# make install (trailing slash needed for innobase)
 	cd $(builddir) && $(MAKE) install DESTDIR=$(TMP)/
-		
 	# After installing, remove rpath to make lintian happy.
 	set +e; \
 	find ./debian/tmp/ -type f -print0 \
@@ -216,16 +175,6 @@
 		| cut -d: -f 1 \
 		| xargs --no-run-if-empty chrpath -d; \
 	set -e
-
-	# libmysqlclient: move shared libraries (but not the rest like libheap.a & co)
-	#mv $(TMP)/usr/lib/mysql/libmysqlclient* $(TMP)/usr/lib
-	#perl -pi -e 's#/usr/lib/mysql#/usr/lib#' $(TMP)/usr/lib/libmysqlclient.la
-	#perl -pi -e 's#/usr/lib/mysql#/usr/lib#' $(TMP)/usr/lib/libmysqlclient_r.la
-	# Check if our beloved versioned symbols are really there
-	#if [ "`objdump -T $(TMP)/usr/lib/libmysqlclient.so.16.0.0 | grep -c libmysqlclient_16`" -lt 500 ]; then \
-	#  echo "ERROR: versioned symbols are absent"; \
-	#  exit 1; \
-	#fi     
 	# libmysqlclient_r is now a symlink to libmysqlclient. But it is
 	# created wrong by the cmake build system and points at
 	# libmysqlclient.so instead of the corresponding versioned lib.
@@ -233,31 +182,22 @@
 		rlib=`basename $$i | sed -e 's/libmysqlclient\./libmysqlclient_r./'` ;\
 		ln -sf `basename $$i` $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/$$rlib ;\
 	done
-
-	# libmysqlclient-dev: forgotten header file since 3.23.25?
-	#cp $(BUILDDIR)/include/my_config.h $(TMP)/usr/include/mysql/
-	#cp include/my_dir.h $(TMP)/usr/include/mysql/
 	# install libmysqld built with -FPIC
 	install -d -m 0755 -o root -g root $(TMP)/usr/lib/mysql
 	install -m 0644 -o root -g root $(BUILDDIR_PIC)/libmysqld/libmysqld.a $(TMP)/usr/lib/mysql/libmysqld_pic.a
 	# mysql_config won't report the -fPIC, so give libmysqld-pic users a way to get their flags
 	install -m 0755 -o root -g root $(BUILDDIR_PIC)/scripts/mysql_config $(TMP)/usr/bin/mysql_config_pic
-
 	# mysql-common: We now provide our own config file.
 	install -d $(TMP)/etc/mysql
 	install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf
-
 	# mysql-client
 	install -m 0755 debian/additions/mysqlreport $(TMP)/usr/bin/
 	install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/
 	install -m 0644 debian/additions/innotop/innotop.1 $(TMP)/usr/share/man/man1/
-
 	# mysql-5.5-testsuite
 	mkdir -p $(TMP)/usr/lib/mysql-testsuite
 	cp -rp $(TMP)/usr/share/mysql-test/* $(TMP)/usr/lib/mysql-testsuite
-
 	# mysql-server
-	#install -m 0755 $(BUILDDIR)/scripts/mysqld_safe $(TMP)/usr/bin/mysqld_safe
 	mkdir -p $(TMP)/usr/share/doc/mysql-server-5.5/examples
 	mv $(TMP)/usr/share/mysql/*cnf 	    $(TMP)/usr/share/doc/mysql-server-5.5/examples/
 	rm -vf $(TMP)/usr/share/mysql/mi_test_all* \
@@ -268,79 +208,30 @@
 	install -m 0755 debian/additions/echo_stderr $(TMP)/usr/share/mysql/
 	install -m 0755 debian/additions/debian-start $(TMP)/etc/mysql/
 	install -m 0755 debian/additions/debian-start.inc.sh $(TMP)/usr/share/mysql/
-
 	install -D -m 0644 $(EXPORTED_SOURCE_TARBALL) $(TMP)/usr/src/mysql/`basename $(EXPORTED_SOURCE_TARBALL)`
+	touch $@
 
-	install -D -m 0644 $(EXPORTED_SOURCE_TARBALL) $(TMP)/usr/src/mysql/`basename $(EXPORTED_SOURCE_TARBALL)`
-
+override_dh_install:
 	dh_movefiles
-	
-# Build architecture-independent files here.
-binary-indep: build install
-	@echo "RULES.binary-indep"
-	dh_testdir -i
-	dh_testroot -i
-	dh_installdebconf -i
-	dh_installdocs -i
-	dh_installexamples -i
-	dh_installmenu -i
-	dh_installlogrotate -i
-	dh_installinit -i
-	dh_installcron -i 
-	dh_installman -i
-	dh_installinfo -i
-	dh_installlogcheck -i
-	dh_installchangelogs -i
-	dh_link -i
-	dh_lintian -i
-	dh_compress -i
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_perl -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
-	
-# Build architecture-dependent files here.
-binary-arch: build install
-	@echo "RULES.binary-arch"
-	dh_testdir 
-	dh_testroot
 
-	dh_installdebconf -a
-	dh_installdocs -a
-	dh_installexamples -a
-	dh_installmenu -a
-	dh_installlogrotate -a --name mysql-server
+override_dh_installlogrotate-arch:
+	dh_installlogrotate --name mysql-server
 	if [ "$(DISTRIBUTION)" = "Ubuntu" ]; then \
 	  dh_apparmor -pmysql-server-5.5 --profile-name=usr.sbin.mysqld; \
 	fi
-	# Start mysql in runlevel 19 before 20 where apache, proftpd etc gets
-	# started which might depend on a running database server.
-	dh_installinit -a --name=mysql -- defaults 19 21
-	dh_installcron -a --name mysql-server
-	dh_installman -a
-	dh_installinfo -a
-	dh_installlogcheck -a
-	dh_installchangelogs -a
-	dh_strip -a
-	dh_link -a	# .so muss nach .so.1.2.3 installier werden!
-	dh_compress -a
-	dh_fixperms -a
-	dh_lintian -a
-	#dh_makeshlibs -a
-	dh_makeshlibs -plibmysqlclient18 -V'libmysqlclient18 (>= 5.5.13-1)'
-	dh_installdeb -a
-	dh_perl -a
-	#dh_shlibdeps -a -l debian/libmysqlclient16/usr/lib -L libmysqlclient16
-	dh_shlibdeps -a
-	dh_gencontrol -a
-	dh_md5sums -a
-	dh_builddeb -a
 
-source diff:
-	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+# Start mysql in runlevel 19 before 20 where apache, proftpd etc gets
+# started which might depend on a running database server.
+override_dh_installinit-arch:
+	dh_installinit --name=mysql -- defaults 19 21
 
+override_dh_installcron-arch:
+	dh_installcron --name mysql-server
+
+# This looks very dodgy to 'periapt'.
+override_dh_makeshlibs-arch:
+	dh_makeshlibs -plibmysqlclient18 -V'libmysqlclient18 (>= 5.5.13-1)'
+
 binary:	binary-indep binary-arch
 
 get-orig-source:
@@ -355,6 +246,6 @@
 	@rm -f /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz
 	@rm -rf /tmp/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig
 
-.PHONY: clean clean-patched configure build binary binary-indep binary-arch install patch unpatch
+%:
+	dh $@ --parallel
 
-# vim: ts=8




More information about the Pkg-mysql-commits mailing list