| 1 | #!/usr/bin/make -f |
|---|
| 2 | # Sample debian/rules that uses debhelper. |
|---|
| 3 | # This file is public domain software, originally written by Joey Hess. |
|---|
| 4 | # |
|---|
| 5 | # This version is for a multibinary package. It also allows you to build any |
|---|
| 6 | # of the binary packages independantly, via binary-<package> targets. |
|---|
| 7 | |
|---|
| 8 | # Uncomment this to turn on verbose mode. |
|---|
| 9 | export DH_VERBOSE=1 |
|---|
| 10 | |
|---|
| 11 | ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
|---|
| 12 | CFLAGS += -g |
|---|
| 13 | endif |
|---|
| 14 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
|---|
| 15 | INSTALL_PROGRAM += -s |
|---|
| 16 | endif |
|---|
| 17 | |
|---|
| 18 | # This has to be exported to make some magic below work. |
|---|
| 19 | export DH_OPTIONS |
|---|
| 20 | |
|---|
| 21 | build: build-stamp |
|---|
| 22 | build-stamp: |
|---|
| 23 | dh_testdir |
|---|
| 24 | |
|---|
| 25 | # compilation et installation des binaires |
|---|
| 26 | |
|---|
| 27 | touch build-stamp |
|---|
| 28 | |
|---|
| 29 | clean: |
|---|
| 30 | dh_testdir |
|---|
| 31 | dh_testroot |
|---|
| 32 | rm -f build-stamp |
|---|
| 33 | dh_clean |
|---|
| 34 | |
|---|
| 35 | install: DH_OPTIONS= |
|---|
| 36 | install: build |
|---|
| 37 | dh_testdir |
|---|
| 38 | dh_testroot |
|---|
| 39 | dh_clean -k |
|---|
| 40 | dh_installdirs |
|---|
| 41 | |
|---|
| 42 | # default perms that should be used |
|---|
| 43 | # usr/lib/alternc/* root.www-data 750 |
|---|
| 44 | # etc/alternc/* root.root 750 |
|---|
| 45 | |
|---|
| 46 | # Add here commands to install the package into debian/tmp. |
|---|
| 47 | # conffiles |
|---|
| 48 | install -o root -g root -m0755 alternc-slavedns debian/alternc-slavedns/usr/sbin/ |
|---|
| 49 | install -o root -g root -m0640 defaults.conf debian/alternc-slavedns/etc/alternc/slavedns/ |
|---|
| 50 | chown root.root debian/alternc-slavedns/var/cache/slavedns |
|---|
| 51 | chown root.root debian/alternc-slavedns/etc/bind/slavedns |
|---|
| 52 | |
|---|
| 53 | # dh_install --prefix=install/alternc |
|---|
| 54 | |
|---|
| 55 | # This single target is used to build all the packages, all at once, or |
|---|
| 56 | # one at a time. So keep in mind: any options passed to commands here will |
|---|
| 57 | # affect _all_ packages. Anything you want to only affect one package |
|---|
| 58 | # should be put in another target, such as the install target. |
|---|
| 59 | |
|---|
| 60 | binary-common: build install |
|---|
| 61 | dh_testdir |
|---|
| 62 | dh_testroot |
|---|
| 63 | dh_installchangelogs |
|---|
| 64 | dh_installdocs |
|---|
| 65 | # dh_installexamples |
|---|
| 66 | # dh_installmenu |
|---|
| 67 | dh_installdebconf |
|---|
| 68 | dh_installlogrotate |
|---|
| 69 | # dh_installemacsen |
|---|
| 70 | # dh_installpam |
|---|
| 71 | # dh_installmime |
|---|
| 72 | # dh_installinit |
|---|
| 73 | # dh_installman |
|---|
| 74 | dh_installcron |
|---|
| 75 | # dh_installinfo |
|---|
| 76 | dh_installman |
|---|
| 77 | dh_strip |
|---|
| 78 | dh_link |
|---|
| 79 | dh_compress |
|---|
| 80 | #we handle our own perms |
|---|
| 81 | # dh_fixperms |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | # dh_makeshlibs |
|---|
| 85 | dh_installdeb |
|---|
| 86 | dh_perl |
|---|
| 87 | # dh_shlibdeps |
|---|
| 88 | dh_gencontrol -- -cdebian/control |
|---|
| 89 | dh_md5sums |
|---|
| 90 | dh_builddeb |
|---|
| 91 | |
|---|
| 92 | # Build architecture independant packages using the common target. |
|---|
| 93 | binary-indep: build install binary-common |
|---|
| 94 | # (Uncomment this next line if you have such packages.) |
|---|
| 95 | # $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
|---|
| 96 | |
|---|
| 97 | # Build architecture dependant packages using the common target. |
|---|
| 98 | binary-arch: build install binary-common |
|---|
| 99 | # $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common |
|---|
| 100 | |
|---|
| 101 | # Any other binary targets build just one binary package at a time. |
|---|
| 102 | # binary-%: build install |
|---|
| 103 | # make -f debian/rules binary-common DH_OPTIONS=-p$* |
|---|
| 104 | |
|---|
| 105 | # binary: binary-indep binary-arch |
|---|
| 106 | # .PHONY: build clean binary-indep binary-arch binary install |
|---|
| 107 | |
|---|
| 108 | binary: binary-common |
|---|
| 109 | |
|---|
| 110 | .PHONY: build clean binary install |
|---|