-
Notifications
You must be signed in to change notification settings - Fork 2
/
rules
executable file
·69 lines (52 loc) · 1.93 KB
/
rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
COMMON_FLAGS = prefix=debian/tmp/usr VERBOSE=1 MULTIARCH_INSTALL=1 NO_GIT=1 USE_BLAS64=0 \
TAGGED_RELEASE_BANNER="Ubuntu ppa:staticfloat/juliareleases build" \
USE_SYSTEM_MPFR=1 USE_SYSTEM_GMP=1 USE_SYSTEM_FFTW=1 USE_SYSTEM_CURL=1
# Set platform-specific flags
ifeq ($(DEB_HOST_ARCH_CPU),i386)
COMMON_FLAGS += MARCH=pentium4
COMMON_FLAGS += USE_SYSTEM_BLAS=1 USE_SYSTEM_LAPACK=1 USE_SYSTEM_ARPACK=1
COMMON_FLAGS += LIBBLASNAME=libopenblas.so.0 LIBLAPACKNAME=liblapack.so.3
endif
ifeq ($(DEB_HOST_ARCH_CPU),amd64)
COMMON_FLAGS += MARCH=x86-64
COMMON_FLAGS += USE_SYSTEM_BLAS=1 USE_SYSTEM_LAPACK=1 USE_SYSTEM_ARPACK=1
COMMON_FLAGS += LIBBLASNAME=libopenblas.so.0 LIBLAPACKNAME=liblapack.so.3
endif
ifeq (,$(findstring $(DEB_HOST_ARCH_CPU),i386 amd64))
COMMON_FLAGS += USE_SYSTEM_LIBM=1 LLVM_USE_CMAKE=1
endif
%:
dh $@ --parallel
override_dh_auto_build-arch:
make -j3 $(COMMON_FLAGS)
override_dh_auto_test-arch:
make $(COMMON_FLAGS) testall
override_dh_strip:
dh_strip -Xjulia
# explicitly strip libjulia*
strip debian/tmp/usr/lib/$$(dpkg-architecture -qDEB_HOST_MULTIARCH)/libjulia*.so
override_dh_auto_clean:
# if we already have a version_git.jl, back that up, same with doc/_build
-cp base/version_git.jl base/version_git.jl.backup
-mv doc/_build doc/_build.backup
make $(COMMON_FLAGS) cleanall
# Don't distcleanall because we want to keep tarballs and such that we've saved
make -C deps $(COMMON_FLAGS) cleanall
rm -f deps/libuv/config.log
rm -rf usr
# Clean out .gitignore files
find . -name .gitignore | xargs -r rm
# Now the previous files back
-cp base/version_git.jl.backup base/version_git.jl
-mv doc/_build.backup doc/_build
override_dh_auto_install-arch:
make $(COMMON_FLAGS) install
override_dh_auto_install-indep:
override_dh_auto_test-indep:
override_dh_auto_build-indep:
override_dh_compress:
dh_compress -X.jl
override_dh_shlibdeps:
dh_shlibdeps -Xlibpcre2-posix.so