~ubuntu-branches/ubuntu/breezy/unzip/breezy

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-06-06 17:57:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040606175746-g6zntm6iveuxsaby
Tags: 5.51-2
Added unshrinking support (Closes: #252563).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
 
 
3
package = unzip
 
4
docdir = debian/tmp/usr/share/doc/$(package)
 
5
history = History.551
 
6
 
 
7
CC = gcc
 
8
CFLAGS = -g -Wall
 
9
DEFINES = -DACORN_FTYPE_NFS -DUSE_UNSHRINK
 
10
INSTALL_PROGRAM = install
 
11
 
 
12
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
13
  CFLAGS += -O2
 
14
endif
 
15
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
16
  INSTALL_PROGRAM += -s
 
17
endif
 
18
 
 
19
build:
 
20
        $(checkdir)
 
21
        $(MAKE) -f unix/Makefile LF2="" \
 
22
                CC="$(CC)" CF="$(CFLAGS) -I. $(DEFINES)" unzips
 
23
        touch build
 
24
 
 
25
clean:
 
26
        $(checkdir)
 
27
        rm -f build
 
28
        -$(MAKE) -f unix/Makefile clean
 
29
        rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars
 
30
 
 
31
binary-indep: checkroot build
 
32
        $(checkdir)
 
33
 
 
34
binary-arch: checkroot build
 
35
        $(checkdir)
 
36
        rm -rf debian/tmp
 
37
        install -d debian/tmp/DEBIAN $(docdir)
 
38
        cd debian/tmp && install -d usr/bin usr/man/man1
 
39
        $(MAKE) -f unix/Makefile install prefix=`pwd`/debian/tmp/usr \
 
40
                INSTALL_PROGRAM="$(INSTALL_PROGRAM)"
 
41
        cat debian/copyright.in LICENSE > $(docdir)/copyright
 
42
        cp debian/changelog $(docdir)/changelog.Debian
 
43
        cp -p History.* BUGS ToDo $(docdir)
 
44
        cd $(docdir) && gzip -9 changelog.Debian History.*
 
45
        ln -s $(history).gz $(docdir)/changelog.gz
 
46
        gzip -r9 debian/tmp/usr/man
 
47
        cd debian/tmp && mv usr/man usr/share
 
48
        dpkg-shlibdeps unzip
 
49
        dpkg-gencontrol -isp
 
50
        cd debian/tmp && \
 
51
                md5sum `find * -type f ! -regex "DEBIAN/.*"` > DEBIAN/md5sums
 
52
        chown -R root:root debian/tmp
 
53
        chmod -R go=rX debian/tmp
 
54
        dpkg --build debian/tmp ..
 
55
 
 
56
define checkdir
 
57
        test -f $(package).c -a -f debian/rules
 
58
endef
 
59
 
 
60
binary: binary-indep binary-arch
 
61
 
 
62
checkroot:
 
63
        $(checkdir)
 
64
        test root = "`whoami`"
 
65
 
 
66
.PHONY: binary binary-arch binary-indep clean checkroot