Name luajit
Description Just in time compiler for Lua programming language version 5.1
Version 2.1.0+git20231223.c525bcb+dfsg-1
Package Base
Homepage https://luajit.org
Maintainers ['Debian Lua Team <pkg-lua-devel@lists.alioth.debian.org>', 'Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>']
Contributors ['Mo Zhou <lumin@debian.org>', 'Ondřej Surý <ondrej@debian.org>']
Distro-repo https://git.launchpad.net/ubuntu/+source/luajit/tree/?h=ubuntu/noble
Sources ['https://git.launchpad.net/ubuntu/+source/luajit/plain/debian/patches/../?h=ubuntu/noble', 'https://git.launchpad.net/ubuntu/+source/luajit/plain/debian/patches/0001-consider-Hurd-as-a-POSIX-system.patch?h=ubuntu/noble', 'https://git.launchpad.net/ubuntu/+source/luajit/plain/debian/patches/0002-Enable-debugging-symbols-in-the-build.patch?h=ubuntu/noble', 'https://git.launchpad.net/ubuntu/+source/luajit/plain/debian/patches/0003-Get-rid-of-LUAJIT_VERSION_SYM-that-changes-ABI-on-ev.patch?h=ubuntu/noble', 'https://git.launchpad.net/ubuntu/+source/luajit/plain/debian/patches/series?h=ubuntu/noble', 'https://git.launchpad.net/ubuntu/+source/luajit/plain/debian/watch?h=ubuntu/noble']
Dependencies ['libc6', 'libgcc-s1', 'libluajit-5.1-2', 'libluajit-5.1-common']
Optional-Dependencies []
Build-Dependencies ['debhelper-compat']
Provides []
Builddate
Architecture amd64
Distro-Version noble
Licenses []
Hash 6f15668c3a14db61720315a05e9ad73719dc54b0159458247b845b6f0601d585
#!/usr/bin/make -f
ABIM:=$(shell grep MAJVER Makefile|cut -d = -f 2|tr -d ' ')
ABIN:=$(shell grep MINVER Makefile|cut -d = -f 2|tr -d ' ')
ABIO:=$(shell grep RELVER Makefile|cut -d = -f 2|tr -d ' ')
ABI=$(ABIM).$(ABIN).$(ABIO)

export DPKG_GENSYMBOLS_CHECK_LEVEL=4

include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_auto_clean:
ifeq (,$(filter $(DEB_HOST_ARCH),ppc64el s390x))
	dh_auto_clean
endif

override_dh_auto_configure:
ifneq (,$(filter $(DEB_HOST_ARCH),ppc64el s390x))
	# Binary packages for ppc64el and s390x are transitional dummy packages.
	-$(RM) debian/*.install debian/*.symbols
endif

override_dh_auto_build:
ifeq (,$(filter $(DEB_HOST_ARCH),ppc64el s390x))
	$(MAKE) amalg PREFIX=/usr MULTILIB=lib/$(DEB_HOST_MULTIARCH) CROSS=$(DEB_HOST_GNU_TYPE)- Q= E=@:
endif

override_dh_auto_install:
ifeq (,$(filter $(DEB_HOST_ARCH),ppc64el s390x))
	make install PREFIX=/usr DESTDIR=$(CURDIR)/debian/tmp/ MULTILIB=lib/$(DEB_HOST_MULTIARCH) LDCONFIG="/sbin/ldconfig -n"
	sed -i 's?^multilib=.*?multilib=lib/$(DEB_HOST_MULTIARCH)?' \
		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*.pc
	# debian doesn't allow multiple luajit versions, just rename the binary to luajit
	mv $(CURDIR)/debian/tmp/usr/bin/luajit-* $(CURDIR)/debian/tmp/usr/bin/luajit
endif

execute_after_dh_auto_test:
ifeq (,$(filter $(DEB_HOST_ARCH),ppc64el s390x))
	# fail early on architectures it does not support
	./src/luajit -e 'print(true)'
endif