script to build debian packages directly from svn, using blender version and svn...
[blender.git] / build_files / package_spec / debian / rules
1 #!/usr/bin/make -f
2
3 # blender spesific CMake options
4 DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_BUILD_TYPE:STRING=Release -DWITH_PYTHON_INSTALL:BOOL=OFF -DWITH_OPENCOLLADA:BOOL=OFF
5
6 include /usr/share/cdbs/1/rules/debhelper.mk
7 include /usr/share/cdbs/1/class/cmake.mk
8
9 SVN_URL := https://svn.blender.org/svnroot/bf-blender/trunk/blender
10 REV := $(shell dpkg-parsechangelog | sed -rne 's,^Version: .*[+~]svn([0-9]+).*,\1,p')
11 VER := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
12 TARBALL = blender_$(VER).orig.tar.gz
13
14 get-orig-source:
15         rm -rf get-orig-source $(TARBALL)
16         mkdir get-orig-source
17         svn -q export -r $(REV) $(SVN_URL) get-orig-source/blender-$(VER)
18         GZIP='--best --no-name' tar czf $(TARBALL) -C get-orig-source blender-$(VER)
19         rm -rf get-orig-source
20         echo "  "$(TARBALL)" created; move it to the right destination to build the package"