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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
|
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Include quilt magick.
include /usr/share/quilt/quilt.make
BINARY = $(CURDIR)/debian/blender
CONFIG_SCRIPTS = \
source/tools/guess/config.guess
# Workaround Blender's misdetection of big endian architectures.
# Upstream bug: http://projects.blender.org/tracker/index.php?func=detail&aid=8584&group_id=9&atid=127
# Based on: http://wiki.debian.org/ArchitectureSpecificsMemo
DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifneq (,$(findstring $(DEB_HOST_ARCH),hppa m68k mips powerpc s390 sparc))
CPPFLAGS += -D__BIG_ENDIAN__
endif
build: patch build-stamp
build-stamp:
dh_testdir
# Use updated config.* scripts
for config in $(CONFIG_SCRIPTS); do \
ln -sf /usr/share/misc/`basename $$config` $$config; \
done
# Ensure that non-Linux architectures use the same
# configuration without having to duplicate it
ln -sf config/linux2-config.py user-config.py
# Main build
scons WITH_BF_PLAYER=1 BF_FANCY=0 CC=$(CC) CXX=$(CXX) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)"
# Build plugins by hand
ln -sf ../../../source/blender/blenpluginapi \
install/linux2/plugins/include
chmod +x install/linux2/plugins/bmake
$(MAKE) -C install/linux2/plugins
touch $@
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
# Remove stamps and configuration helpers
rm -f build-stamp configure-stamp
rm -f user-config.py $(CONFIG_SCRIPTS)
# General cleanup (instead of buggy scons clean)
rm -rf build
rm -rf install
# Additional cleanup
rm -f .sconsign.dblite
rm -f tools/*.pyc
rm -f install/linux2/plugins/include
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Install most of the files at the appropriate place
dh_install
# Additional commands to handle the binaries
install -d $(BINARY)/usr/bin
install -m 755 install/linux2/blender $(BINARY)/usr/bin/blender-bin
install -m 755 debian/blender-wrapper $(BINARY)/usr/bin/blender
install -m 755 install/linux2/blenderplayer $(BINARY)/usr/bin/blenderplayer
# Rename some files to make them either visible or more meaningful
mv $(BINARY)/usr/share/blender/.Blanguages $(BINARY)/usr/share/blender/Blanguages
mv $(BINARY)/usr/share/blender/scripts/scripts \
$(BINARY)/usr/share/blender/scripts/blender
# Remove duplicates due to the new layout (scripts/<package>)
rm -rf $(BINARY)/usr/share/blender/scripts/blender/bpydata
rm -rf $(BINARY)/usr/share/blender/scripts/blender/bpymodules
# Remove exec permission from python scripts
find $(BINARY)/usr/share/blender/scripts/ \
-name '*.py' -exec chmod a-x {} ';'
# Link to ttf-bitstream-vera instead of shipping a duplicate...
# ... updated to use DejaVu instead (#463749).
dh_link /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf \
/usr/share/blender/bfont.ttf
# Install overrides files
install -d $(BINARY)/usr/share/lintian/overrides
cp debian/blender.lintian-overrides \
$(BINARY)/usr/share/lintian/overrides/blender
# Build architecture-independent files here
binary-indep: build install
# Build architecture-dependent files here
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installmenu
dh_installman debian/blender.1
dh_link
dh_strip
dh_compress
dh_fixperms
dh_pysupport
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|