forked from TEIC/Roma-Antiqua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
88 lines (76 loc) · 3.05 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
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
PREFIX=
LOCATION=/usr
ETC=/etc
TEIXSLDIR=http://www.tei-c.org/release/xml/tei/stylesheet
FILES=ChangeLog \
g \
index.html \
Makefile \
notam \
parser \
progressbar \
resource \
roma \
roma2.sh \
roma.1 \
roma.css \
TEI-glow.png \
roma.js \
startroma.php \
teilogo.jpg \
VERSION
.PHONY: release
default:
@echo
@echo TEI Roma
@echo - install target puts files directly into ${PREFIX}${LOCATION}
@echo - dist target makes a release subdirectory of runtime files
@echo There is no default action
@echo
install: release-stamp
mkdir -p ${PREFIX}${LOCATION}/share/tei-roma
(cd release; tar cf - . ) | (cd ${PREFIX}${LOCATION}/share; tar xf - )
mkdir -p ${PREFIX}${LOCATION}/bin
sed "s/VVVERSION/`cat VERSION`/" roma2.sh | perl -p -e "s+^TEIXSLDIR=.*+TEIXSLDIR=${TEIXSLDIR}+" > ${PREFIX}${LOCATION}/bin/roma
sed "s/VVVERSION/`cat VERSION`/" roma2.sh | perl -p -e "s+^TEIXSLDIR=.*+TEIXSLDIR=${TEIXSLDIR}+" > ${PREFIX}${LOCATION}/bin/roma2
chmod 755 ${PREFIX}${LOCATION}/bin/roma ${PREFIX}${LOCATION}/bin/roma2
mkdir -p ${PREFIX}${ETC}/tei-roma
cp ${PREFIX}/${LOCATION}/share/tei-roma/roma/config-dist.php ${PREFIX}${ETC}/tei-roma/config.php
perl -p -i -e 's+http://www.tei-c.org/release+/usr/share+' ${PREFIX}${ETC}/tei-roma/config.php
(cd ${PREFIX}/${LOCATION}/share/tei-roma/roma; rm config.php; ln -s ${PREFIX}${ETC}/tei-roma/config.php config.php)
dist: release-stamp
(cd release; zip -r ../tei-roma-`cat ../VERSION`.zip tei-roma)
debversion:
sh ./mydch debian-tei-roma/debian/changelog
deb: debversion
@echo BUILD Make Debian packages
rm -f tei*roma*_*deb
rm -f tei*roma*_*changes
rm -f tei*roma*_*build
(cd debian-tei-roma; debclean;debuild --no-lintian -nc -b -i.svn -I.svn -uc -us)
release: clean release-stamp
release-stamp:
rm -rf release/tei-roma
mkdir -p release/tei-roma
V=`cat VERSION` D=`head -1 ChangeLog | awk '{print $$1}'`;export D V; \
echo version $$V of date $$D; \
perl -p -i -e "s+.*define.*roma_date.*+define (\'roma_date\',\'$$D\');+" roma/config.php; \
perl -p -i -e "s+.*define.*roma_version.*+define (\'roma_version\',\'$$V\');+" roma/config.php; \
perl -p -i -e "s+.*define.*roma_date.*+define (\'roma_date\',\'$$D\');+" roma/config-dist.php; \
perl -p -i -e "s+.*define.*roma_version.*+define (\'roma_version\',\'$$V\');+" roma/config-dist.php; \
tar --exclude=.svn -c -f - $(FILES) | (cd release/tei-roma; tar xf -); \
perl -p -i -e "s/{roma_version}/$$V/;s/{roma_date}/$$D/" release/tei-roma/roma/templates/main.tem
(cd roma; curl -s -F [email protected] -o oddschema.rng http://oxgarage.oucs.ox.ac.uk:8080/ege-webservice/Conversions/ODD%3Atext%3Axml/ODDC%3Atext%3Axml/relaxng%3Aapplication%3Axml-relaxng/)
touch release-stamp
clean:
rm -rf release
rm -f release-stamp roma/oddschema.rnc
rm -f tei-roma_*
rm -f tei-roma-*.zip
rm -rf debian-tei-roma/debian/tei-roma
log:
(LastDate=`head -1 ChangeLog | awk '{print $$1}'`; \
svn log -v -r 'HEAD:{'$$LastDate'}' | perl ../gnuify-changelog.pl | grep -v "^;" > newchanges)
mv ChangeLog oldchanges
cat newchanges oldchanges > ChangeLog
rm newchanges oldchanges