rules 1.78 KB
Newer Older
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
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk
#include /usr/share/cdbs/1/class/qmake.mk
#include /usr/share/cdbs/1/rules/simple-patchsys.mk

# Add here any variable or target overrides you need.
PACKAGE = libopenmesh
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
	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"

install/libopenmesh::
	#dh_install -libopenmesh --autodest debian/tmp/usr/lib/OpenMesh/lib*.so.*
	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 --autodest debian/tmp/usr/lib/OpenMesh/lib*.so
	#dh_install -plibopenmesh-dev debian/tmp/usr/lib/OpenMesh/lib*.prl /usr/lib/
	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