patch [#26030] Debian spec fix (Patch for #26028)
[blender-staging.git] / build_files / package_spec / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 SVN_URL := https://svn.blender.org/svnroot/bf-blender/trunk/blender
5 REV := $(shell dpkg-parsechangelog | sed -rne 's,^Version: .*[+~]svn([0-9]+).*,\1,p')
6 VER := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
7 REL := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([0-9]+\.[0-9]+).*,\1,p')
8 TARBALL = blender_$(VER).orig.tar.gz
9 BLDDIR = debian/cmake
10
11 %:
12         dh $@ -Scmake -B$(BLDDIR) --parallel --with python3 --without python-support
13
14 override_dh_auto_configure:
15         # blender spesific CMake options
16         dh_auto_configure -- \
17                 -DCMAKE_BUILD_TYPE:STRING=Release \
18                 -DWITH_PYTHON_INSTALL:BOOL=OFF \
19                 -DWITH_OPENCOLLADA:BOOL=OFF
20
21 override_dh_python3:
22         dh_python3 -V 3.1-3.2 /usr/share/blender/$(REL)/scripts
23
24 get-orig-source:
25         rm -rf get-orig-source $(TARBALL)
26         mkdir get-orig-source
27         svn -q export -r $(REV) $(SVN_URL) get-orig-source/blender-$(VER)
28         GZIP='--best --no-name' tar czf $(TARBALL) -C get-orig-source blender-$(VER)
29         rm -rf get-orig-source
30         echo "  "$(TARBALL)" created; move it to the right destination to build the package"