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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatibility version to use.
export DH_COMPAT=3
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -f 1 -d '-')
VERSION_NEXT := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -f 1 -d '-' |awk -F . '{ $$3=$$3+1; print $$1"."$$2"."$$3 }')
VERSION_EXACT := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
OTHER_PARAMS := $(shell /bin/sh ./debian/get_other_params.sh $(DEB_BUILD_GNU_TYPE) )
configure-stamp: configure
dh_testdir
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
--enable-real-life-brokenness $(OTHER_PARAMS)
# --enable-debugging-features
sed < libtool > libtool-2 \
's/^hardcode_libdir_flag_spec.*$$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
mv -f libtool-2 libtool
chmod 755 libtool
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
$(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
-$(MAKE) -C src/libffi/ distclean
-$(MAKE) -C src/libpopt/ distclean
-$(MAKE) distclean
-rm -f config.log src/libffi/config.log src/libpopt/config.log
find $(CURDIR) -name Makefile |xargs rm -f
find $(CURDIR) -type d -name .deps |xargs rm -rf
rm -f config.status libtool src/include/config.h src/include/stamp-h1
rm -f build-stamp binary-common configure-stamp
rm -f src/libffi/include/ffitarget.h
dh_clean
install: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
-mkdir -p $(CURDIR)/debian/tmp/usr/lib/sablevm/bin
ln -sf ../common-licenses/LGPL-2.1 \
$(CURDIR)/debian/tmp/usr/share/sablevm/COPYING.LIB
-rm $(CURDIR)/debian/tmp/usr/share/sablevm/LGPL-2.1
ln -sf ../common-licenses/LGPL-2.1 \
$(CURDIR)/debian/tmp/usr/share/sablevm/LGPL-2.1
install -p -m 0644 debian/sablevm.lintian \
$(CURDIR)/debian/sablevm/usr/share/lintian/overrides/sablevm
# install jikes-sablevm wrapper
cp -f $(CURDIR)/debian/jikes-sablevm.sh \
$(CURDIR)/debian/jikes-sablevm/usr/bin/jikes-sablevm
chmod +x $(CURDIR)/debian/jikes-sablevm/usr/bin/jikes-sablevm
# move /usr/include/jni*.h to /usr/include/sablevm
-mkdir -p $(CURDIR)/debian/tmp/usr/include/sablevm
mv -f $(CURDIR)/debian/tmp/usr/include/jni*.h \
$(CURDIR)/debian/tmp/usr/include/sablevm
rm -rf $(CURDIR)/debian/tmp/usr/lib/sablevm/include
ln -s ../../include/sablevm $(CURDIR)/debian/tmp/usr/lib/sablevm/include
binary-common:
dh_testdir
dh_testroot
dh_movefiles
# dh_installdebconf
dh_installdocs
# dh_installexamples
# dh_installmenu
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installman
# dh_installinfo
# dh_undocumented
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
dh_makeshlibs
dh_installdeb
# dh_perl
dh_shlibdeps
echo "sablevm:VerCurrent=$(VERSION)" >> debian/libsablevm1.substvars
echo "sablevm:VerExact=$(VERSION_EXACT)" >> debian/libsablevm1.substvars
echo "sablevm:VerNext=$(VERSION_NEXT)" >> debian/libsablevm1.substvars
echo "sablevm:VerCurrent=$(VERSION)" >> debian/sablevm.substvars
echo "sablevm:VerExact=$(VERSION_EXACT)" >> debian/sablevm.substvars
echo "sablevm:VerNext=$(VERSION_NEXT)" >> debian/sablevm.substvars
dh_gencontrol
dh_md5sums
touch binary-common
# Build architecture-independent files here.
binary-indep: build install binary-common
# We have nothing to do by default.
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install binary-common
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|