source: project/content-type/trunk/debian/rules @ 8101

Last change on this file since 8101 was 8101, checked in by Ivan Raikov, 13 years ago

Added Debian subdir

File size: 1.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
13BINARY_VERSION=$(shell basename `chicken-setup -R`)
14
15CHICKEN_EGG=content-type
16CHICKEN_EGG_DEPS=format-modular
17
18build: build-stamp
19build-stamp:
20        dh_testdir
21        mkdir -p $(CURDIR)/debian/tmp
22        @for DEP in $(CHICKEN_EGG_DEPS); do \
23          if test ! -d $(CURDIR)/$$DEP; then echo directory for dependency $$DEP does not exist in $(CURDIR); exit 1; fi \
24        done
25        chicken-setup -dont-ask -repository $(CURDIR)/debian/tmp -local $(CURDIR) $(CHICKEN_EGG_DEPS) $(CHICKEN_EGG)
26        touch build-stamp
27
28clean:
29        dh_testdir
30        dh_testroot
31        rm -f build-stamp
32        rm -rf debian/tmp
33        rm -rf *.egg *.egg.dir
34        dh_clean
35
36install: build
37        dh_testdir
38        dh_testroot
39        dh_installdirs
40
41binary-common:
42        dh_testdir
43        dh_testroot
44        dh_install debian/tmp/$(CHICKEN_EGG){*.so,*.scm,*.setup-info} var/lib/chicken/$(BINARY_VERSION)
45        dh_installdocs debian/tmp/{$(CHICKEN_EGG)*.html,index.html} 
46#       dh_installman
47#       dh_installchangelogs ChangeLog
48#       dh_link
49ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
50        dh_strip
51endif   
52        dh_compress
53        dh_fixperms
54        dh_makeshlibs -V
55        dh_installdeb
56        dh_shlibdeps
57        dh_gencontrol
58        dh_md5sums
59        dh_builddeb
60
61binary-indep: build install
62
63binary-arch: build install
64        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
65
66binary-%: build install
67        make -f debian/rules binary-common DH_OPTIONS=-p$*
68
69binary: binary-indep binary-arch
70.PHONY: build clean binary-indep binary-arch binary install
Note: See TracBrowser for help on using the repository browser.