1#!/usr/bin/make -f 2# -*- makefile -*- 3# Sample debian/rules that uses debhelper. 4# This file was originally written by Joey Hess and Craig Small. 5# As a special exception, when this file is copied by dh-make into a 6# dh-make output file, you may use that output file without restriction. 7# This special exception was added by Craig Small in version 0.37 of dh-make. 8 9# Uncomment this to turn on verbose mode. 10#export DH_VERBOSE=1 11 12 13 14 15CFLAGS = -Wall -g 16 17ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) 18 CFLAGS += -O0 19else 20 CFLAGS += -O2 21endif 22 23# shared library versions, option 1 24version=2.0.5 25major=2 26# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so 27#version=`ls src/.libs/lib*.so.* | \ 28# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` 29#major=`ls src/.libs/lib*.so.* | \ 30# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` 31 32configure: configure-stamp 33configure-stamp: 34 dh_testdir 35 # Add here commands to configure the package. 36ifneq "$(wildcard /usr/share/misc/config.sub)" "" 37 cp -f /usr/share/misc/config.sub config.sub 38endif 39ifneq "$(wildcard /usr/share/misc/config.guess)" "" 40 cp -f /usr/share/misc/config.guess config.guess 41endif 42 ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" 43 44 touch configure-stamp 45 46 47build: build-stamp 48build-stamp: configure-stamp 49 dh_testdir 50 51 # Add here commands to compile the package. 52 $(MAKE) 53 54 touch $@ 55 56clean: 57 dh_testdir 58 dh_testroot 59 rm -f build-stamp configure-stamp 60 61 # Add here commands to clean up after the build process. 62 -$(MAKE) clean 63 64 dh_clean 65 66install: build 67 dh_testdir 68 dh_testroot 69 dh_clean -k 70 dh_installdirs 71 72 # Add here commands to install the package into debian/tmp 73 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install 74 75 76# Build architecture-independent files here. 77binary-indep: build install 78# We have nothing to do by default. 79 80# Build architecture-dependent files here. 81binary-arch: build install 82 dh_testdir 83 dh_testroot 84 dh_installchangelogs 85 dh_installdocs 86 dh_installexamples 87 dh_install --sourcedir=$(CURDIR)/debian/tmp 88# dh_installmenu 89# dh_installdebconf 90# dh_installlogrotate 91# dh_installemacsen 92# dh_installpam 93# dh_installmime 94# dh_installinit 95# dh_installcron 96# dh_installinfo 97 dh_installman 98 dh_link 99 dh_strip 100 dh_compress 101 dh_fixperms 102# dh_perl 103# dh_python 104# dh_makeshlibs 105 dh_installdeb 106 dh_shlibdeps 107 dh_gencontrol 108 dh_md5sums 109 dh_builddeb 110 111binary: binary-indep binary-arch 112.PHONY: build clean binary-indep binary-arch binary install configure 113