source: branches/2.2.0/mindi-busybox/distributions/debian/rules @ 986

Last change on this file since 986 was 986, checked in by bruno, 13 years ago

Still on debian mindi-busybox

  • Property svn:executable set to *
File size: 2.9 KB
Line 
1#!/usr/bin/make -f
2# Sample debian/rules that uses debhelper.
3# GNU copyright 1997 to 1999 by Joey Hess.
4
5# Uncomment this to turn on verbose mode.
6#export DH_VERBOSE=1
7
8# Define package name for a one-stop change.
9PACKAGE_NAME = mindi-busybox
10
11# These are used for cross-compiling and for saving the configure script
12# from having to guess our platform (since we know it already)
13DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15
16CFLAGS = -Wall
17
18ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19    CFLAGS += -O0
20else
21    CFLAGS += -O2
22endif
23ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
24    INSTALL_PROGRAM += -s
25endif
26
27# Build both architecture dependent and independent
28build: build-arch build-indep
29
30# Build architecture dependent
31build-arch: build-arch-stamp
32
33build-arch-stamp:  Makefile
34    dh_testdir
35
36    # Compile the package.
37    $(MAKE) oldconfig
38    $(MAKE) busybox
39
40    touch build-stamp
41
42# Build architecture independent
43build-indep: build-indep-stamp
44
45build-indep-stamp:  Makefile
46    # Nothing to do, the only indep item is the manual which is available as html in original source
47    touch build-indep-stamp
48
49clean:
50    dh_testdir
51    dh_testroot
52    rm -f build-arch-stamp build-indep-stamp
53    # Clean temporary document directory
54    rm -rf debian/doc-temp
55    # Clean up.
56    -$(MAKE) distclean
57    rm -f config.log
58ifneq "$(wildcard /usr/share/misc/config.sub)" ""
59    cp -f /usr/share/misc/config.sub config.sub
60endif
61ifneq "$(wildcard /usr/share/misc/config.guess)" ""
62    cp -f /usr/share/misc/config.guess config.guess
63endif
64
65    dh_clean
66
67# Install architecture dependent and independent
68install: install-arch install-indep
69
70# Install architecture dependent
71install-arch: build-arch
72    dh_testdir
73    dh_testroot
74    dh_clean -k -s
75    dh_installdirs -s
76
77    # Install the package files into build directory:
78    # - start with upstream make install
79    $(MAKE) install PREFIX=$(CURDIR)/debian/$(PACKAGE_NAME)/usr/lib/mindi/rootfs
80    # - copy doc
81    mkdir -p debian/doc-temp
82    cp -a ChangeLog INSTALL LICENSE AUTHORS README TODO changelog svn.log debian/doc-temp/html
83
84    dh_install -s
85
86# Install architecture independent
87install-indep: build-indep
88    dh_testdir
89    dh_testroot
90    dh_clean -k -i
91    dh_installdirs -i
92    dh_install -i
93
94# Must not depend on anything. This is to be called by
95# binary-arch/binary-indep
96# in another 'make' thread.
97binary-common:
98    dh_testdir
99    dh_testroot
100    dh_installchangelogs ChangeLog
101    dh_installdocs
102    dh_installman
103    dh_link
104    dh_strip
105    dh_compress
106    dh_fixperms
107    dh_installdeb
108    dh_shlibdeps
109    dh_gencontrol
110    dh_md5sums
111    dh_builddeb
112
113# Build architecture independant packages using the common target.
114binary-indep: build-indep install-indep
115    $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
116
117# Build architecture dependant packages using the common target.
118binary-arch: build-arch install-arch
119    $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
120
121# Build architecture depdendent and independent packages
122binary: binary-arch binary-indep
123.PHONY: clean binary
Note: See TracBrowser for help on using the repository browser.