[Likwid-commit] [likwid] 01/01: Debianize

Christoph Martin chrism at moszumanska.debian.org
Tue Oct 28 10:18:59 UTC 2014


This is an automated email from the git hooks/post-receive script.

chrism pushed a commit to branch master
in repository likwid.

commit fa66131f3bcfe8357c6fedcc1edd0c3db9ccdea4
Author: Christoph Martin <martin at uni-mainz.de>
Date:   Tue Oct 28 11:08:54 2014 +0100

    Debianize
---
 debian/changelog               |   2 +-
 debian/control                 |  28 ++++++----
 debian/patches/debianize.patch | 116 +++++++++++++++++++++++++++++++++++++++++
 debian/patches/series          |   1 +
 debian/rules                   |  10 ++++
 5 files changed, 146 insertions(+), 11 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e9f5171..37a34af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,4 +2,4 @@ likwid (3.1.2-1) UNRELEASED; urgency=low
 
   * Initial release. (Closes: #766474)
 
- -- Christoph Martin <christoph.martin at uni-mainz.de>  Thu, 23 Oct 2014 11:12:35 +0200
+ -- Christoph Martin <martin at uni-mainz.de>  Thu, 23 Oct 2014 11:12:35 +0200
diff --git a/debian/control b/debian/control
index 98c9b8e..f5ca0d6 100644
--- a/debian/control
+++ b/debian/control
@@ -3,15 +3,16 @@ Maintainer: Christoph Martin <martin at uni-mainz.de>
 Section: misc
 Priority: optional
 Standards-Version: 3.9.4
-Build-Depends: debhelper (>= 9)
+Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), gfortran
 Homepage: http://code.google.com/p/likwid/wiki/Introduction
 Vcs-Git: git://git.debian.org/likwid/likwid.git
 Vcs-Browser: http://git.debian.org/?p=likwid/likwid.git;a=summary
 
 Package: likwid
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: toolsuite of command line applications for performance oriented programmers
+Pre-Depend: multiarch-support, ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
+Description: toolsuite for performance oriented programmers
  Likwid is a simple to install and use toolsuite of command line applications
  for performance oriented programmers. It works for Intel and AMD processors
  on the Linux operating system.
@@ -20,12 +21,19 @@ Description: toolsuite of command line applications for performance oriented pro
  .
  likwid-topology       - print thread and cache topology
  likwid-features       - view and toggle feature reagister on Intel processors
