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

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

merged trunk

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