File: rules

package info (click to toggle)
blender 2.42a-7
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 60,700 kB
  • ctags: 83,393
  • sloc: ansic: 576,763; cpp: 187,760; python: 48,472; sh: 15,785; makefile: 4,298; perl: 2,082; asm: 1,471; java: 8
file content (151 lines) | stat: -rwxr-xr-x 5,068 bytes parent folder | download | duplicates (2)
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/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 dpatch stuff.
include /usr/share/dpatch/dpatch.make

# Lower optimization on mips and mispel in order to
# circumvent ICE, see bug#354439.
DEB_HOST_ARCH	?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifneq (,$(findstring $(DEB_HOST_ARCH),mips mipsel))
	COMPILER ?= REL_CFLAGS=-O1 REL_CCFLAGS=-O1
endif

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

build: build-stamp
build-stamp: patch-stamp po/blender.pot
	dh_testdir
	ln -sf /usr/share/misc/config.guess	source/tools/guess/config.guess
	ln -sf /usr/share/misc/config.guess	extern/bFTGL/unix/config.guess
	ln -sf /usr/share/misc/config.sub	extern/bFTGL/unix/config.sub

	# Add user specific config (without patching)
	cp $(CURDIR)/debian/misc/user-config.py $(CURDIR)

	# Remove libdc1394 on non-Linux arch
ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
	sed -i -e 's/libdc1394//' $(CURDIR)/user-config.py
endif

	# Add here commands to compile the package.
	scons WITH_BF_PLAYER=1 WITH_BF_OPENAL=0 BF_FANCY=0 $(COMPILER)

	# Build plugins by hand
	install -d $(CURDIR)/install/linux2/plugins/include
	install -m 644 source/blender/blenpluginapi/*.h $(CURDIR)/install/linux2/plugins/include
	chmod +x $(CURDIR)/install/linux2/plugins/bmake
	$(MAKE) -C $(CURDIR)/install/linux2/plugins $(COMPILER)

	touch $@

po/blender.pot:
	python debian/genpot/near_all_po.py
	cp debian/pot-header.txt po/blender.pot
	msguniq almost_all.po >> po/blender.pot
	rm -f almost_all.po

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp \
		source/tools/guess/config.guess \
		extern/bFTGL/unix/config.guess \
		extern/bFTGL/unix/config.sub

	# Add here commands to clean up after the build process.
	cp $(CURDIR)/debian/misc/user-config.py $(CURDIR)
	-scons clean BF_FANCY=0
	rm -f $(CURDIR)/user-config.py

	# Remove *.pycs
	dh_clean tools/*.pyc tools/scons/*.pyc tools/scons/bs/*.pyc

	# Clean plugins (non needed? done by scons now ??)
	#-$(MAKE) -C $(CURDIR)/install/linux2/plugins clean
	rm -rf $(CURDIR)/install/linux2/plugins/include

	rm -f po/blender.pot

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/blender.
	install -m 755 $(CURDIR)/install/linux2/blender $(CURDIR)/debian/blender/usr/bin/blender-bin
	install -m 755 $(CURDIR)/debian/blender-wrapper $(CURDIR)/debian/blender/usr/bin/blender
	install -m 755 $(CURDIR)/install/linux2/blenderplayer $(CURDIR)/debian/blender/usr/bin/blenderplayer

	# Install menus & icons
	install -m 644 $(CURDIR)/debian/misc/blender.desktop $(CURDIR)/debian/blender/usr/share/applications
	install -m 644 $(CURDIR)/debian/misc/blender.xpm $(CURDIR)/debian/blender/usr/share/pixmaps

	# Install plugins
	install -d $(CURDIR)/debian/blender/usr/lib/blender/plugins/sequence
	install -d $(CURDIR)/debian/blender/usr/lib/blender/plugins/texture
	install -m 644 $(CURDIR)/install/linux2/plugins/sequence/*.so $(CURDIR)/debian/blender/usr/lib/blender/plugins/sequence
	install -m 644 $(CURDIR)/install/linux2/plugins/texture/*.so $(CURDIR)/debian/blender/usr/lib/blender/plugins/texture

	# Install miscellaneous files under /usr/lib/blender
	cp -a $(CURDIR)/release/scripts/bpydata $(CURDIR)/debian/blender/usr/lib/blender
	cp -a $(CURDIR)/release/scripts $(CURDIR)/debian/blender/usr/lib/blender
	cp -a $(CURDIR)/install/linux2/.blender/locale $(CURDIR)/debian/blender/usr/lib/blender
	install -m 644 $(CURDIR)/release/VERSION $(CURDIR)/debian/blender/usr/lib/blender
	install -m 644 $(CURDIR)/install/linux2/.blender/.Blanguages $(CURDIR)/debian/blender/usr/lib/blender
	install -m 644 $(CURDIR)/install/linux2/.blender/.bfont.ttf $(CURDIR)/debian/blender/usr/lib/blender

	# Fix permeissions for python scripts
	find $(CURDIR)/debian/blender/usr/lib/blender/scripts/ -name "*.py" -exec chmod -R 644 '{}' \;

	# Remove CVS dirs in package directory
	-find $(CURDIR)/debian/blender -name CVS -type d -exec rm -rf '{}' \;

	# Install lintian overrides file
	cp $(CURDIR)/debian/blender.lintian-overrides \
	   $(CURDIR)/debian/blender/usr/share/lintian/overrides/blender

	cp $(CURDIR)/debian/blender.linda-overrides \
	   $(CURDIR)/debian/blender/usr/share/linda/overrides/blender

	# Needed removal, insecure script, see CVE-2007-1253
	rm $(CURDIR)/debian/blender/usr/lib/blender/scripts/kmz_ImportWithMesh.py


# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_installmenu
	dh_installman $(CURDIR)/debian/blender.1
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_pycentral
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install