Subversion Repositories wimsdev

Rev

Rev 11130 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11130 georgesk 1
# This file allows one to make the Wims source tarball comply
2
# to the DFSG
3
 
4
TRUNK =    $(abspath $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/../..)
5
 
6
WIMSHOME = $(TRUNK)/wims
7
 
8
IS_SVN   = $(shell if [ -d "$(TRUNK)/.svn" ]; then echo true; else echo false; fi)
9
 
10
all:
11
ifeq ($(IS_SVN), false)
12
	$(MAKE) deletions
13
else
14
	@echo "ERROR"
15
	@echo "You should never use this Makefile inside a SVN repository."
16
endif
17
 
18
deletions: removeUseless deleteBinaries
19
 
20
removeUseless:
21
	find $(WIMSHOME) -name "*.bak" -o -name .DS_Store | xargs rm -f
22
 
23
deleteBinaries:
24
	# sourceless precompiled ELF files
25
	rm -f $(WIMSHOME)/bin/true
26
	rm -f $(WIMSHOME)/bin/false
27
	#### java binary files
28
	find $(WIMSHOME) -name "*.jar" | xargs rm -f
29
	#### flash binaries
30
	rm -f $(WIMSHOME)/public_html/flash/*.swf
31
	#### uglyfied javascript libraries
32
	for d in jquery jsxgraph ; do \
33
	    rm -rf $(WIMSHOME)/public_html/scripts/js/$d; \
34
	done
35
	#### uglyfied javascript files
36
	# Joke Evers' jqmath
37
	for f in jqmath.js ; do \
38
	   rm -f $(WIMSHOME)/public_html/scripts/authors/jm.evers/js/$f; \
39
	done
40
	# asciimathml which is provided by a debian package
41
	rm -f $(WIMSHOME)/public_html/scripts/js/ASCIIMathML.js \
42
	  $(WIMSHOME)/public_html/scripts/js/LaTeXMathML.js
43
	# mootools which is provided by a debian package
44
	rm -f $(WIMSHOME)/public_html/scripts/js/editor/scripts_1/mootools.js
45
	## uglified third party libraries which should be got from their
46
	## official repositories
13570 obado 47
	rm -rf $(WIMSHOME)/public_html/scripts/js/external/what-input
11130 georgesk 48
	### delete symbols which will be generated during
49
	### the post-installation
50
	rm  -f $(WIMSHOME)/public_html/gifs/symbols/20/*.gif
51
	############## remove edit-area's uglified javascript
52
	rm -f $(WIMSHOME)/public_html/scripts/js/edit_area/*full*
53
 
54
downloads:
13570 obado 55
	## what-input
56
	dl_version=5.1.3; \
57
	  dest=$(WIMSHOME)/public_html/scripts/js/external/; \
11130 georgesk 58
	  cd $${dest}; \
13570 obado 59
	  wget https://github.com/ten1seven/what-input/archive/v$(dl_version).zip; \
60
	  unzip v$(dl_version).zip; rm v$(dl_version).zip;
11130 georgesk 61
 
62
 
63
.PHONY: all deletions removeUseless deleteBinaries