root/trunk/debian/rules @ 717

Revision 717, 3.4 KB (checked in by PavelVinogradov, 9 months ago)

Fix prefix in Debian package. Closes [400]

  • 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= --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        [ ! -f Makefile ] || $(MAKE) distclean
67        dh_clean build-stamp
68
69install: install-indep install-arch
70install-indep:
71        dh_testdir
72        dh_testroot
73        dh_clean -k -i
74        dh_installdirs -i
75
76        # Add here commands to install the indep part of the package into
77        # debian/<package>-doc.
78        #INSTALLDOC#
79
80        dh_install -i
81
82install-arch:
83        dh_testdir
84        dh_testroot
85        dh_clean -k -s
86        dh_installdirs -s
87
88        # Add here commands to install the arch part of the package into
89        # debian/tmp.
90        #$(MAKE) prefix=$(CURDIR)/debian/sams2 install
91
92        dh_install -s
93        dh_movefiles --sourcedir=debian/sams2
94# Must not depend on anything. This is to be called by
95# binary-arch/binary-indep
96# in another 'make' thread.
97binary-common:
98        dh_testdir
99        dh_testroot
100        dh_installchangelogs ChangeLog
101        dh_installdocs
102        dh_installexamples
103#       dh_installmenu
104#       dh_installdebconf       
105#       dh_installlogrotate     
106#       dh_installemacsen
107#       dh_installpam
108#       dh_installmime
109        dh_installinit
110#       dh_installcron
111        dh_installman
112        dh_link
113        dh_strip
114        dh_compress
115        dh_fixperms
116        dh_makeshlibs
117        dh_installdeb
118        dh_shlibdeps
119        dh_gencontrol
120        dh_md5sums
121        dh_builddeb
122# Build architecture independant packages using the common target.
123binary-indep: build-indep install-indep
124        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
125
126# Build architecture dependant packages using the common target.
127binary-arch: build-arch install-arch
128        $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
129
130binary: binary-arch binary-indep
131.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
Note: See TracBrowser for help on using the browser.