3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
6 # Uncomment this to turn on verbose mode.
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_HOST_GNU_TYPE
)
12 DEB_BUILD_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_BUILD_GNU_TYPE
)
17 include /usr
/share
/dpatch
/dpatch.make
19 # Do not optimize the build with "noopt"
20 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
26 # Do not strip the binary with "nostrip"
27 #ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
28 # INSTALL_PROGRAM += -s
31 # Prevent the design paper from being built with "nodoc"
32 ifneq (,$(findstring nodoc
,$(DEB_BUILD_OPTIONS
)))
36 # Prevent the unit tests from being run with "nocheck"
37 ifneq (,$(findstring nocheck
,$(DEB_BUILD_OPTIONS
)))
40 ifneq (,$(findstring notest
,$(DEB_BUILD_OPTIONS
)))
44 configure
: patch-stamp
45 config.status
: configure
47 CFLAGS
="$(CFLAGS)" .
/configure \
48 --host
=$(DEB_HOST_GNU_TYPE
) \
49 --build
=$(DEB_BUILD_GNU_TYPE
) \
51 --mandir=\
$${prefix}/share
/man \
52 --infodir=\
$${prefix}/share
/info \
53 --localstatedir
=/var \
59 build-stamp
: config.status
66 if
[ "$(RUN_TEST)" != "no" ]; then \
69 echo
-e
"\n\nSkipping unittests\n\n"; \
74 if
[ "$(BUILD_DOC)" != "no" ]; then \
75 make
-C doc
/design-paper tor-design.ps tor-design.pdf || \
76 ( echo
-e
"*\n*\n*\n*"; \
77 echo
"* Building some docs failed, perhaps because you did not install the"; \
78 echo
"* declared build dependencies and then used -o with dpkg-buildpackage."; \
80 echo
"* If you want to skip this part, you can set nodoc in DEB_BUILD_OPTIONS" ; \
81 echo
"* and start the build again. DEB_BUILD_OPTIONS=nodoc dpkg-buildpackage.."; \
82 echo
-e
"*\n*\n*\n*"; \
85 echo
-e
"\n\nSkipping tor-design.{ps,pdf}\n\n"; \
105 $(MAKE
) install DESTDIR
=$(CURDIR
)/debian
/tor
106 # move tor to where it belongs
107 mv
$(CURDIR
)/debian
/tor
/etc
/tor
/torrc.sample
$(CURDIR
)/debian
/tor
/etc
/tor
/torrc
108 mv
$(CURDIR
)/debian
/tor
/usr
/bin
/tor
$(CURDIR
)/debian
/tor
/usr
/sbin
/tor
109 install -d
$(CURDIR
)/debian
/tor
/usr
/share
/man
/man8
110 mv
$(CURDIR
)/debian
/tor
/usr
/share
/man
/man1
/tor
.1 $(CURDIR
)/debian
/tor
/usr
/share
/man
/man8
/tor
.8
112 install -m
755 contrib
/torify
$(CURDIR
)/debian
/tor
/usr
/bin
113 install -m
644 contrib
/torify
.1 $(CURDIR
)/debian
/tor
/usr
/share
/man
/man1
114 install -m
644 contrib
/tor-tsocks.conf
$(CURDIR
)/debian
/tor
/etc
/tor
116 install -m
644 debian
/tor.lintian-override
$(CURDIR
)/debian
/tor
/usr
/share
/lintian
/overrides
/tor
118 dh_link usr
/share
/man
/man8
/tor
.8 usr
/share
/man
/man5
/torrc
.5
120 rm -f
$(CURDIR
)/debian
/tor
/usr
/bin
/tor-control.py
123 # Build architecture-independent files here.
124 binary-indep
: build
install
125 # We have nothing to do by default.
127 # Build architecture-dependent files here.
128 binary-arch
: build
install
131 dh_installchangelogs ChangeLog
133 if
[ "$(BUILD_DOC)" != "no" ]; then \
134 install -m
644 doc
/design-paper
/tor-design.ps
$(CURDIR
)/debian
/tor
/usr
/share
/doc
/tor
/; \
135 install -m
644 doc
/design-paper
/tor-design.pdf
$(CURDIR
)/debian
/tor
/usr
/share
/doc
/tor
/; \
156 binary
: binary-indep binary-arch
157 .PHONY
: build
clean binary-indep binary-arch binary
install