File: rules

package info (click to toggle)
squeak-vm 1:4.10.2.2614-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 13,360 kB
  • sloc: ansic: 75,094; cs: 11,191; objc: 5,494; sh: 3,184; asm: 1,533; cpp: 449; pascal: 372; makefile: 363; awk: 103
file content (80 lines) | stat: -rwxr-xr-x 3,200 bytes parent folder | download
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
#!/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
# <https://smallissimo.blogspot.com/2013/02/compiling-squeak-cog-virtual-machine-on.html>
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 = 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
	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/*/*)