~ubuntu-branches/ubuntu/hoary/findutils/hoary

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Kevin Dalley
  • Date: 2001-06-01 20:33:32 UTC
  • Revision ID: james.westby@ubuntu.com-20010601203332-bx0dmilblp80t3rh
Tags: 4.1.7-2
changed libc dependencies to remove libc6-dev build-depends (closes:
#99216).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# Sample debian.rules file - for GNU Hello (1.3).
 
3
# Copyright 1994,1995 by Ian Jackson.
 
4
# I hereby give you perpetual unlimited permission to copy,
 
5
# modify and relicense this file, provided that you do not remove
 
6
# my name from the file itself.  (I assert my moral right of
 
7
# paternity under the Copyright, Designs and Patents Act 1988.)
 
8
# This file may have to be extensively modified
 
9
# Copyright 1996 by Kevin Dalley
 
10
#
 
11
 
 
12
 
 
13
CC = gcc
 
14
CFLAGS = -O2
 
15
INSTALL_STRIP_FLAG =
 
16
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 
17
CFLAGS += -g
 
18
endif
 
19
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
20
INSTALL_STRIP_FLAG = -s
 
21
endif
 
22
 
 
23
package = findutils
 
24
 
 
25
build:
 
26
        $(checkdir)
 
27
        ./configure --prefix=/usr --localstatedir=/var/lib/locate \
 
28
                --libexecdir='$${prefix}/lib/locate' \
 
29
                --mandir='$${prefix}/share/man' \
 
30
                --infodir='$${prefix}/share/info'
 
31
        $(MAKE) \
 
32
                CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 
33
        cd doc ; makeinfo find.texi
 
34
        touch build
 
35
 
 
36
clean:
 
37
        $(checkdir)
 
38
        -rm -f build
 
39
        -$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
 
40
        -rm -rf *~ debian/tmp debian/*~ debian/files*
 
41
 
 
42
binary-indep:   checkroot build
 
43
        $(checkdir)
 
44
# There are no architecture-independent files to be uploaded
 
45
# generated by this package.  If there were any they would be
 
46
# made here.
 
47
 
 
48
binary-arch:    checkroot build
 
49
        $(checkdir)
 
50
        -rm -rf debian/tmp
 
51
        install -d debian/tmp debian/tmp/DEBIAN
 
52
        install -d debian/tmp/usr/share/doc/$(package)
 
53
        install -d debian/tmp/usr/bin
 
54
        install -d debian/tmp/usr/lib
 
55
        install -d debian/tmp/usr/lib/locate
 
56
        install -d debian/tmp/etc
 
57
        install -d debian/tmp/etc/cron.daily
 
58
        install -d debian/tmp/var
 
59
        install -d debian/tmp/var/lib
 
60
        install -d debian/tmp/var/lib/locate
 
61
        install debian/postinst debian/prerm debian/preinst debian/tmp/DEBIAN/.
 
62
        install -m 0644 debian/conffiles debian/tmp/DEBIAN/.
 
63
        install debian/cron.find debian/tmp/etc/cron.daily/find
 
64
        install -m 0644 debian/updatedb.conf debian/tmp/etc/updatedb.conf
 
65
        $(MAKE) DESTDIR=`pwd`/debian/tmp \
 
66
                CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
 
67
                INSTALL_PROGRAM='install -c' \
 
68
                INSTALL_STRIP_FLAG="$(INSTALL_STRIP_FLAG)" \
 
69
                install
 
70
        install -d debian/tmp/usr/share/doc-base
 
71
        install -m 0644 debian/doc-base \
 
72
                debian/tmp/usr/share/doc-base/findutils
 
73
        gzip -9v debian/tmp/usr/share/info/*
 
74
        gzip -9v debian/tmp/usr/share/man/man[15]/*
 
75
        install -m 0644 debian/copyright debian/tmp/usr/share/doc/$(package)/.
 
76
        install -m 0644 debian/changelog \
 
77
                debian/tmp/usr/share/doc/$(package)/changelog.Debian
 
78
        gzip -9v debian/tmp/usr/share/doc/$(package)/changelog.Debian
 
79
        for file in ChangeLog NEWS README TODO; do \
 
80
                install -m 0644 $$file \
 
81
                        debian/tmp/usr/share/doc/$(package);\
 
82
                gzip -9v debian/tmp/usr/share/doc/$(package)/$$file;\
 
83
        done
 
84
        ln -s ChangeLog.gz debian/tmp/usr/share/doc/$(package)/changelog.gz
 
85
        install -m 0644 debian/README.debian \
 
86
                debian/tmp/usr/share/doc/$(package)
 
87
        dpkg-shlibdeps -dPre-Depends debian/tmp/usr/bin/find \
 
88
                debian/tmp/usr/bin/locate debian/tmp/usr/bin/xargs
 
89
        dpkg-gencontrol -isp
 
90
        dpkg --build debian/tmp ..
 
91
 
 
92
define checkdir
 
93
        test -f find/find.c -a -f debian/rules
 
94
endef
 
95
 
 
96
# Below here is fairly generic really
 
97
 
 
98
binary:         binary-indep binary-arch
 
99
 
 
100
source diff:
 
101
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
 
102
 
 
103
checkroot:
 
104
        $(checkdir)
 
105
        test root = "`whoami`"
 
106
 
 
107
.PHONY: binary binary-arch binary-indep clean checkroot