X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=debian%2Frules;h=f9d1196afb5ccacac49477f7d71436cb6d6e833b;hb=354ded4d2780bf0cd0ebc4053cf71517d440dea3;hp=3d3d89ca1e685bf1b392d1006f8138034ab8a6fe;hpb=acec5f4851b1930cafb6ddc044131204a017401e;p=deb_libcec.git diff --git a/debian/rules b/debian/rules index 3d3d89c..f9d1196 100755 --- a/debian/rules +++ b/debian/rules @@ -1,13 +1,39 @@ #!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. +# debian package for libcec +# Copyright Pulse-Eight 2011 # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + confflags += --build=$(DEB_HOST_GNU_TYPE) +else + confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) +endif + %: dh $@ + +override_dh_clean: + rm -rf build + rm -rf debian/libcec + rm -rf debian/libcec-dev + dh_clean + +override_dh_auto_clean: + dh_clean + +override_dh_auto_configure: + [ -d build ] || mkdir build + cd build && ../configure $(confflags) CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" --prefix=/usr + +override_dh_auto_build: + $(MAKE) -C build + +override_dh_install: + $(MAKE) -C build DESTDIR=$(CURDIR)/debian/libcec install-exec + $(MAKE) -C build DESTDIR=$(CURDIR)/debian/libcec-dev install-data + mv -v $(CURDIR)/debian/libcec/usr/lib/*.a $(CURDIR)/debian/libcec-dev/usr/lib/. + mv -v $(CURDIR)/debian/libcec/usr/lib/*.la $(CURDIR)/debian/libcec-dev/usr/lib/.