/
Makefile
63 lines (55 loc) · 1.71 KB
/
Makefile
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
SHELL := /bin/bash
PATHVER?=2.1
VERSION?=2.0.5
RELEASEVER?=1
SCRIPTPATH=$(shell pwd -P)
build: clean luajit pre_package
clean:
rm -rf /tmp/luajit-$(PATHVER)
luajit:
# Download and install luajit
cd /tmp/ && \
git clone https://github.com/LuaJIT/LuaJIT --branch v$(VERSION) /tmp/luajit-$(PATHVER) && \
cd /tmp/luajit-$(PATHVER) && \
make -j$(CORES)
pre_package:
cd /tmp/luajit-$(PATHVER) && make install DESTDIR=/tmp/luajit-install
fpm_debian:
fpm -s dir \
-t deb \
-n luajit-$(PATHVER) \
-v $(VERSION)-$(RELEASEVER)~$(shell lsb_release --codename | cut -f2) \
-C /tmp/luajit-install \
-p luajit-$(PATHVER)-$(VERSION)-$(RELEASEVER)~$(shell lsb_release --codename | cut -f2)_$(shell arch).deb \
-m "charlesportwoodii@erianna.com" \
--license "MIT" \
--url https://github.com/charlesportwoodii/luajit-build \
--description "Lua JIT $(PATHVER)" \
--deb-systemd-restart-after-upgrade
fpm_rpm:
fpm -s dir \
-t rpm \
-n luajit-$(PATHVER) \
-v $(VERSION)-$(RELEASEVER) \
-C /tmp/luajit-install \
-p luajit-$(PATHVER)-$(VERSION)-$(RELEASEVER)_$(shell arch).rpm \
-m "charlesportwoodii@erianna.com" \
--license "MIT" \
--url https://github.com/charlesportwoodii/luajit-build \
--description "Lua JIT $(PATHVER)" \
--vendor "Charles R. Portwood II" \
--rpm-digest sha384 \
--rpm-compression gzip
fpm_alpine:
fpm -s dir \
-t apk \
-n luajit-$(PATHVER) \
-v $(VERSION)-$(RELEASEVER)~$(shell uname -m) \
-C /tmp/luajit-install \
-p luajit-$(PATHVER)-$(VERSION)-$(RELEASEVER)~$(shell uname -m).apk \
-m "charlesportwoodii@erianna.com" \
--license "MIT" \
--url https://github.com/charlesportwoodii/luajit-build \
--description "Lua JIT $(PATHVER)" \
--force \
-a $(shell uname -m)