-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
45 lines (34 loc) · 950 Bytes
/
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
#
# Makefile
#
VERSION=0.2.1
PACKAGE_VERSION=1
PROG=dpkg-deb
SOURCE=./tmp
FLAGS=--build
DEBTARGET=liblua5.1-captcha0_$(VERSION)-$(PACKAGE_VERSION)_i386.deb
TARGET=lua-captcha-$(VERSION)
LUABIN=lua5.1
OUTFILE=captcha.lua
INSTALL_PATH := `$(LUABIN) -e 'for dir in package.cpath:gmatch("(/[^?;]+)?") do io.write(dir); os.exit(0) end; os.exit(1)'`
default:
@echo "options are 'install', 'snapshot', 'clean'"
install:
install -D src/$(OUTFILE) $(INSTALL_PATH)/$(OUTFILE)
snapshot:
mkdir -p ./tmp
svn export ./ $(TARGET)
tar cvvf $(TARGET).tar $(TARGET)
gzip $(TARGET).tar
rm -R $(TARGET)
debian_package:
mkdir -p tmp/
mkdir -p tmp/usr/share/lua/5.1/
mkdir -p tmp/usr/share/doc/liblua5.1-captcha0
mkdir -p tmp/DEBIAN
cp src/captcha.lua tmp/usr/share/lua/5.1/
cp debian/control tmp/DEBIAN/control
cp doc/copyright tmp/usr/share/doc/liblua5.1-captcha0/copyright
fakeroot $(PROG) $(FLAGS) $(SOURCE) $(DEBTARGET)
clean:
rm -Rf tmp/*