1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
#!/usr/bin/make -f
# $MirOS: contrib/hosted/tg/deb/makefs/debian/rules,v 1.4 2010/03/07 00:14:29 tg Exp $
#-
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
CC?= gcc
CFLAGS= -Wall -g
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
CPPFLAGS+= -include /usr/include/bsd/bsd.h
# should be in libbsd
CPPFLAGS+= -D"__IDSTRING(x,y)=static const char x[] __attribute__((used)) = y"
CPPFLAGS+= -D"__KERNEL_RCSID(x,y)=__IDSTRING(kernelrcsid_ \#\# x,y)"
CPPFLAGS+= -D"__dead=__attribute__((noreturn))"
CPPFLAGS+= -D"_DIAGASSERT(x)="
# is in libbsd, but not all versions: Debian #547399
ifeq ($(shell fgrep -c __RCSID /usr/include/bsd/cdefs.h),0)
CPPFLAGS+= -D"__RCSID(x)=__IDSTRING(rcsid,x)"
endif
CPPFLAGS+= -D"bswap16=__bswap_16"
CPPFLAGS+= -D"bswap32=__bswap_32"
CPPFLAGS+= -D"bswap64=__bswap_64"
CPPFLAGS+= -DHAVE_STRUCT_STATVFS_F_IOSIZE=0
CPPFLAGS+= -DHAVE_STRUCT_STAT_ST_MTIMENSEC=0
CPPFLAGS+= -DHAVE_STRUCT_STAT_ST_FLAGS=0
CPPFLAGS+= -DHAVE_STRUCT_STAT_ST_GEN=0
PMAKE_ENV:= LC_ALL=C
PMAKE_ENV+= CC='${CC}'
PMAKE_ENV+= CFLAGS='${CFLAGS}'
PMAKE_ENV+= CPPFLAGS='${CPPFLAGS}'
PMAKE_FLAGS:= BSDSRCDIR="$$_topdir/builddir"
PMAKE_FLAGS+= DEBIAN=Yes
# disable -Werror for package build (comment this out if developing)
PMAKE_FLAGS+= NOGCCERROR=Yes
build: builddir/.build_stamp
builddir/.build_stamp:
dh_testdir
-rm -rf builddir
mkdir builddir
cp -r src/* builddir/
ifeq (${DEB_BUILD_ARCH},hurd-i386)
mkdir -p builddir/usr.sbin/makefs/sys
:>builddir/usr.sbin/makefs/sys/mount.h
endif
_topdir=$$(pwd); cd builddir/usr.sbin/makefs && \
env ${PMAKE_ENV} pmake ${PMAKE_FLAGS} makefs
touch $@
clean:
dh_testdir
-rm -rf builddir
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
# dh_installexamples
dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
# dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install check
|