2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Uncomment this to turn on verbose mode.
10 ifeq ($(distribution),SLP)
11 export DH_OPTIONS = -Nlsb-core -Nlsb-graphics -Nlsb-cxx -Nlsb-desktop -Nlsb-qt4 -Nlsb-languages -Nlsb-multimedia -Nlsb-printing -Nlsb -Nlsb-release -Nlsb
14 # These are used for cross-compiling and for saving the configure script
15 # from having to guess our platform (since we know it already)
16 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
17 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
18 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
20 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
23 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
27 # Map Debian architectures to LSB architectures
28 lsbarch=${DEB_HOST_ARCH}
29 ifeq (${lsbarch}, i386)
32 ifeq (${lsbarch}, powerpc)
37 ifeq (${lsbarch}, hurd-i386)
38 LIBC=libc0.3 (>> 2.3.5)
40 ifeq (${lsbarch}, kfreebsd-amd64)
41 LIBC=libc0.1 (>> 2.3.5)
43 ifeq (${lsbarch}, kfreebsd-i386)
44 LIBC=libc0.1 (>> 2.3.5)
46 ifeq (${lsbarch}, ia64)
47 LIBC=libc6.1 (>> 2.3.5)
49 ifeq (${lsbarch}, alpha)
50 LIBC=libc6.1 (>> 2.3.5)
53 configure: configure-stamp
56 # Add here commands to configure the package.
62 build-stamp: configure-stamp
65 # Add here commands to compile the package.
67 #/usr/bin/docbook-to-man debian/lsb.sgml > lsb.1
74 rm -f build-stamp configure-stamp *.py[co] debian/lsb*substvars
76 # Add here commands to clean up after the build process.
86 ifneq ($(distribution),SLP)
87 # Add here commands to install the package into debian/lsb.
88 #$(MAKE) install DESTDIR=$(CURDIR)/debian/lsb
89 cp -p initdutils.py install_initd remove_initd lsbinstall debian/lsb-core/usr/lib/lsb
90 cp -p init-functions debian/lsb-base/lib/lsb
91 cp -p lsb_release debian/lsb-release/usr/bin
92 cp -p lsb_release.py debian/lsb-release/usr/share/python-support/lsb-release
93 cp -p debian/lsb-release.bugscript debian/lsb-release/usr/share/bug/lsb-release
95 cp -p init-functions debian/lsb-base/lib/lsb
98 # Build architecture-independent files here.
99 binary-indep: build install
104 # dh_installlogrotate
113 dh_installchangelogs -i
120 ifneq ($(distribution),SLP)
130 # Build architecture-dependent files here.
131 binary-arch: build install
136 dh_installexamples -a test/init-skeleton
138 # dh_installlogrotate
144 dh_installman -a lsb.8
147 dh_installchangelogs -a
148 @echo >> debian/lsb-core.substvars "glibc=${LIBC}"
149 # @[ ${DEB_HOST_GNU_TYPE} != 'arm-linux-gnueabi' ] && echo >> debian/lsb-cxx.substvars "depends=libstdc++5" || true
150 @echo >> debian/lsb-core.substvars "provides=lsb-core-${lsbarch}"
151 @echo >> debian/lsb-cxx.substvars "provides=lsb-cxx-${lsbarch}"
152 @echo >> debian/lsb-graphics.substvars "provides=lsb-graphics-${lsbarch}"
153 @echo >> debian/lsb-desktop.substvars "provides=lsb-qt4-${lsbarch}, lsb-desktop-${lsbarch}"
154 @echo >> debian/lsb-qt4.substvars "provides=lsb-qt4-${lsbarch}"
155 @echo >> debian/lsb-multimedia.substvars "provides=lsb-multimedia-${lsbarch}"
156 @echo >> debian/lsb-languages.substvars "provides=lsb-languages-${lsbarch}"
157 @echo >> debian/lsb-printing.substvars "provides=lsb-printing-${lsbarch}"
158 @[ ${DEB_HOST_ARCH} = 'amd64' ] && echo >> debian/lsb-core.substvars "depends=libc6-i386, lib32z1" || true
159 @[ ${DEB_HOST_ARCH} = 'kfreebsd-amd64' ] && echo >> debian/lsb-core.substvars "depends=libc0.1-i386, lib32z1" || true
173 ifneq ($(distribution),SLP)
174 binary: binary-indep binary-arch
181 .PHONY: build clean binary-indep binary-arch binary install configure