File: rules

package info (click to toggle)
lua5.2 5.2.4-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 1,276 kB
  • ctags: 3,274
  • sloc: ansic: 14,670; makefile: 324; sh: 18
file content (66 lines) | stat: -rwxr-xr-x 2,371 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
#!/usr/bin/make -f

ifeq (hurd,$(shell dpkg-architecture -qDEB_HOST_ARCH_OS))
	MYLIBS=-lpthread
endif

%:
	dh $@

override_dh_auto_build:
	$(MAKE) linux \
	MYCFLAGS="$(CFLAGS)" \
	MYLDFLAGS="$(LDFLAGS)" \
	MYLIBS=$(MYLIBS)

PKG_DIR=debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/
PKG_CONFIG_FILE=$(PKG_DIR)/lua5.2.pc
PKG_CONFIG_FILE_FBSD=$(PKG_DIR)/lua-5.2.pc
PKG_CONFIG_FILE_NODOT=$(PKG_DIR)/lua52.pc
PKGPP_CONFIG_FILE=$(PKG_DIR)/lua5.2-c++.pc
PKGPP_CONFIG_FILE_FBSD=$(PKG_DIR)/lua-5.2-c++.pc
PKGPP_CONFIG_FILE_NODOT=$(PKG_DIR)/lua52-c++.pc
LUA_MULTIARCH_INCLUDE = debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/
LUA_MULTIARCH = lua5.2-deb-multiarch.h

override_dh_auto_configure:
	echo "#ifndef _LUA_DEB_MULTIARCH_" > src/$(LUA_MULTIARCH)
	echo "#define _LUA_DEB_MULTIARCH_" >> src/$(LUA_MULTIARCH)
	echo "#define DEB_HOST_MULTIARCH \"$(DEB_HOST_MULTIARCH)\"" >> \
		src/$(LUA_MULTIARCH)
	echo "#endif" >> src/$(LUA_MULTIARCH)

override_dh_auto_install:
	dh_auto_install
	mkdir -p `dirname $(PKG_CONFIG_FILE)`
	echo "prefix=/usr" > $(PKG_CONFIG_FILE)
	echo "major_version=5.2" >> $(PKG_CONFIG_FILE)
	echo "version=5.2.0" >> $(PKG_CONFIG_FILE)
	echo "lib_name_include=lua5.2" >> $(PKG_CONFIG_FILE)
	echo "deb_host_multiarch=$(DEB_HOST_MULTIARCH)" >> $(PKG_CONFIG_FILE)
	cat debian/lua.pc.in >> $(PKG_CONFIG_FILE)
	ln -s $(shell basename $(PKG_CONFIG_FILE)) $(PKG_CONFIG_FILE_FBSD)
	ln -s $(shell basename $(PKG_CONFIG_FILE)) $(PKG_CONFIG_FILE_NODOT)
	echo "prefix=/usr" > $(PKGPP_CONFIG_FILE)
	echo "major_version=5.2" >> $(PKGPP_CONFIG_FILE)
	echo "version=5.2.0" >> $(PKGPP_CONFIG_FILE)
	echo "lib_name_include=lua5.2" >> $(PKGPP_CONFIG_FILE)
	echo "deb_host_multiarch=$(DEB_HOST_MULTIARCH)" >> $(PKGPP_CONFIG_FILE)
	cat debian/lua-c++.pc.in >> $(PKGPP_CONFIG_FILE)
	ln -s $(shell basename $(PKGPP_CONFIG_FILE)) $(PKGPP_CONFIG_FILE_FBSD)
	ln -s $(shell basename $(PKGPP_CONFIG_FILE)) $(PKGPP_CONFIG_FILE_NODOT)
	cat doc/lua.1  | sed 's/TH LUA 1/TH LUA5.2 1/' > lua5.2.1
	cat doc/luac.1 | sed 's/TH LUAC 1/TH LUAC5.2 1/' > luac5.2.1
	mkdir -p $(LUA_MULTIARCH_INCLUDE)
	cp src/$(LUA_MULTIARCH) $(LUA_MULTIARCH_INCLUDE)
	mkdir -p debian/tmp/usr/share/lua5.2/
	cp debian/version-script debian/tmp/usr/share/lua5.2/

override_dh_auto_clean:
	dh_auto_clean
	rm -f lua5.2.1 luac5.2.1
	rm -f src/$(LUA_MULTIARCH)

override_dh_strip:
	dh_strip --dbg-package=liblua5.2-0-dbg