root/trunk/debian/rules @ 655

Revision 655, 3.5 KB (checked in by PavelVinogradov, 13 months ago)

Fix Debian build

  • Property svn:executable set to *
Line 
1#!/usr/bin/make -f
2# -*- makefile -*-
3# Sample debian/rules that uses debhelper.
4#
5# This file was originally written by Joey Hess and Craig Small.
6# As a special exception, when this file is copied by dh-make into a
7# dh-make output file, you may use that output file without restriction.
8# This special exception was added by Craig Small in version 0.37 of dh-make.
9#
10# Modified to make a template file for a multi-binary package with separated
11# build-arch and build-indep targets  by Bill Allombert 2001
12
13# Uncomment this to turn on verbose mode.
14export DH_VERBOSE=1
15
16# quilt support
17include /usr/share/quilt/quilt.make
18
19# This has to be exported to make some magic below work.
20export DH_OPTIONS
21
22# These are used for cross-compiling and for saving the configure script
23# from having to guess our platform (since we know it already)
24DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
25DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
26
27
28CFLAGS = -Wall -g
29
30ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31        CFLAGS += -O0
32else
33        CFLAGS += -O2
34endif
35
36config.status: patch
37        dh_testdir
38        make -f Makefile.cvs
39        # Add here commands to configure the package.
40        ./configure --with-pq-includes=/usr/include/postgresql --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
41
42
43#Architecture
44build: build-arch build-indep
45
46build-arch: build-arch-stamp
47build-arch-stamp:  config.status
48
49        # Add here commands to compile the arch part of the package.
50        $(MAKE) 
51        touch $@
52
53build-indep: build-indep-stamp
54build-indep-stamp:  config.status
55
56        # Add here commands to compile the indep part of the package.
57        #$(MAKE) doc
58        touch $@
59
60clean: unpatch
61        dh_testdir
62        dh_testroot
63        rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
64
65        # Add here commands to clean up after the build process.
66        $(MAKE) distclean
67ifneq "$(wildcard /usr/share/misc/config.sub)" ""
68        cp -f /usr/share/misc/config.sub config.sub
69endif
70ifneq "$(wildcard /usr/share/misc/config.guess)" ""
71        cp -f /usr/share/misc/config.guess config.guess
72endif
73        dh_clean
74
75install: install-indep install-arch
76install-indep:
77        dh_testdir
78        dh_testroot
79        dh_clean -k -i
80        dh_installdirs -i
81
82        # Add here commands to install the indep part of the package into
83        # debian/<package>-doc.
84        #INSTALLDOC#
85
86        dh_install -i
87
88install-arch:
89        dh_testdir
90        dh_testroot
91        dh_clean -k -s
92        dh_installdirs -s
93
94        # Add here commands to install the arch part of the package into
95        # debian/tmp.
96        #$(MAKE) prefix=$(CURDIR)/debian/sams2 install
97
98        dh_install -s
99        dh_movefiles --sourcedir=debian/sams2
100# Must not depend on anything. This is to be called by
101# binary-arch/binary-indep
102# in another 'make' thread.
103binary-common:
104        dh_testdir
105        dh_testroot
106        dh_installchangelogs ChangeLog
107        dh_installdocs
108        dh_installexamples
109#       dh_installmenu
110#       dh_installdebconf       
111#       dh_installlogrotate     
112#       dh_installemacsen
113#       dh_installpam
114#       dh_installmime
115        dh_installinit
116#       dh_installcron
117        dh_installman
118        dh_link
119        dh_strip
120        dh_compress
121        dh_fixperms
122        dh_makeshlibs
123        dh_installdeb
124        dh_shlibdeps
125        dh_gencontrol
126        dh_md5sums
127        dh_builddeb
128# Build architecture independant packages using the common target.
129binary-indep: build-indep install-indep
130        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
131
132# Build architecture dependant packages using the common target.
133binary-arch: build-arch install-arch
134        $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
135
136binary: binary-arch binary-indep
137.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
Note: See TracBrowser for help on using the browser.