~ubuntu-branches/ubuntu/hoary/lingoteach-lesson/hoary

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Martin A. Godisch
  • Date: 2004-02-19 21:37:02 UTC
  • Revision ID: james.westby@ubuntu.com-20040219213702-u2w2e3xseintjkp3
Tags: 0.4.1-1
Initial release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
 
 
3
testdir  = test -f data/language.dtd -a -f debian/rules
 
4
testroot = test x`whoami` = xroot
 
5
 
 
6
# FOR AUTOCONF 2.52 AND NEWER ONLY
 
7
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
 
8
        CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
 
9
else
 
10
        CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 
11
endif
 
12
 
 
13
CFLAGS = -Wall -g
 
14
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
15
        CFLAGS += -O0
 
16
else
 
17
        CFLAGS += -O2
 
18
endif
 
19
export CFLAGS
 
20
 
 
21
clean:
 
22
        $(testdir)
 
23
        rm -f build
 
24
        -$(MAKE) distclean
 
25
        rm -f debian/files debian/substvars
 
26
        rm -f config.log config.status Makefile
 
27
        rm -rf debian/lingoteach-lesson
 
28
 
 
29
build:
 
30
        $(testdir)
 
31
        ./configure $(CONFFLAGS) --prefix=/usr
 
32
        $(MAKE)
 
33
        touch $@
 
34
 
 
35
binary: binary-indep
 
36
 
 
37
binary-arch:
 
38
 
 
39
binary-indep: build
 
40
        $(testdir)
 
41
        $(testroot)
 
42
        rm -rf debian/lingoteach-lesson
 
43
 
 
44
        $(MAKE) install DESTDIR=${CURDIR}/debian/lingoteach-lesson
 
45
        -rm -f debian/lingoteach-lesson/usr/share/lingoteach/*
 
46
 
 
47
        install -D -m 0644 ChangeLog debian/lingoteach-lesson/usr/share/doc/lingoteach-lesson/changelog
 
48
        install -D -m 0644 debian/changelog debian/lingoteach-lesson/usr/share/doc/lingoteach-lesson/changelog.Debian
 
49
        install    -m 0644 AUTHORS HACKING NEWS debian/copyright debian/lingoteach-lesson/usr/share/doc/lingoteach-lesson
 
50
 
 
51
        find debian/lingoteach-lesson/usr/share/doc \
 
52
                -type f \( -size +8 -o -name 'changelog*' \) ! -path '*/html/*' -print0 | xargs -0 gzip -9n
 
53
 
 
54
        install -d debian/lingoteach-lesson/DEBIAN
 
55
        cd debian/lingoteach-lesson && find usr -type f -print0 | xargs -0 md5sum > DEBIAN/md5sums
 
56
 
 
57
        dpkg-gencontrol -isp -plingoteach-lesson -Pdebian/lingoteach-lesson
 
58
        chmod -R u+w,go=u-w debian/lingoteach-lesson
 
59
        dpkg --build debian/lingoteach-lesson ..
 
60
 
 
61
.PHONY: clean binary binary-arch binary-indep