- likwid-perfctr        - configure and read out hardware performance counters on Intel and AMD processors
- likwid-powermeter     - read out RAPL Energy information and get info about Turbo Mode steps
- likwid-setFrequencies - read out RAPL Energy information and get info about Turbo Mode steps
- likwid-memsweeper     - cleans up filled NUMA memory domains and evicts dirty cacheline from cache hierarchy
- likwid-pin            - pin your threaded application (pthread, Intel and gcc OpenMP to dedicated processors
+ likwid-perfctr        - configure and read out hardware performance counters
+                         on Intel and AMD processors
+ likwid-powermeter     - read out RAPL Energy information and get info about
+                         Turbo Mode steps
+ likwid-setFrequencies - read out RAPL Energy information and get info about
+                         Turbo Mode steps
+ likwid-memsweeper     - cleans up filled NUMA memory domains and evicts dirty
+                         cacheline from cache hierarchy
+ likwid-pin            - pin your threaded application (pthread, Intel and gcc
+                         OpenMP to dedicated processors
  likwid-bench          - Micro benchmarking platform
  likwid-gencfg         - Dumps topology information to a file
- likwid-mpirun         - Wrapper to start MPI and Hybrid MPI/OpenMP applications (Supports Intel MPI and OpenMPI)
- likwid-scope          - Frontend to the timeline mode of likwid-perfctr, plots live graphs of performance metrics
+ likwid-mpirun         - Wrapper to start MPI and Hybrid MPI/OpenMP
+                         applications (Supports Intel MPI and OpenMPI)
+ likwid-scope          - Frontend to the timeline mode of likwid-perfctr, plots
+                         live graphs of performance metrics
diff --git a/debian/patches/debianize.patch b/debian/patches/debianize.patch
new file mode 100644
index 0000000..7a2ca78
--- /dev/null
+++ b/debian/patches/debianize.patch
@@ -0,0 +1,116 @@
+Description: Debianize Package
+ make config.mk etc. able to cope with Debian build process
+Author: Christoph Martin <martin at uni-mainz.de>
+Last-Update: 2014-10-24
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/make/include_GCC.mk
++++ b/make/include_GCC.mk
+@@ -1,5 +1,5 @@
+ CC  = gcc
+-FC  = ifort
++FC  = gfortran
+ AS  = as
+ AR  = ar
+ PAS = ./perl/AsmGen.pl
+@@ -12,16 +12,16 @@ GEN_PMHEADER = ./perl/gen_events.pl
+ #ANSI_CFLAGS += -Wextra
+ #ANSI_CFLAGS += -Wall
+ 
+-CFLAGS   =  -O2  -Wno-format -std=c99
+-FCFLAGS  = -module ./  # ifort
+-#FCFLAGS  = -J ./  -fsyntax-only  #gfortran
++CFLAGS   +=  -O2  -Wno-format -std=c99
++#FCFLAGS  = -module ./  # ifort
++FCFLAGS  = $(FFLAGS) -J ./  -fsyntax-only  #gfortran
+ PASFLAGS  = x86-64
+ ASFLAGS  =
+-CPPFLAGS =
+-LFLAGS   =  -pthread
++CPPFLAGS +=
++LFLAGS   = $(LDFLAGS) -pthread
+ 
+ SHARED_CFLAGS = -fpic
+-SHARED_LFLAGS = -shared
++SHARED_LFLAGS = $(LDFLAGS) -shared
+ 
+ DEFINES  = -D_GNU_SOURCE
+ DEFINES  += -DPAGE_ALIGNMENT=4096
+--- a/Makefile
++++ b/Makefile
+@@ -72,7 +72,7 @@ DEFINES   += -DVERSION=$(VERSION)
+ 
+ #CONFIGURE BUILD SYSTEM
+ BUILD_DIR  = ./$(COMPILER)
+-Q         ?= @
++#Q         ?= @
+ GENGROUPLOCK = .gengroup
+ 
+ ifeq ($(COMPILER),MIC)
+@@ -178,7 +178,7 @@ FORTRAN_INTERFACE=
+ $(info Warning: You have selected the fortran interface in config.mk, but there seems to be no fortran compiler - not compiling it!)
+ else
+ FORTRAN_INTERFACE = likwid.mod
+-FORTRAN_INSTALL =  @cp -f likwid.mod  $(PREFIX)/include/
++FORTRAN_INSTALL =  $(@)cp -f likwid.mod  $(PREFIX)/include/
+ endif
+ else
+ FORTRAN_INTERFACE =
+@@ -205,18 +205,18 @@ $(DYNAMIC_TARGET_LIB): $(OBJ)
+ 
+ $(DAEMON_TARGET): $(SRC_DIR)/access-daemon/accessDaemon.c
+ 	@echo "===>  Build access daemon $(DAEMON_TARGET)"
+-	$(Q)$(MAKE) -s -C  $(SRC_DIR)/access-daemon $(DAEMON_TARGET)
++	$(Q)$(MAKE) -C  $(SRC_DIR)/access-daemon CFLAGS="$(CFLAGS) $(LDFLAGS)" $(DAEMON_TARGET)
+ 
+ $(SETFREQ_TARGET): $(SRC_DIR)/access-daemon/setFreq.c
+ 	@echo "===>  Build frequency daemon $(SETFREQ_TARGET)"
+-	$(Q)$(MAKE) -s -C  $(SRC_DIR)/access-daemon $(SETFREQ_TARGET)
++	$(Q)$(MAKE) -C  $(SRC_DIR)/access-daemon CFLAGS="$(CFLAGS) $(LDFLAGS)" $(SETFREQ_TARGET)
+ 
+ $(BUILD_DIR):
+ 	@mkdir $(BUILD_DIR)
+ 
+ $(PINLIB):
+ 	@echo "===>  CREATE LIB  $(PINLIB)"
+-	$(Q)$(MAKE) -s -C src/pthread-overload/ $(PINLIB) 
++	$(Q)$(MAKE) -C src/pthread-overload/ $(PINLIB)
+ 
+ $(GENGROUPLOCK): $(foreach directory,$(shell ls $(GROUP_DIR)), $(wildcard $(GROUP_DIR)/$(directory)/*.txt))
+ 	@echo "===>  GENERATE GROUP HEADERS"
+@@ -313,10 +313,10 @@ install:
+ 	@mkdir -p $(PREFIX)/include
+ 	@cp -f src/includes/likwid*.h  $(PREFIX)/include/
+ 	$(FORTRAN_INSTALL)
+-	@echo "===> INSTALL libraries to $(PREFIX)/lib"
+-	@mkdir -p $(PREFIX)/lib
+-	@cp -f $(LIKWID_LIB)*  $(PREFIX)/lib
+-	@chmod 755 $(PREFIX)/lib/$(PINLIB)
++	@echo "===> INSTALL libraries to $(LIBPREFIX)"
++	@mkdir -p $(LIBPREFIX)
++	@cp -f $(LIKWID_LIB)*  $(LIBPREFIX)
++	@chmod 755 $(LIBPREFIX)/$(PINLIB)
+ 	@echo "===> INSTALL filters to $(LIKWIDFILTERPATH)"
+ 	@mkdir -p $(LIKWIDFILTERPATH)
+ 	@cp -f filters/*  $(LIKWIDFILTERPATH)
+@@ -336,8 +336,8 @@ uninstall:
+ 	@rm -f $(addprefix $(MANPREFIX)/man1/,$(addsuffix  .1,$(APPS)))
+ 	@echo "===> REMOVING headers from $(PREFIX)/include"
+ 	@rm -f $(PREFIX)/include/likwid*.h
+-	@echo "===> REMOVING libs from $(PREFIX)/lib"
+-	@rm -f $(PREFIX)/lib/$(LIKWID_LIB)* 
++	@echo "===> REMOVING libs from $(LIBPREFIX)"
++	@rm -f $(LIBPREFIX)/$(LIKWID_LIB)*
+ 	@echo "===> REMOVING filter from $(PREFIX)/share"
+ 	@rm -rf  $(PREFIX)/share/likwid
+ 
+--- a/config.mk
++++ b/config.mk
+@@ -11,6 +11,7 @@ COLOR = BLUE#NO SPACE
+ # Path were to install likwid
+ PREFIX = /usr/local#NO SPACE
+ MANPREFIX = $(PREFIX)/man#NO SPACE
++LIBPREFIX = $(PREFIX)/lib#NO SPACE
+ 
+ # For the daemon based secure msr/pci access configure
+ # the absolute path to the msr daemon executable.
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e90ef42
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+debianize.patch
diff --git a/debian/rules b/debian/rules
old mode 100644
new mode 100755
index 7bb4062..1ee5d70
--- a/debian/rules
+++ b/debian/rules
@@ -3,5 +3,15 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+include /usr/share/dpkg/architecture.mk
+
 %:
 	dh $@
+
+override_dh_auto_build:
+	$(MAKE) PREFIX=/usr FORTRAN_INTERFACE=true
+
+override_dh_auto_install:
+	$(MAKE) PREFIX=$$(pwd)/debian/likwid/usr MANPREFIX=$$(pwd)/debian/likwid/usr/share/man LIBPREFIX=$$(pwd)/debian/likwid/usr/lib/$(DEB_BUILD_GNU_TYPE) install

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/likwid/likwid.git



More information about the Likwid-commit mailing list