OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / user / xl2tpd / debian / rules
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 CFLAGS = -Wall -g
13
14 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
15         CFLAGS += -O0
16 else
17         CFLAGS += -O2
18 endif
19
20 configure: configure-stamp
21 configure-stamp:
22         dh_testdir
23         touch configure-stamp
24
25 build: build-stamp
26 build-stamp: configure-stamp 
27         dh_testdir
28         $(MAKE)
29         touch $@
30
31 clean:
32         dh_testdir
33         dh_testroot
34         rm -f build-stamp configure-stamp
35         [ ! -f Makefile ] || $(MAKE) clean
36         dh_clean 
37
38 install: build
39         dh_testdir
40         dh_testroot
41         dh_clean -k 
42         dh_installdirs
43         $(MAKE) DESTDIR=$(CURDIR)/debian/xl2tpd install
44         cp $(CURDIR)/doc/l2tpd.conf.sample $(CURDIR)/debian/xl2tpd/etc/xl2tpd/xl2tpd.conf
45         cp $(CURDIR)/doc/l2tp-secrets.sample $(CURDIR)/debian/xl2tpd/etc/xl2tpd/l2tp-secrets
46
47 # Build architecture-independent files here.
48 binary-indep: build install
49         dh_link -pl2tpd usr/share/doc/xl2tpd usr/share/doc/l2tpd
50
51 # Build architecture-dependent files here.
52 binary-arch: build install
53         dh_testdir
54         dh_testroot
55         dh_installchangelogs CHANGES
56         dh_installdocs
57 #       dh_install
58         dh_installinit
59         dh_installman
60         cp debian/lintian-overrides \
61                 debian/xl2tpd/usr/share/lintian/overrides/xl2tpd
62         dh_link
63         dh_strip
64         dh_compress
65         dh_fixperms
66         chmod 600 $(CURDIR)/debian/xl2tpd/etc/xl2tpd/l2tp-secrets
67         dh_installdeb
68         dh_shlibdeps
69         dh_gencontrol
70         dh_md5sums
71         dh_builddeb
72
73 binary: binary-indep binary-arch
74 .PHONY: build clean binary-indep binary-arch binary install configure