-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
138 lines (114 loc) · 4.24 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
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
#
#
# Ezanvakti 7.6 Makefile
#
#
SHELL = /bin/bash
DESTDIR =
AD = ezanvakti
SURUM = $(shell cat VERSION)
DUZELTME = $(shell git log -1 --pretty=format:'%ad' --abbrev-commit --date=short 2>/dev/null | tr -d -- '-')
PREFIX = /usr/local
INSTALL = /usr/bin/env install
SED = /bin/sed
bindir = $(PREFIX)/bin
libdir = $(PREFIX)/lib
sysconfdir = $(PREFIX)/etc
datadir = $(PREFIX)/share
completionsdir = $(PREFIX)/share/bash-completion/completions
mandir = $(PREFIX)/share/man
sounddir = $(PREFIX)/share/sounds
icondir = $(PREFIX)/share/icons/hicolor
appdeskdir = $(PREFIX)/share/applications
ILCELI_ULKELER = TURKIYE ABD ALMANYA KANADA
ifeq "$(DUZELTME)" ""
DUZELTME = $(shell date +%Y%m%d)
endif
BETIKLER = ezanvakti.bash lib/temel_islevler.bash lib/arayuz.bash \
lib/arayuz2.bash lib/arayuz3.bash lib/ezanvakti-sleep \
lib/ucbirim_tui.bash data/ezanvakti.desktop data/ayarlar \
data/ezanvakti_completion
all: $(BETIKLER)
$(BETIKLER): ${BETIKLER:=.in}
@echo ' YAP' $@
@$(SED) -e 's:@AD@:$(AD):g' \
-e 's:@SURUM@:$(SURUM):' \
-e 's:@DUZELTME@:$(DUZELTME):' \
-e 's:@bindir@:$(bindir):' \
-e 's:@datadir@:$(datadir):' \
-e 's:@libdir@:$(libdir):' \
-e 's:@sysconfdir@:$(sysconfdir):' \
-e 's:@sounddir@:$(sounddir):' \
$@.in > $@
install: $(BETIKLER)
$(INSTALL) -vd $(DESTDIR)$(bindir)
$(INSTALL) -vd $(DESTDIR)$(libdir)/$(AD)
$(INSTALL) -vd $(DESTDIR)$(sysconfdir)
$(INSTALL) -vd $(DESTDIR)$(datadir)/$(AD)/{veriler,mealler,simgeler,ulkeler{/TURKIYE,/ABD,/ALMANYA,/KANADA}_ilceler}
$(INSTALL) -vd $(DESTDIR)$(sounddir)/$(AD)
$(INSTALL) -vd $(DESTDIR)$(completionsdir)
$(INSTALL) -vd $(DESTDIR)$(mandir)/man{1,5}
$(INSTALL) -vd $(DESTDIR)$(appdeskdir)
$(INSTALL) -vd $(DESTDIR)$(icondir)/{16x16,22x22,32x32,48x48,64x64,96x96}/apps
$(INSTALL) -vm755 ezanvakti.bash $(DESTDIR)$(bindir)/$(AD)
$(INSTALL) -vm755 lib/ezanvakti-sleep $(DESTDIR)$(libdir)/$(AD)/$(AD)-sleep
$(INSTALL) -vm755 data/ezanvakti.desktop $(DESTDIR)$(appdeskdir)/$(AD).desktop
$(INSTALL) -vm644 data/ayarlar $(DESTDIR)$(sysconfdir)/$(AD).conf
$(INSTALL) -vm644 data/ezanvakti_completion $(DESTDIR)$(completionsdir)/$(AD)
# man
$(INSTALL) -vm644 doc/ezanvakti.1 $(DESTDIR)$(mandir)/man1/$(AD).1
$(INSTALL) -vm644 doc/ezanvakti-ayarlar.5 $(DESTDIR)$(mandir)/man5/$(AD)-ayarlar.5
for l in lib/*.bash; \
do \
$(INSTALL) -vm755 $$l $(DESTDIR)$(libdir)/$(AD); \
done
for v in data/veriler/*; \
do \
$(INSTALL) -vm644 "$$v" $(DESTDIR)$(datadir)/$(AD)/veriler; \
done
for i in data/ulkeler/*; \
do \
[[ -d "$$i" ]] && continue; \
$(INSTALL) -vm644 "$$i" $(DESTDIR)$(datadir)/$(AD)/ulkeler; \
done
for ulke in $(ILCELI_ULKELER); \
do \
for ilce in data/ulkeler/"$$ulke"_ilceler/*; \
do \
$(INSTALL) -vm644 "$$ilce" $(DESTDIR)$(datadir)/$(AD)/ulkeler/"$$ulke"_ilceler; \
done \
done
for e in ezanlar/*.ogg; \
do \
$(INSTALL) -vm644 $$e $(DESTDIR)$(sounddir)/$(AD); \
done
for m in 16 22 32 48 64 96; \
do \
$(INSTALL) -vm644 data/simgeler/ezanvakti"$$m".png $(DESTDIR)$(icondir)/$$m"x"$$m/apps/$(AD).png; \
done
for t in data/mealler/*; \
do \
$(INSTALL) -vm644 $$t $(DESTDIR)$(datadir)/$(AD)/mealler; \
done
$(INSTALL) -vm644 data/simgeler/anasayfa.png $(DESTDIR)$(datadir)/$(AD)/simgeler
$(INSTALL) -vm644 data/simgeler/geri.png $(DESTDIR)$(datadir)/$(AD)/simgeler
$(INSTALL) -vm644 data/simgeler/oynat.png $(DESTDIR)$(datadir)/$(AD)/simgeler
uninstall:
@rm -f $(DESTDIR)$(bindir)/$(AD)
@rm -rf $(DESTDIR)$(libdir)/$(AD)
@rm -rf $(DESTDIR)$(datadir)/$(AD)
@rm -rf $(DESTDIR)$(sounddir)/$(AD)
@rm -f $(DESTDIR)$(sysconfdir)/$(AD).conf
@rm -f $(DESTDIR)$(completionsdir)/$(AD)
@rm -f $(DESTDIR)$(mandir)/man1/$(AD).1*
@rm -f $(DESTDIR)$(mandir)/man5/$(AD)-ayarlar.5*
@rm -f $(DESTDIR)$(appdeskdir)/$(AD).desktop
@rm -f $(DESTDIR)$(icondir)/{16x16,22x22,32x32,48x48,64x64,96x96}/apps/$(AD).png
@echo "$(AD) başarıyla sisteminizden kaldırıldı.."
clean:
rm -f $(BETIKLER)
dist:
@echo "Kaynak kod paketi oluşturuluyor. Lütfen bekleyiniz..."
@git archive master | xz > $(AD)-$(SURUM).$(DUZELTME).tar.xz
@echo "İşlem tamamlandı. ----------> $(AD)-$(SURUM).$(DUZELTME).tar.xz"
.PHONY: all clean dist install uninstall