File: Makefile

package info (click to toggle)
opendict 0.6.5-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,056 kB
  • ctags: 884
  • sloc: python: 6,382; makefile: 135; sh: 71; xml: 41
file content (71 lines) | stat: -rw-r--r-- 2,323 bytes parent folder | download
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
# OpenDict Makefile
#

DESTDIR     = /usr
bindir	    = $(DESTDIR)/bin
icondir	    = $(DESTDIR)/share/icons/hicolor
opendictdir = $(DESTDIR)/share/opendict

install:
	mkdir -p $(opendictdir)/lib/extra
	mkdir -p $(opendictdir)/lib/gui
	cp -r lib/*.py $(opendictdir)/lib
	cp -r lib/extra/*.py $(opendictdir)/lib/extra
	cp -r lib/gui/*.py $(opendictdir)/lib/gui
	chmod -R a+rX $(opendictdir)/lib
	mkdir -p $(opendictdir)/pixmaps
	cp pixmaps/*.png $(opendictdir)/pixmaps
	chmod -R a+rX $(opendictdir)/pixmaps
	mkdir -p $(icondir)/24x24/apps
	mkdir -p $(icondir)/32x32/apps
	mkdir -p $(icondir)/48x48/apps
	mkdir -p $(icondir)/96x96/apps
	mkdir -p $(icondir)/scalable/apps
	cp pixmaps/icon-24x24.png $(icondir)/24x24/apps/opendict.png
	cp pixmaps/icon-32x32.png $(icondir)/32x32/apps/opendict.png
	cp pixmaps/icon-48x48.png $(icondir)/48x48/apps/opendict.png
	cp pixmaps/icon-96x96.png $(icondir)/96x96/apps/opendict.png
	cp pixmaps/SVG/icon-rune.svg $(icondir)/scalable/apps/opendict.svg

	$(MAKE) -C po install prefix=$(DESTDIR)

	cp opendict.py $(opendictdir)
	chmod a+rx $(opendictdir)/opendict.py
	cp copying.html $(opendictdir)
	chmod a+r $(opendictdir)/copying.html
	mkdir -p $(bindir)
	ln -sf $(opendictdir)/opendict.py $(bindir)/opendict
	mkdir -p $(DESTDIR)/share/applications
	cp misc/opendict.desktop $(DESTDIR)/share/applications
	chmod a+r $(DESTDIR)/share/applications/opendict.desktop

uninstall:
	rm -f $(DESTDIR)/share/applications/opendict.desktop
	rm -f $(bindir)/opendict
	rm -f $(opendictdir)/copying.html
	rm -f $(opendictdir)/opendict.py

	$(MAKE) -C po uninstall prefix=$(DESTDIR)

	rm -f $(icondir)/24x24/apps/opendict.png
	rm -f $(icondir)/32x32/apps/opendict.png
	rm -f $(icondir)/48x48/apps/opendict.png
	rm -f $(icondir)/96x96/apps/opendict.png
	rm -f $(icondir)/scalable/apps/opendict.svg
	rm -f $(opendictdir)/pixmaps/*.png
	rmdir $(opendictdir)/pixmaps
	rm -f $(opendictdir)/lib/gui/*.py*
	rm -f $(opendictdir)/lib/extra/*.py*
	rm -f $(opendictdir)/lib/*.py*
	rmdir $(opendictdir)/lib/extra
	rmdir $(opendictdir)/lib/gui
	rmdir $(opendictdir)/lib
	rmdir $(opendictdir)

clean:
	for f in `find . -name '*.pyc'`; do rm $$f; done
	for f in `find . -name '*.pyo'`; do rm $$f; done
	for f in `find . -name '*.py~'`; do rm $$f; done
	for f in `find . -name '*~'`; do rm $$f; done

	$(MAKE) -C po clean