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

Last change on this file since 5884 was 5884, checked in by Ivan Raikov, 12 years ago

Created chicken-2.7 branch.

File size: 2.0 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=1
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/chicken" EGGDIR="/var/lib/chicken/$(BINARYVERSION)"
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        $(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/chicken" EGGDIR="$(CURDIR)/debian/tmp/var/lib/chicken/$(BINARYVERSION)"
47
48binary-common:
49        dh_testdir
50        dh_testroot
51        dh_movefiles
52        dh_installdocs
53        dh_installman
54        dh_installinfo chicken.info
55        dh_installchangelogs ChangeLog.20070807
56        dh_link
57ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
58        dh_strip
59endif   
60        dh_compress
61        dh_fixperms
62        dh_makeshlibs -V
63        dh_installdeb
64        dh_shlibdeps -l debian/libchicken0/usr/lib
65        dh_gencontrol
66        dh_md5sums
67        dh_builddeb
68
69binary-indep: build install
70
71binary-arch: build install
72        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
73
74binary-%: build install
75        make -f debian/rules binary-common DH_OPTIONS=-p$*
76
77binary: binary-indep binary-arch
78.PHONY: build clean binary-indep binary-arch binary install
Note: See TracBrowser for help on using the repository browser.