blob: b17c146ef131150b858f64c698083de45ec494c7 (
plain)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
|
#!/usr/bin/make -f
SCITECO_VERSION = 0.6
SCITECO_SRC = sciteco-$(SCITECO_VERSION).tar.gz
$(SCITECO_SRC):
$(MAKE) dist
all : $(SCITECO_SRC) debian mingw-binary
# $(UBUNTU) sets the Ubuntu distribution and fixes the package's
# version
debian-prepare: debian-temp/
debian-temp/ : bundle
mkdir debian-temp/
(cd debian-temp/; \
cp ../$(SCITECO_SRC) \
sciteco_$(SCITECO_VERSION).orig.tar.gz; \
tar xzf sciteco_$(SCITECO_VERSION).orig.tar.gz; \
cp -r ../debian sciteco-$(SCITECO_VERSION)/; \
)
ifneq ($(UBUNTU),)
sciteco -e "@EB|debian-temp/sciteco-$(SCITECO_VERSION)/debian/changelog| \
<@FS/ unstable;/ $(UBUNTU);/; -@S/)/R @I/ppa1~$(UBUNTU)1/ L> \
@EW||"
endif
SIGN ?= no
ifeq ($(SIGN),yes)
DEBUILD_FLAGS :=
else
DEBUILD_FLAGS := -us -uc
endif
UPLOAD_SRC ?= yes
ifeq ($(UPLOAD_SRC),yes)
DEBUILD_FLAGS += -sa
else
DEBUILD_FLAGS += -sd
endif
debian-source : debian-temp/source-stamp
debian-temp/source-stamp : debian-prepare
(cd debian-temp/sciteco-$(SCITECO_VERSION)/; \
debuild -S $(DEBUILD_FLAGS); \
)
touch $@
debian-binary : debian-temp/binary-stamp
debian-temp/binary-stamp : debian-prepare
(cd debian-temp/sciteco-$(SCITECO_VERSION)/; \
debuild -b $(DEBUILD_FLAGS); \
)
touch $@
debian : debian-source debian-binary
ppa : debian-source
(cd debian-temp/; \
dput ppa:robin-haberkorn/sciteco *.changes; \
)
mingw-binary : sciteco-$(SCITECO_VERSION)-win32.zip
sciteco-$(SCITECO_VERSION)-win32.zip : $(SCITECO_SRC)
tar xzf $(SCITECO_SRC)
(cd sciteco-$(SCITECO_VERSION); \
./configure --host=i686-w64-mingw32 --prefix=/ \
--with-interface=pdcurses \
--disable-bootstrap \
--enable-html-manual \
CFLAGS="-O3" CXXFLAGS="-O3"; \
)
$(MAKE) -C sciteco-$(SCITECO_VERSION) \
install DESTDIR=`pwd`/temp-install
rm -rf sciteco-$(SCITECO_VERSION)/
i686-w64-mingw32-strip -s temp-install/bin/*
mkdir temp-bin/
cp -r temp-install/bin/* temp-install/share/sciteco/* temp-install/share/doc/sciteco/* \
temp-bin/
cp temp-install/share/sciteco/sample.teco_ini \
temp-bin/.teco_ini
rm -rf temp-install/
cp /usr/i686-w64-mingw32/bin/intl.dll \
/usr/i686-w64-mingw32/bin/libglib-2.0-0.dll \
/usr/i686-w64-mingw32/bin/pdcurses.dll \
temp-bin/
cd temp-bin/; zip -r ../$@ *
rm -rf temp-bin/
clean:
rm -rf $(SCITECO_SRC)
rm -rf debian-temp/
rm -rf sciteco-$(SCITECO_VERSION)/
|