source: project/chicken/branches/release/debian/rules @ 7931

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

merged from prerelease branch rev. 7930 - release version 3.0.0; fixed wrong version numbers in some files

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