summaryrefslogtreecommitdiffstats
path: root/rules/dbench.make
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2005-05-27 10:27:52 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2005-05-27 10:27:52 +0000
commitc7171c2055c21d6268c0ed94a558193d6ff292b9 (patch)
treee67dc392675934c8f68136648a065a9fa4a2d85c /rules/dbench.make
parent900f161437154290875a7b9d9eca812ed15e9455 (diff)
downloadptxdist-c7171c2055c21d6268c0ed94a558193d6ff292b9.tar.gz
ptxdist-c7171c2055c21d6268c0ed94a558193d6ff292b9.tar.xz
added
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-0.7-trunk@2675 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/dbench.make')
-rw-r--r--rules/dbench.make165
1 files changed, 165 insertions, 0 deletions
diff --git a/rules/dbench.make b/rules/dbench.make
new file mode 100644
index 000000000..ad5f7dcc7
--- /dev/null
+++ b/rules/dbench.make
@@ -0,0 +1,165 @@
+# $Id: template 2606 2005-05-10 21:49:41Z rsc $
+#
+# Copyright (C) 2005 by Robert Schwebel
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+ifdef PTXCONF_DBENCH
+PACKAGES += dbench
+endif
+
+#
+# Paths and names
+#
+DBENCH_VERSION = 3.03
+DBENCH = dbench-$(DBENCH_VERSION)
+DBENCH_SUFFIX = tar.gz
+DBENCH_URL = http://samba.org/ftp/tridge/dbench/$(DBENCH).$(DBENCH_SUFFIX)
+DBENCH_SOURCE = $(SRCDIR)/$(DBENCH).$(DBENCH_SUFFIX)
+DBENCH_DIR = $(BUILDDIR)/$(DBENCH)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+dbench_get: $(STATEDIR)/dbench.get
+
+dbench_get_deps = $(DBENCH_SOURCE)
+
+$(STATEDIR)/dbench.get: $(dbench_get_deps)
+ @$(call targetinfo, $@)
+ @$(call get_patches, $(DBENCH))
+ touch $@
+
+$(DBENCH_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, $(DBENCH_URL))
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+dbench_extract: $(STATEDIR)/dbench.extract
+
+dbench_extract_deps = $(STATEDIR)/dbench.get
+
+$(STATEDIR)/dbench.extract: $(dbench_extract_deps)
+ @$(call targetinfo, $@)
+ @$(call clean, $(DBENCH_DIR))
+ @$(call extract, $(DBENCH_SOURCE))
+ @$(call patchin, $(DBENCH))
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+dbench_prepare: $(STATEDIR)/dbench.prepare
+
+#
+# dependencies
+#
+dbench_prepare_deps = \
+ $(STATEDIR)/dbench.extract \
+ $(STATEDIR)/virtual-xchain.install
+
+DBENCH_PATH = PATH=$(CROSS_PATH)
+DBENCH_ENV = $(CROSS_ENV)
+#DBENCH_ENV += PKG_CONFIG_PATH=$(CROSS_LIB_DIR)/lib/pkgconfig
+#DBENCH_ENV +=
+
+#
+# autoconf
+#
+DBENCH_AUTOCONF = $(CROSS_AUTOCONF)
+DBENCH_AUTOCONF += --prefix=$(PTXCONF_TESTSUITE_DIR)/$(DBENCH)
+
+$(STATEDIR)/dbench.prepare: $(dbench_prepare_deps)
+ @$(call targetinfo, $@)
+ @$(call clean, $(DBENCH_DIR)/config.cache)
+ cd $(DBENCH_DIR) && \
+ $(DBENCH_PATH) $(DBENCH_ENV) \
+ ./configure $(DBENCH_AUTOCONF)
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+dbench_compile: $(STATEDIR)/dbench.compile
+
+dbench_compile_deps = $(STATEDIR)/dbench.prepare
+
+$(STATEDIR)/dbench.compile: $(dbench_compile_deps)
+ @$(call targetinfo, $@)
+ cd $(DBENCH_DIR) && $(DBENCH_ENV) $(DBENCH_PATH) make
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+dbench_install: $(STATEDIR)/dbench.install
+
+$(STATEDIR)/dbench.install: $(STATEDIR)/dbench.compile
+ @$(call targetinfo, $@)
+ cd $(DBENCH_DIR) && $(DBENCH_ENV) $(DBENCH_PATH) make install
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+dbench_targetinstall: $(STATEDIR)/dbench.targetinstall
+
+dbench_targetinstall_deps = $(STATEDIR)/dbench.compile
+
+$(STATEDIR)/dbench.targetinstall: $(dbench_targetinstall_deps)
+ @$(call targetinfo, $@)
+
+ @$(call install_init,default)
+ @$(call install_fixup,PACKAGE,dbench)
+ @$(call install_fixup,PRIORITY,optional)
+ @$(call install_fixup,VERSION,$(DBENCH_VERSION))
+ @$(call install_fixup,SECTION,base)
+ @$(call install_fixup,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>")
+ @$(call install_fixup,DEPENDS,)
+ @$(call install_fixup,DESCRIPTION,missing)
+
+ifdef PTXCONF_DBENCH_DBENCH
+ @$(call install_copy, 0, 0, 0755, \
+ $(DBENCH_DIR)/dbench, \
+ $(PTXCONF_TESTSUITE_DIR)/$(DBENCH)/dbench)
+endif
+ifdef PTXCONF_DBENCH_TBENCH
+ @$(call install_copy, 0, 0, 0755, \
+ $(DBENCH_DIR)/tbench, \
+ $(PTXCONF_TESTSUITE_DIR)/$(DBENCH)/tbench)
+endif
+ifdef PTXCONF_DBENCH_TBENCH_SERVER
+ @$(call install_copy, 0, 0, 0755, \
+ $(DBENCH_DIR)/tbench_srv, \
+ $(PTXCONF_TESTSUITE_DIR)/$(DBENCH)/tbench_srv)
+endif
+
+ @$(call install_finish)
+
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+dbench_clean:
+ rm -rf $(STATEDIR)/dbench.*
+ rm -rf $(IMAGEDIR)/dbench_*
+ rm -rf $(DBENCH_DIR)
+
+# vim: syntax=make