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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
#workaround for #862576
export DEB_CFLAGS_MAINT_APPEND = -O1
include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/class/cmake.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk
pkg = $(DEB_SOURCE_PACKAGE)
DEB_UPSTREAM_URL = http://www.squeakvm.org/unix/release
DEB_UPSTREAM_TARBALL_BASENAME = Squeak-$(DEB_UPSTREAM_TARBALL_VERSION)-src
DEB_UPSTREAM_TARBALL_MD5 = 8a5cb1d6899d55df56154fab8716e034
# Put aside convenience code copies during build
DEB_UPSTREAM_CRUFT_MOVE = Cross/plugins/RePlugin/pcre.c \
Cross/plugins/RePlugin/pcre.h
# all j*.[ch] except jmemd*.c and jinclude.h
jpegfiles = jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c
jpegfiles += jchuff.c jchuff.h jcinit.c jcmainct.c jcmarker.c jcmaster.c
jpegfiles += jcomapi.c jconfig.h jcparam.c jcphuff.c jcprepct.c
jpegfiles += jcsample.c jctrans.c jdapimin.c jdapistd.c jdatadst.c
jpegfiles += jdatasrc.c jdcoefct.c jdcolor.c jdct.h jddctmgr.c jdhuff.c
jpegfiles += jdhuff.h jdinput.c jdmainct.c jdmarker.c jdmaster.c
jpegfiles += jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c
jpegfiles += jerror.c jerror.h jfdctflt.c jfdctfst.c jfdctint.c
jpegfiles += jidctflt.c jidctfst.c jidctint.c jidctred.c jmemmgr.c
jpegfiles += jmemnobs.c jmemsys.h jmorecfg.h jpegint.h jpeglib.h
jpegfiles += jquant1.c jquant2.c jutils.c jversion.h
DEB_UPSTREAM_CRUFT_MOVE += \
$(patsubst %,Cross/plugins/JPEGReadWriter2Plugin/%,$(jpegfiles))
DEB_SRCDIR = unix
DEB_BUILDDIR = build-tree
DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(cdbs_curdestdir)
ifneq ($(DEB_HOST_ARCH),i386)
CONFIG_OPTS=--without-RomePlugin --without-Mpeg3Plugin
endif
# FFIPrims plugin uses assembler code unsupported on powerpcspe
ifeq ($(DEB_HOST_ARCH),powerpcspe)
CONFIG_OPTS=--without-SqueakFFIPrims
endif
vmmversion = $(basename $(DEB_UPSTREAM_TARBALL_VERSION))
svnversion = $(subst .,,$(suffix $(DEB_UPSTREAM_TARBALL_VERSION)))
guess := $(shell /usr/share/misc/config.guess)
sub := $(shell /usr/share/misc/config.sub $(guess))
DEB_CMAKE_EXTRA_FLAGS += -DVM_HOST=$(sub)
DEB_CMAKE_EXTRA_FLAGS += -DVM_VERSION=$(vmmversion)-$(svnversion)
DEB_CMAKE_EXTRA_FLAGS += -DPLATFORM_SOURCE_VERSION=$(svnversion)
DEB_CMAKE_EXTRA_FLAGS += -DOPT--prefix=$(DEB_CMAKE_INSTALL_PREFIX)
CONFIG_OPTS += --with-npsqueak
DEB_CMAKE_EXTRA_FLAGS += $(patsubst %,-DOPT%=1,$(CONFIG_OPTS))
# Upstream README contains no parts relevant for Debian usage
DEB_INSTALL_DOCS_ALL =
DEB_INSTALL_CHANGELOGS_ALL = unix/ChangeLog
DEB_INSTALL_MANPAGES_$(pkg) = debian/squeak.1
install/$(pkg)::
for y in debian/po/*.po; do \
i=`basename $$y .po`; \
mkdir -p $(cdbs_curdestdir)/usr/share/locale/$$i/LC_MESSAGES/; \
msgfmt $$y -o $(cdbs_curdestdir)/usr/share/locale/$$i/LC_MESSAGES/squeak.mo --statistics ; \
done
binary-post-install/$(pkg)::
rm -f $(cdbs_curdestdir)/usr/bin/squeak.sh
binary-strip/$(pkg)::
$(if $(filter nostrip,$(DEB_BUILD_OPTIONS)),,strip -s --remove-section=.comment $(cdbs_curdestdir)/usr/lib/squeak/*/*)
|