source: project/chicken/trunk/debian/rules @ 12083

Last change on this file since 12083 was 11150, checked in by felix winkelmann, 12 years ago

carried over changes (and renames) of debian files

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