forked from grommunio/grommunio-cui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (30 loc) · 1.14 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
MKDIR_P = mkdir -p
SED = sed
PACKAGE_NAME = grommunio-cui
prefix = /usr
sbindir = ${prefix}/sbin
libexecdir = ${prefix}/libexec
datadir = ${prefix}/share
pkglibexecdir = ${libexecdir}/${PACKAGE_NAME}
unitdir = /usr/lib/systemd/system
locales = de en
mo_files = $(patsubst %,locale/%/LC_MESSAGES/cui.mo,${locales})
all: ${mo_files}
%.mo: %.po
msgfmt -o $@ $<
install: ${mo_files}
${MKDIR_P} ${DESTDIR}${pkglibexecdir}/cui/classes ${DESTDIR}${sbindir} ${DESTDIR}${unitdir}
cp -afv getty *.py ${DESTDIR}${pkglibexecdir}/
cp -afv setlogcons.service ${DESTDIR}${unitdir}/
# overwrite desired
cp -afv cui/*.py ${DESTDIR}${pkglibexecdir}/cui/
cp -afv cui/classes/*.py ${DESTDIR}${pkglibexecdir}/cui/classes/
${SED} 's!@pkglibexecdir@!${pkglibexecdir}!g' <grommunio-cui.in >${DESTDIR}${sbindir}/grommunio-cui
chmod a+x ${DESTDIR}${sbindir}/grommunio-cui
${SED} 's!@pkglibexecdir@!${pkglibexecdir}!g' <[email protected] >${DESTDIR}${unitdir}/[email protected]
for i in ${locales}; do \
t=${DESTDIR}${datadir}/locale/$$i/LC_MESSAGES; \
${MKDIR_P} $$t && cp -av locale/$$i/LC_MESSAGES/cui.mo $$t/; \
done
clean:
rm -fv locale/*/LC_MESSAGES/*.mo