#!/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 # code not written for optimizations of GCC 4.2.1 and newer # export DEB_CFLAGS_MAINT_APPEND = -fno-caller-saves -fno-strict-overflow -fno-strict-aliasing 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) # Put aside convenience code copies during build DEB_UPSTREAM_CRUFT_MOVE = platforms/Cross/plugins/RePlugin/pcre.c \ platforms/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 %,platforms/Cross/plugins/JPEGReadWriter2Plugin/%,$(jpegfiles)) DEB_SRCDIR = platforms/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 = platforms/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 mv $(cdbs_curdestdir)/usr/lib/squeak/- $(cdbs_curdestdir)/usr/lib/squeak/$(DEB_VERSION_UPSTREAM) binary-strip/$(pkg):: $(if $(filter nostrip,$(DEB_BUILD_OPTIONS)),,strip -s --remove-section=.comment $(cdbs_curdestdir)/usr/lib/squeak/*/*)