summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rules/dbench.in30
-rw-r--r--rules/dbench.make165
2 files changed, 195 insertions, 0 deletions
diff --git a/rules/dbench.in b/rules/dbench.in
new file mode 100644
index 000000000..f4ce4b320
--- /dev/null
+++ b/rules/dbench.in
@@ -0,0 +1,30 @@
+menu "dbench "
+
+config DBENCH
+ bool
+ prompt "dbench"
+ default N
+ help
+ dbench is a filesystem throughput test.
+
+comment "Installation Options"
+
+config DBENCH_DBENCH
+ bool
+ prompt "install dbench"
+ depends on DBENCH
+ default N
+
+config DBENCH_TBENCH
+ bool
+ prompt "install tbench"
+ depends on DBENCH
+ default N
+
+config DBENCH_TBENCH_SERVER
+ bool
+ prompt "install tbench server"
+ depends on DBENCH
+ default N
+
+endmenu
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