rules 1.82 KB
Newer Older
1 2 3 4 5 6
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk

# Add here any variable or target overrides you need.
7
PACKAGE = openmesh
8 9 10 11 12 13 14 15 16
SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' )
TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
.PHONY: get-orig-source
get-orig-source:
	rm -rf get-orig-source $(TARBALL)
	mkdir get-orig-source
	svn export -r $(SVN_REVISION) --username anonymous --password anonymous http://openmesh.org/svnrepo/OpenMesh/trunk/ \
	 get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
17 18
	# need to delete debian directory here:
	rm -rf get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/debian
19 20 21 22
	GZIP=--best tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig
	rm -rf get-orig-source
	echo "  "$(TARBALL)" created; move it to the right destination to build the package"

Jan Möbius's avatar
Jan Möbius committed
23 24 25 26 27
build/libopenmesh-doc::
	cd $(DEB_BUILDDIR) && $(MAKE) doc
	mkdir -p debian/tmp/usr/share/doc/
	cp -r $(DEB_BUILDDIR)/Build/share/OpenMesh/Doc/html debian/tmp/usr/share/doc/OpenMesh

28 29 30 31 32 33 34 35 36 37 38 39
install/libopenmesh::
	ln -sf libOpenMeshCore.so.2.0 debian/tmp/usr/lib/OpenMesh/libOpenMeshCore.so.2
	ln -sf libOpenMeshTools.so.2.0 debian/tmp/usr/lib/OpenMesh/libOpenMeshTools.so.2
	dh_install -plibopenmesh debian/tmp/usr/lib/OpenMesh/lib*.so.* /usr/lib/

install/libopenmesh-dev::
	dh_install -plibopenmesh-dev debian/tmp/usr/lib/OpenMesh/lib*.so /usr/lib/
	dh_install -plibopenmesh-dev debian/tmp/usr/lib/OpenMesh/lib*.a /usr/lib/
	dh_install -plibopenmesh-dev --autodest debian/tmp/usr/include/OpenMesh

install/libopenmesh-apps::
	dh_install -plibopenmesh-apps debian/tmp/usr/bin/* /usr/lib/OpenMesh/Apps
Jan Möbius's avatar
Jan Möbius committed
40 41 42

install/libopenmesh-doc::
	dh_install -plibopenmesh-doc debian/tmp/usr/share/doc/*