2
2
# debian/rules for rng-tools
3
3
# GNU copyright 1997 to 1999 by Joey Hess.
4
# Copyright (c) 2003,2004 by Henrique de Moraes Holschuh
5
# Published under the GNU GPL license
4
# Copyright (c) 2003-2010 by Henrique de Moraes Holschuh
5
# Published under the GNU GPL license version 2 or any later versions
6
6
# Based on previous work by Viral Shah <viral@debian.org>.
8
# $Id: rules,v 1.3.2.15 2008-06-19 03:02:21 hmh Exp $
11
9
PKGDIR:=$(CURDIR)/debian/$(PACKAGE)
13
11
# DebHelper control
14
export DH_ALWAYS_EXCLUDE=CVS
16
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
17
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
20
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12
export DH_ALWAYS_EXCLUDE=CVS:.svn:.git
14
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
15
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
16
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
25
18
ifneq (,$(findstring strict,$(DEB_BUILD_OPTIONS)))
34
27
confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
37
# Detect ix86 and enable VIA PadLock support
38
# Debian uses i386. i586 and i686 are handled upstream
39
ifneq (,$(findstring i386,$(DEB_BUILD_GNU_TYPE)))
30
# Detect i386/i486 and force-enable VIA PadLock support
31
ifneq (,$(findstring i386,$(DEB_BUILD_ARCH)))
40
32
confflags += --enable-viapadlock
35
build-prepare: build-prepare-stamp
39
touch build-prepare-stamp
41
configure-stamp: | build-prepare
50
rm -f config.sub config.guess
51
ln -s /usr/share/misc/config.sub config.sub
52
ln -s /usr/share/misc/config.guess config.guess
54
rm -rf config.log config.cache
55
./configure CFLAGS="-Wall -pipe $(DEBUGFLAGS)" \
44
./configure CFLAGS="$(CFLAGS) -Wall -pipe" $(confflags)\
57
46
--mandir=\$${prefix}/share/man \
58
47
--infodir=\$${prefix}/share/info
60
49
touch configure-stamp
62
build: configure-stamp build-stamp
52
build-stamp: configure-stamp
73
62
rm -f build-stamp configure-stamp
74
63
rm -rf autom4te.cache
76
rm -f config.sub config.guess
77
ln -s /usr/share/misc/config.sub config.sub
78
ln -s /usr/share/misc/config.guess config.guess
80
[ ! -f Makefile ] || $(MAKE) clean
81
65
[ ! -f Makefile ] || $(MAKE) distclean
83
rm -f config.sub config.guess
84
rm -rf config.log config.cache
67
rm -f config.sub config.guess configure config.log
70
rm -f Makefile.in aclocal.m4 contrib/Makefile.in
71
rm -f Makefile contrib/Makefile
72
rm -f depcomp install-sh missing rng-tools-config.h.in
94
82
$(MAKE) install DESTDIR=$(PKGDIR)
101
89
install -m 644 debian/logcheck.ignore \
102
90
$(PKGDIR)/etc/logcheck/violations.ignore.d/rng-tools
104
# Install lintian overrides, if any
106
for i in *.lintian ; do \
108
mkdir -p "$${i%%.lintian}/usr/share/lintian/overrides" ;\
109
install -m 644 "$$i" "$${i%%.lintian}/usr/share/lintian/overrides/$${i%%.lintian}" ;\
113
93
# Build architecture-independent files here.
114
94
binary-indep: build install