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

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5