/[debian-med]/trunk/packages/gdcm/trunk/debian/rules
ViewVC logotype

Contents of /trunk/packages/gdcm/trunk/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18119 - (show annotations) (download)
Wed Sep 24 12:26:17 2014 UTC (4 weeks, 2 days ago) by malat
File size: 4931 byte(s)
make sure to install JNI lib to correct spot
1 #!/usr/bin/make -f
2 # export DH_VERBOSE=1
3
4 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
5
6 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
7
8 # to please dpkg-shlibdeps and java private libs in /usr/lib/jni
9 LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH):/usr/lib/jni
10
11 # PHP5 extensions dir:
12 PHP_EX=$(shell /usr/bin/php-config5 --extension-dir)
13
14 # required for DEB_MONO_ARCHS (debian/control.in)
15 -include /usr/share/mono/mono-archs.make
16
17 # Mono is not available for all Debian architectures.
18 ifeq ($(shell dh_listpackages | grep -q cil && echo yes),yes)
19 WITH_CLI = --with cli
20 DEB_WRAP_CSHARP = 1
21 # dpkg-shlibdeps needs to know where is libKitware.mummy.Runtime.Unmanaged.so
22 LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH):/usr/lib/cli/Kitware.mummy.Runtime-1.0
23 else
24 WITH_CLI =
25 DEB_WRAP_CSHARP = 0
26 endif
27 export LD_LIBRARY_PATH
28
29 # deduce documentation option (build-indep target)
30 ifeq "" "$(filter %-doc,$(shell dh_listpackages))"
31 BUILDDOC = OFF
32 else
33 BUILDDOC = ON
34 endif
35
36 %:
37 dh $@ $(WITH_CLI) --with python2 --with javahelper --parallel
38
39 PYVER := $(shell pyversions -dv)
40 PYMODDIR := /usr/lib/$(shell pyversions -r)
41 VTKVERS=$(shell apt-cache policy libvtk5-dev | grep "Installed:" | cut -d: -f2 | cut -d' ' -f2 | cut -d- -f1 | cut -d. -f1-2)
42
43 # GDCM_DOCUMENTATION:BOOL=ON is required to build man page (build target)
44 # Need to make sure to build using the same vtk/python version:
45 CMAKE_EXTRA_FLAGS += -DCMAKE_SKIP_RPATH=ON \
46 -DCMAKE_BUILD_TYPE:STRING=None \
47 -DGDCM_DOXYGEN_NO_FOOTER:BOOL=ON \
48 -DGDCM_BUILD_APPLICATIONS:BOOL=ON \
49 -DGDCM_DOCUMENTATION:BOOL=ON \
50 -DGDCM_VTK_DOCUMENTATION:BOOL=$(BUILDDOC) \
51 -DDOCUMENTATION_DOWNLOAD_VTK_TAGFILE:BOOL=OFF \
52 -DGDCM_PDF_DOCUMENTATION:BOOL=$(BUILDDOC) \
53 -DGDCM_BUILD_SHARED_LIBS:BOOL=ON \
54 -DGDCM_WRAP_PYTHON:BOOL=ON \
55 -DGDCM_WRAP_CSHARP:BOOL=$(DEB_WRAP_CSHARP) \
56 -DGDCM_WRAP_JAVA:BOOL=ON \
57 -DGDCM_WRAP_PHP:BOOL=ON \
58 -DGDCM_USE_PVRG:BOOL=ON \
59 -DGDCM_USE_SYSTEM_PVRG:BOOL=ON \
60 -DGMCS_EXECUTABLE:FILEPATH=/usr/bin/mono-csc \
61 -DGDCM_BUILD_TESTING:BOOL=OFF \
62 -DGDCM_USE_SYSTEM_EXPAT:BOOL=ON \
63 -DGDCM_USE_SYSTEM_UUID:BOOL=ON \
64 -DGDCM_USE_SYSTEM_ZLIB:BOOL=ON \
65 -DGDCM_USE_SYSTEM_OPENJPEG:BOOL=ON \
66 -DGDCM_USE_SYSTEM_OPENSSL:BOOL=ON \
67 -DGDCM_USE_SYSTEM_CHARLS:BOOL=ON \
68 -DGDCM_USE_SYSTEM_POPPLER:BOOL=ON \
69 -DGDCM_USE_SYSTEM_LIBXML2:BOOL=ON \
70 -DGDCM_USE_SYSTEM_JSON:BOOL=ON \
71 -DGDCM_USE_PARAVIEW:BOOL=OFF \
72 -DGDCM_USE_ACTIVIZ:BOOL=ON \
73 -DGDCM_USE_SYSTEM_PAPYRUS3:BOOL=ON \
74 -DGDCM_USE_SYSTEM_SOCKETXX:BOOL=ON \
75 -DPython_ADDITIONAL_VERSIONS:STRING=$(PYVER) \
76 -DGDCM_INSTALL_DOC_DIR:STRING=share/doc/gdcm-doc \
77 -DTAGFILES:STRING="/usr/share/doc/vtk-doc/html/vtk$(VTKVERS).tag=/usr/share/doc/vtk-doc/html/" \
78 -DGDCM_INSTALL_PYTHONMODULE_DIR:STRING=lib/python/dist-packages \
79 -DGDCM_INSTALL_JAVAMODULE_DIR:STRING=lib/$(DEB_HOST_MULTIARCH)/jni \
80 -DGDCM_NO_PYTHON_LIBS_LINKING:BOOL=ON \
81 -DGDCM_INSTALL_LIB_DIR:STRING=lib/$(DEB_HOST_MULTIARCH) \
82 -DGDCM_USE_VTK:BOOL=ON
83
84 override_dh_auto_configure:
85 dh_auto_configure -- $(CMAKE_EXTRA_FLAGS)
86
87 override_dh_install-arch:
88 dh_install --list-missing
89
90 override_dh_auto_install:
91 # See #664188
92 sed -i -e "s/FATAL_ERROR/STATUS/g" obj-*/CMake/ExportConfiguration/CMakeFiles/Export/lib/$(DEB_HOST_MULTIARCH)/gdcm-2.4/GDCMTargets-*.cmake
93 # See #711214
94 sed -i -e "s/FATAL_ERROR/STATUS/g" obj-*/CMake/ExportConfiguration/CMakeFiles/Export/lib/$(DEB_HOST_MULTIARCH)/gdcm-2.4/GDCMTargets.cmake
95 dh_auto_install
96 # PHP
97 mkdir -p debian/tmp/$(PHP_EX)
98 mkdir -p debian/tmp/usr/share/php
99 mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gdcm.php debian/tmp/usr/share/php
100 mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gdcm.so debian/tmp/$(PHP_EX)
101 mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/vtkgdcm.php debian/tmp/usr/share/php
102 mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/vtkgdcm.so debian/tmp/$(PHP_EX)
103 echo "php:Depends=phpapi-`php-config5 --phpapi`" >> debian/php5-gdcm.substvars
104 echo "php:Depends=phpapi-`php-config5 --phpapi`" >> debian/php5-vtkgdcm.substvars
105 # Python
106 mv debian/tmp/usr/lib/python debian/tmp/$(PYMODDIR)
107 #mv debian/tmp/usr/lib/_gdcmswig.so* debian/tmp/$(PYMODDIR)/dist-packages/
108
109 override_dh_strip:
110 dh_strip --dbg-package=libgdcm2.4-dbg
111
112 override_dh_clideps:
113 ifeq ($(DEB_WRAP_CSHARP), 1)
114 dh_clideps
115 endif
116
117 # Let's be smart with building doc
118 override_dh_auto_build-indep:
119 -$(MAKE) -C obj-* vtkgdcmDoxygenDoc
120
121 # No tests needed for docs
122 override_dh_auto_test-indep:
123
124 pkg_doc = gdcm-doc
125 pkg_exa = gdcm-examples
126
127 override_dh_compress:
128 # do not compress .map file for doxygen graph
129 dh_compress -X.map -X.pdf
130
131 # TODO I cannot set documentation to separate build target as man page
132 # depends on doc, and bin tools depends on man page
133 #build-indep:
134 # $(MAKE) GDCMDoxygenDoc
135 #build-arch:
136 # $(MAKE)
137
138 debian/control: debian/control.in
139 sed -e"s/@PYVER@/$(PYVER)/g" -e "s/@DEB_MONO_ARCHS@/$(DEB_MONO_ARCHS)/g" $< > $@
140
141 get-orig-source:
142 uscan --verbose --force-download --rename

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5