summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2004-01-13 13:40:00 +0000
committerPeter Palfrader <peter@palfrader.org>2004-01-13 13:40:00 +0000
commit9d3cf1b4d1884d7f7e0ea39bc9fe8eae481647a2 (patch)
treef8abee2a51977b150260bfb7699a4c94b6bc6bb7 /debian/rules
parent793c65e60fa0cf4be6cde6b6011d12291e92a969 (diff)
downloadtor-9d3cf1b4d1884d7f7e0ea39bc9fe8eae481647a2.tar.gz
tor-9d3cf1b4d1884d7f7e0ea39bc9fe8eae481647a2.zip
First go at a debian package
svn:r987
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules94
1 files changed, 94 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000000..1bf6846f01
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,94 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL_PROGRAM += -s
+endif
+
+config.status: configure
+ dh_testdir
+ CFLAGS="$(CFLAGS)" ./configure \
+ --host=$(DEB_HOST_GNU_TYPE) \
+ --build=$(DEB_BUILD_GNU_TYPE) \
+ --prefix=/usr \
+ --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info \
+ --localstatedir=/var \
+ --sysconfdir=/etc
+
+
+build: build-stamp
+
+build-stamp: config.status
+ dh_testdir
+
+ $(MAKE)
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ -$(MAKE) distclean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/tor
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs ChangeLog
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installdebconf
+ dh_installlogrotate
+# dh_installemacsen
+# dh_installmime
+ dh_installinit
+# dh_installcron
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install