~ubuntu-branches/ubuntu/saucy/ytnef/saucy

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Joshua Kwan
  • Date: 2005-05-09 20:31:56 UTC
  • Revision ID: james.westby@ubuntu.com-20050509203156-rjyjd3ee1jsqmm5e
Tags: 2.6-1
Initial release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# debian/rules for ytnef
 
3
# (C) 2003 Joshua Kwan <joshk@triplehelix.org>
 
4
 
 
5
# These are used for cross-compiling and for saving the configure script
 
6
# from having to guess our platform (since we know it already)
 
7
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
8
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
9
 
 
10
CFLAGS = -Wall -W -g
 
11
 
 
12
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
13
        CFLAGS += -O0
 
14
else
 
15
        CFLAGS += -O2
 
16
endif           
 
17
 
 
18
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
 
19
crossflags := --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
 
20
endif
 
21
 
 
22
include /usr/share/dpatch/dpatch.make
 
23
 
 
24
build: patch-stamp build-stamp
 
25
build-stamp:
 
26
        dh_testdir
 
27
        ./configure $(crossflags) --prefix=/usr --mandir=/usr/share/man
 
28
        $(MAKE)
 
29
        touch $@
 
30
 
 
31
clean: unpatch
 
32
        dh_testdir
 
33
        dh_testroot
 
34
        rm -f build-stamp
 
35
        -$(MAKE) distclean
 
36
        dh_clean 
 
37
 
 
38
install: build
 
39
        dh_testdir
 
40
        dh_testroot
 
41
        dh_clean -k 
 
42
        dh_installdirs
 
43
        $(MAKE) install DESTDIR=$(CURDIR)/debian/ytnef
 
44
# Useless
 
45
        rm -f $(CURDIR)/debian/ytnef/usr/bin/ytnefprint
 
46
# Better name
 
47
        mv $(CURDIR)/debian/ytnef/usr/bin/ytnefprocess.pl $(CURDIR)/debian/ytnef/usr/bin/ytnef-filter
 
48
 
 
49
binary-indep: 
 
50
# Ye olde no-op.
 
51
 
 
52
binary-arch: build install
 
53
        dh_testdir
 
54
        dh_testroot
 
55
        dh_installdocs README
 
56
        dh_installchangelogs ChangeLog
 
57
        dh_compress
 
58
        dh_link
 
59
        dh_strip
 
60
        dh_fixperms
 
61
        dh_installdeb
 
62
        dh_shlibdeps
 
63
        dh_gencontrol
 
64
        dh_md5sums
 
65
        dh_builddeb
 
66
 
 
67
binary: binary-indep binary-arch
 
68
.PHONY: build clean binary-indep binary-arch binary install