| 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 | |
|---|
| 15 | CFLAGS = -Wall -g |
|---|
| 16 | |
|---|
| 17 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
|---|
| 18 | CFLAGS += -O0 |
|---|
| 19 | else |
|---|
| 20 | CFLAGS += -O2 |
|---|
| 21 | endif |
|---|
| 22 | |
|---|
| 23 | # shared library versions, option 1 |
|---|
| 24 | version=2.0.5 |
|---|
| 25 | major=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 | |
|---|
| 32 | configure: configure-stamp |
|---|
| 33 | configure-stamp: |
|---|
| 34 | dh_testdir |
|---|
| 35 | # Add here commands to configure the package. |
|---|
| 36 | [ -d debian/build ] || mkdir debian/build |
|---|
| 37 | [ ! -e CMakeCache.txt ] || rm CMakeCache.txt |
|---|
| 38 | cd debian/build; cmake ../.. |
|---|
| 39 | |
|---|
| 40 | touch configure-stamp |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | build: build-stamp |
|---|
| 44 | build-stamp: configure-stamp |
|---|
| 45 | dh_testdir |
|---|
| 46 | |
|---|
| 47 | # Add here commands to compile the package. |
|---|
| 48 | $(MAKE) -C debian/build |
|---|
| 49 | |
|---|
| 50 | touch $@ |
|---|
| 51 | |
|---|
| 52 | clean: |
|---|
| 53 | dh_testdir |
|---|
| 54 | dh_testroot |
|---|
| 55 | rm -f build-stamp configure-stamp |
|---|
| 56 | |
|---|
| 57 | # Add here commands to clean up after the build process. |
|---|
| 58 | rm -rf debian/build |
|---|
| 59 | |
|---|
| 60 | dh_clean |
|---|
| 61 | |
|---|
| 62 | install: build |
|---|
| 63 | dh_testdir |
|---|
| 64 | dh_testroot |
|---|
| 65 | dh_clean -k |
|---|
| 66 | dh_installdirs |
|---|
| 67 | |
|---|
| 68 | # Add here commands to install the package into debian/tmp |
|---|
| 69 | $(MAKE) -C debian/build DESTDIR=$(CURDIR)/debian/tmp install |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | # Build architecture-independent files here. |
|---|
| 73 | binary-indep: build install |
|---|
| 74 | # We have nothing to do by default. |
|---|
| 75 | |
|---|
| 76 | # Build architecture-dependent files here. |
|---|
| 77 | binary-arch: build install |
|---|
| 78 | dh_testdir |
|---|
| 79 | dh_testroot |
|---|
| 80 | dh_installchangelogs |
|---|
| 81 | dh_installdocs |
|---|
| 82 | dh_installexamples |
|---|
| 83 | dh_install --list-missing |
|---|
| 84 | dh_installman |
|---|
| 85 | dh_link |
|---|
| 86 | dh_strip |
|---|
| 87 | dh_compress |
|---|
| 88 | dh_fixperms |
|---|
| 89 | dh_installdeb |
|---|
| 90 | dh_shlibdeps |
|---|
| 91 | dh_gencontrol |
|---|
| 92 | dh_md5sums |
|---|
| 93 | dh_builddeb |
|---|
| 94 | |
|---|
| 95 | binary: binary-indep binary-arch |
|---|
| 96 | .PHONY: build clean binary-indep binary-arch binary install configure |
|---|