All pastes #332846 Raw Edit

Unnamed

public text v1 · immutable
#332846 ·published 2007-01-30 09:54 UTC
rendered paste body
#!/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.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatibility version to use.
export DH_COMPAT=5

# python version for which a pkg will be build
PYVERSIONS= $(shell pyversions -r debian/control)
export PYVERSIONS

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

build: build-stamp

build-stamp: 
	dh_testdir

	# Add here commands to compile the package.

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f $(CURDIR)/*pyo
	rm -f $(CURDIR)/*pyc
	rm -f build-stamp

	# Add here commands to clean up after the build process.

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/python-ltsp.
	set -e; \
	for v in $(PYVERSIONS); do \
	  mkdir -p debian/python-ltsp/usr/lib/$$v/site-packages/ltsp; \
	  export MODULESDIR=$(CURDIR)/debian/python-ltsp/usr/lib/$$v/site-packages/ ; make install; \
	done


# Build architecture-independent files here.
binary-indep: build install
	dh_testdir -i
	dh_testroot -i

	[ -d examples ] || mkdir examples]
	cp -r doc/scripts/* examples

	dh_installdocs -i
	dh_installexamples -i
	dh_installchangelogs -i ChangeLog
	dh_link -i
	dh_compress -i -X.py
	dh_fixperms -i
	dh_pycentral -i
	dh_installdeb -i
	dh_shlibdeps -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install