source: project/chicken/branches/hygienic/debian/rules @ 10952

Last change on this file since 10952 was 10952, checked in by felix winkelmann, 13 years ago

merged changed from trunk rev. 10622:10950 (untested)

File size: 2.5 KB
Line 
1#!/usr/bin/make -f
2BUILD_ARCH = $(shell dpkg --print-installation-architecture)
3
4CFLAGS= -g
5ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
6     CFLAGS += -O0
7        else
8     CFLAGS += -O2 -fno-strict-aliasing
9endif
10
11version=3.2
12
13MAKE:=$(MAKE) PLATFORM=linux
14PREFIX=/usr
15BINARYVERSION=3
16
17build: build-stamp
18build-stamp:
19        dh_testdir
20#       CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
21        $(MAKE) \
22            MAKEINFO_PROGRAM_OPTIONS="" \
23            CFLAGS="$(CFLAGS)" \
24            PREFIX="$(PREFIX)" \
25            MANDIR="$(PREFIX)/share/man" \
26            INFODIR="$(PREFIX)/share/info" \
27            SHAREDIR="$(PREFIX)/share" \
28            EGGDIR="/var/lib/chicken/$(BINARYVERSION)" \
29            MAKEINFO_PROGRAM_OPTIONS="" \
30            HOSTNAME=debian
31        touch build-stamp
32
33clean:
34        dh_testdir
35        dh_testroot
36        rm -f build-stamp
37        $(MAKE) clean
38        $(MAKE) distclean
39        rm -f c_defaults.h
40        rm -f chicken_defaults.h
41        dh_clean
42
43install: build
44        dh_testdir
45        dh_testroot
46        dh_clean -k
47        dh_installdirs
48# The directories here have to be prefixed by $(CURDIR)/debian/tmp
49# because that is the location where the binary package files are
50# placed by dpkg-buildpackage. If absolute files are specified,
51# i.e. /var/lib/chicken, then those files will be installed on the
52# build system, but will not end up in the package.
53        $(MAKE) \
54            install \
55            USE_HOST_PCRE=1 \
56            PREFIX="$(CURDIR)/debian/tmp/usr" \
57            MANDIR="$(CURDIR)/debian/tmp/usr/share/man" \
58            INFODIR="$(CURDIR)/debian/tmp/usr/share/info" \
59            SHAREDIR="$(CURDIR)/debian/tmp/usr/share" \
60            EGGDIR="$(CURDIR)/debian/tmp/var/lib/chicken/$(BINARYVERSION)" \
61            MAKEINFO_PROGRAM_OPTIONS="" \
62            HOSTNAME=debian
63
64binary-common:
65        dh_testdir
66        dh_testroot
67        dh_installdocs
68        dh_installman
69# The asterisk in chicken.info* is necessary, because Debian makeinfo
70# is very different from the standard makeinfo, and it is incredibly
71# difficult to convince it to produce standalone Texinfo files.
72        dh_installinfo chicken.info*
73        dh_installchangelogs ChangeLog.*
74        dh_install --sourcedir=debian/tmp
75        dh_link
76ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
77        dh_strip
78endif   
79        dh_compress
80        dh_fixperms
81        dh_makeshlibs -V
82        dh_installdeb
83        dh_shlibdeps -l debian/libchicken0/usr/lib
84        dh_gencontrol
85        dh_md5sums
86        dh_builddeb
87
88binary-indep: build install
89
90binary-arch: build install
91        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
92
93binary-%: build install
94        make -f debian/rules binary-common DH_OPTIONS=-p$*
95
96binary: binary-indep binary-arch
97.PHONY: build clean binary-indep binary-arch binary install
Note: See TracBrowser for help on using the repository browser.