forked from spechub/Hets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.installer
153 lines (136 loc) · 5.35 KB
/
Makefile.installer
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#
# Makefile
# $Id$
# Author: Heng Jiang, C. Maeder Uni Bremen 2004-2008
# Year: 2008
#
# This Makefile will generate the installer for Hets with IzPack
# parts will be post processed by sample/pack/scripts/postProcOfHets.sh
all : download build
TMP_PATH = $(PWD)
IZPACK_PATH = $(TMP_PATH)/Izpack-Hets
IZPACK_COMPILE = $(IZPACK_PATH)/bin/compile
IZPACK_SAMPLE = $(IZPACK_PATH)/sample
IZPACK_PACK = $(IZPACK_SAMPLE)/pack
IZPACK_SPASS = $(IZPACK_SAMPLE)/SPASS
IZPACK_HETS = $(IZPACK_SAMPLE)/hets
IZPACK_JAVA = $(IZPACK_HETS)/java
HETS_VERSION = 0.98
SPASS_DIR_MAC = SPASS-3.5
SPASS_DIR_SOLARIS = SPASS-3.7
SPASS_INTEL_MAC_BINARY = /home/mac-bkb/intel/bin/SPASS
SPASS_PC_SOLARIS_BINARY = /home/pub-bkb/pc-solaris/SPASS/bin/SPASS
ARCH_OSES = linux intel-mac pc-solaris linux64
HETS_URL = \
http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets
RELEASED_HETS_SRC = \
$(HETS_URL)/src-distribution/versions/Hets-src-$(HETS_VERSION).tgz
HETS_LIB_URL = http://www.informatik.uni-bremen.de/cofi/Libraries/daily/lib.tgz
UNI_TRUNK = https://svn-agbkb.informatik.uni-bremen.de/uni/trunk
IZPACK_TRUNK = https://svn-agbkb.informatik.uni-bremen.de/izpack
OSBYUNAME = $(shell uname)
ifneq ($(findstring SunOS, $(OSBYUNAME)),)
TAR = gtar
else
TAR = tar
endif
ifneq ($(findstring Darwin, $(OSBYUNAME)),)
GET = curl -o
else
GET = wget -O
endif
SPASSURL_LINUX = \
http://www.spass-prover.org/download/binaries/spass35pclinux32.tgz
SPASSURL_INTELMAC = \
http://www.spass-prover.org/download/binaries/spass35x86macosx.dmg
SPASS_SRC = http://www.spass-prover.org/download/sources/spass37.tgz
download : izpack-checkout hets-download release-hets-download spass-download
hets-lib-checkout :
@echo get Hets-lib
mkdir -p $(IZPACK_SAMPLE)/Hets-lib
$(GET) $(IZPACK_SAMPLE)/Hets-lib/Hets-lib.tgz $(HETS_LIB_URL)
hets-download : hets-lib-checkout
@cd $(IZPACK_SAMPLE)/src ; \
$(GET) Hets.tgz $(RELEASED_HETS_SRC) ; \
$(TAR) xvfz Hets.tgz ; \
cd Hets ; \
cp LICENSE.txt $(IZPACK_PACK)/ ; \
cp LIZENZ.txt $(IZPACK_PACK)/ ; \
cp README.installer $(IZPACK_PACK)/README ; \
mkdir -p $(IZPACK_HETS)/doc ; \
mkdir -p $(IZPACK_JAVA) ; \
mkdir -p $(IZPACK_JAVA)/lib ; \
cp utils/el/*.el $(IZPACK_SAMPLE)/hets ; \
cp hets.in $(IZPACK_HETS)/hets ; \
cp utils/getDailyHets.sh $(IZPACK_SAMPLE) ; \
make -f Makefile.orig initialize_java ; \
cp OWL/OWLLocality.jar $(IZPACK_JAVA) ; \
cp OWL/OWL2ATerm.jar $(IZPACK_JAVA) ; \
cp OWL/lib/*.jar $(IZPACK_JAVA)/lib ; \
cp CASL/Termination/AProVE.jar $(IZPACK_JAVA) ; \
cp DMU/OntoDMU.jar $(IZPACK_JAVA) ; \
cp utils/hetcasl.sty docs/UserGuide.pdf $(IZPACK_HETS)/doc/ ; \
cd .. ; \
$(RM) -r Hets
release-hets-download :
for i in $(ARCH_OSES); do \
mkdir -p $(IZPACK_HETS)/$$i ; \
$(GET) $(IZPACK_HETS)/$$i/hets-$(HETS_VERSION).bz2 \
$(HETS_URL)/$$i/versions/hets-$(HETS_VERSION).bz2; done
izpack-checkout :
@echo update izpack_het
svn checkout $(IZPACK_TRUNK) $(IZPACK_PATH)
spass-download :
$(GET) $(IZPACK_SPASS)/spass-src.tgz $(SPASS_SRC)
for i in $(ARCH_OSES) ; do \
spassdir=$(IZPACK_SPASS)/$$i ; \
mkdir -p $$spassdir ; \
cp -f $(IZPACK_SPASS)/spass-src.tgz $$spassdir/ ; \
done
$(RM) $(IZPACK_SPASS)/spass-src.tgz
$(GET) $(IZPACK_SPASS)/linux/spass.tgz $(SPASSURL_LINUX)
$(GET) $(IZPACK_SPASS)/linux64/spass.tgz $(SPASSURL_LINUX)
$(GET) $(IZPACK_SPASS)/intel-mac/spass.dmg $(SPASSURL_INTELMAC)
for i in linux linux64; do \
cd $(IZPACK_SPASS)/$$i/ ; $(TAR) xvfz spass.tgz ; \
$(RM) spass.tgz ; mv SPASS*/SPASS . ; $(RM) -r SPASS*/* ; \
mv SPASS SPASS*/ ; chmod a+x SPASS*/SPASS ; \
done
mkdir -p $(IZPACK_SPASS)/pc-solaris/$(SPASS_DIR_SOLARIS)
cp $(SPASS_PC_SOLARIS_BINARY) \
$(IZPACK_SPASS)/pc-solaris/$(SPASS_DIR_SOLARIS)
mkdir -p $(IZPACK_SPASS)/intel-mac/$(SPASS_DIR_MAC)
cp $(SPASS_INTEL_MAC_BINARY) \
$(IZPACK_SPASS)/intel-mac/$(SPASS_DIR_MAC)/
XMLFILE = $(IZPACK_PACK)/install
build-prepare :
perl -ple "s/\@HETSVERSION/$(HETS_VERSION)/g" \
$(XMLFILE)-all.xml.in > $(XMLFILE)-all.xml
perl -ple "s/\@HETSOS/ix86\/Linux/g" $(XMLFILE)-all.xml \
> $(XMLFILE)-linux.xml.in
perl -ple "s/\@HETSOS/AMD64\/Linux/g" $(XMLFILE)-all.xml \
> $(XMLFILE)-linux64.xml.in
perl -ple "s/\@HETSOS/sparc\/SunOS/g" $(XMLFILE)-all.xml \
> $(XMLFILE)-solaris.xml.in
perl -ple "s/\@HETSOS/ix86\/SunOS/g" $(XMLFILE)-all.xml \
> $(XMLFILE)-pc-solaris.xml.in
perl -ple "s/\@HETSOS/ppc\/macos/g" $(XMLFILE)-all.xml \
> $(XMLFILE)-mac.xml.in
perl -ple "s/\@HETSOS/ix86\/macos/g" $(XMLFILE)-all.xml \
> $(XMLFILE)-intel-mac.xml.in
for i in $(ARCH_OSES); do \
perl -ple "s/\@ARCHOS/$$i/g" $(XMLFILE)-$$i.xml.in \
> $(XMLFILE)-$$i.xml ; \
done
build : build-prepare
@chmod +x $(IZPACK_PATH)/bin/compile
for i in $(ARCH_OSES); do \
$(IZPACK_COMPILE) $(IZPACK_PACK)/install-$$i.xml \
-b $(IZPACK_SAMPLE)/ \
-o hets-$(HETS_VERSION)-installer-$$i.jar -k standard ; \
done
clean :
@$(RM) -r $(IZPACK_PATH)
.PHONY : all download build build-prepare hets-lib-checkout hets-download \
release-hets-download spass-download izpack-checkout \
clean