-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (31 loc) · 1.37 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
NAME=om-welcome
VERSION=2.1.3
TRANSLATIONS=de en fr id it pt_BR pt_PT tr
bindir=/usr/bin
sysconfdir=/etc
sharedir=/usr/share
localedir=$(sharedir)/locale
all:
messages: usr/share/om-welcome/translation
xgettext -d om-welcome -o usr/share/om-welcome/om-welcome.pot -L Shell --from-code utf-8 usr/share/om-welcome/translation
for i in $(TRANSLATIONS); do \
msgmerge -U po/$$i.po usr/share/om-welcome/om-welcome.pot; \
done
install: messages
mkdir -p $(DESTDIR)$(prefix)/$(bindir)
mkdir -p $(DESTDIR)$(prefix)/$(sysconfdir)/xdg/autostart
mkdir -p $(DESTDIR)$(prefix)/$(sharedir)/$(NAME)
mkdir -p $(DESTDIR)$(prefix)/$(sharedir)/applications
mkdir -p $(DESTDIR)$(prefix)/$(localedir)
install -m 644 om-welcome.desktop $(DESTDIR)$(prefix)/$(sysconfdir)/xdg/autostart
install -m 644 etc/skel/om-welcome.desktop $(DESTDIR)$(prefix)/$(sharedir)/applications
install -m 755 usr/bin/* $(DESTDIR)$(prefix)/$(bindir)
cp -avx usr/share/$(NAME)/* $(DESTDIR)$(prefix)/$(sharedir)/$(NAME)
chmod -R 755 $(DESTDIR)$(prefix)/$(sharedir)/$(NAME)
@for l in $(TRANSLATIONS); do \
mkdir -p $(DESTDIR)$(prefix)/$(localedir)/$$l/LC_MESSAGES; \
msgcat po/$$l.po | msgfmt -o $(DESTDIR)$(prefix)$(localedir)/$$l/LC_MESSAGES/om-welcome.mo - ; \
done
dist:
git archive --format=tar --prefix=$(NAME)-$(VERSION)/ HEAD | xz -2vec -T0 > $(NAME)-$(VERSION).tar.xz;
$(info $(NAME)-$(VERSION).tar.xz is ready)