~ubuntu-branches/ubuntu/hardy/foomatic-filters/hardy-updates

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lawrence
  • Date: 2005-04-03 23:03:31 UTC
  • Revision ID: james.westby@ubuntu.com-20050403230331-m0tgjh2l8stpr5vq
Tags: upstream-3.0.2-20050403
ImportĀ upstreamĀ versionĀ 3.0.2-20050403

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# Sample debian/rules that uses debhelper.
 
3
# GNU copyright 1997 to 1999 by Joey Hess.
 
4
 
 
5
# Uncomment this to turn on verbose mode.
 
6
#export DH_VERBOSE=1
 
7
 
 
8
 
 
9
# These are used for cross-compiling and for saving the configure script
 
10
# from having to guess our platform (since we know it already)
 
11
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
12
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
13
 
 
14
 
 
15
CFLAGS = -Wall -g
 
16
 
 
17
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
18
        CFLAGS += -O0
 
19
else
 
20
        CFLAGS += -O2
 
21
endif
 
22
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
23
        INSTALL_PROGRAM += -s
 
24
endif
 
25
 
 
26
config.status: configure
 
27
        dh_testdir
 
28
        # Add here commands to configure the package.
 
29
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
 
30
        cp -f /usr/share/misc/config.sub config.sub
 
31
endif
 
32
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
 
33
        cp -f /usr/share/misc/config.guess config.guess
 
34
endif
 
35
        ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc --disable-file-converter-check
 
36
 
 
37
 
 
38
build: build-stamp
 
39
 
 
40
build-stamp:  config.status
 
41
        dh_testdir
 
42
 
 
43
        # Add here commands to compile the package.
 
44
        $(MAKE)
 
45
 
 
46
        touch build-stamp
 
47
 
 
48
clean:
 
49
        dh_testdir
 
50
        dh_testroot
 
51
        rm -f build-stamp config.sub config.guess tests/Makefile
 
52
 
 
53
        # Add here commands to clean up after the build process.
 
54
        -$(MAKE) distclean
 
55
        chmod -x filter.conf
 
56
 
 
57
        dh_clean
 
58
 
 
59
install: build
 
60
        dh_testdir
 
61
        dh_testroot
 
62
        dh_clean -k
 
63
        dh_installdirs
 
64
 
 
65
        # Add here commands to install the package into debian/foomatic-filters.
 
66
        $(MAKE) install DESTDIR=$(CURDIR)/debian/foomatic-filters
 
67
        rm -f $(CURDIR)/debian/foomatic-filters/etc/foomatic/filter.conf*
 
68
        cp -p debian/parseconfig.pl $(CURDIR)/debian/foomatic-filters/usr/share/foomatic
 
69
        chmod +x $(CURDIR)/debian/foomatic-filters/usr/share/foomatic/parseconfig.pl
 
70
 
 
71
# Build architecture-independent files here.
 
72
binary-indep: build install
 
73
# We have nothing to do by default.
 
74
 
 
75
# Build architecture-dependent files here.
 
76
binary-arch: build install
 
77
        dh_testdir
 
78
        dh_testroot
 
79
        dh_installchangelogs ChangeLog
 
80
        dh_installdocs
 
81
        dh_installexamples filter.conf
 
82
#       dh_install
 
83
#       dh_installmenu
 
84
        dh_installdebconf
 
85
#       dh_installlogrotate
 
86
#       dh_installemacsen
 
87
#       dh_installpam
 
88
#       dh_installmime
 
89
#       dh_installinit
 
90
#       dh_installcron
 
91
#       dh_installinfo
 
92
        dh_installman
 
93
        (cd $(CURDIR)/debian/foomatic-filters/usr/lib/ppr/lib; ln -s foomatic-rip ppromatic)
 
94
        (cd $(CURDIR)/debian/foomatic-filters/usr/lib/ppr/interfaces; ln -s foomatic-rip ppromatic)
 
95
        (cd $(CURDIR)/debian/foomatic-filters/usr/lib/cups/filter; ln -s foomatic-rip cupsomatic)
 
96
        (cd $(CURDIR)/debian/foomatic-filters/usr/sbin; ln -s ../bin/foomatic-rip lpdomatic)
 
97
        (cd $(CURDIR)/debian/foomatic-filters/usr/bin; ln -s foomatic-rip directomatic)
 
98
        (cd $(CURDIR)/debian/foomatic-filters/usr/share/man/man8; ln -s ../man1/foomatic-rip.1.gz lpdomatic.8.gz; cd ../man1; ln -s foomatic-rip.1.gz directomatic.1.gz)
 
99
        dh_link
 
100
        dh_strip
 
101
        dh_compress
 
102
        dh_fixperms
 
103
        dh_perl
 
104
#       dh_python
 
105
#       dh_makeshlibs
 
106
        dh_installdeb
 
107
        dh_shlibdeps
 
108
        dh_gencontrol
 
109
        dh_md5sums
 
110
        dh_builddeb
 
111
 
 
112
binary: binary-indep binary-arch
 
113
.PHONY: build clean binary-indep binary-arch binary install