Skip to content

Commit ef5eadd

Browse files
committedFeb 28, 2016
Build and install l10n files.
1 parent 8cff2a1 commit ef5eadd

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed
 

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
autom4te.cache/
2+
debian/
23
man/Makefile
34
perl/MYMETA.json
45
perl/MYMETA.yml
56
perl/Makefile
67
perl/blib/
78
perl/pm_to_blib
9+
po/.build
810
*~

‎Makefile

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
all:
1+
LOCALEDIR=/usr/share/locale
2+
3+
all: mo-files
24
cd perl && perl Makefile.PL PREFIX=$(PREFIX) INSTALLDIRS=vendor
35
cd perl && $(MAKE)
46

@@ -32,11 +34,16 @@ install: all
3234
mkdir -p "$(DESTDIR)/usr/lib/needrestart"
3335
cp lib/vmlinuz-get-version "$(DESTDIR)/usr/lib/needrestart/"
3436
cp lib/notify.d.sh "$(DESTDIR)/usr/lib/needrestart/"
37+
38+
mkdir -p "$(DESTDIR)$(LOCALEDIR)"
39+
cp -r po/.build/* "$(DESTDIR)$(LOCALEDIR)/"
3540

3641
clean:
37-
[ ! -f perl/Makefile ] || ( cd perl && $(MAKE) realclean )
42+
[ ! -f perl/Makefile ] || ( cd perl && $(MAKE) realclean )
43+
rm -rf po/.build
44+
3845

39-
pot: po/needrestart/messages.pot po/needrestart-notify/messages.pot
46+
pot-files: po/needrestart/messages.pot po/needrestart-notify/messages.pot
4047

4148
po/needrestart/messages.pot: needrestart
4249
xgettext -o $@ --msgid-bugs-address=thomas@fiasko-nw.net \
@@ -49,3 +56,8 @@ po/needrestart-notify/messages.pot: ex/notify.d/*-*
4956
xgettext -o $@ --msgid-bugs-address=thomas@fiasko-nw.net \
5057
--package-name=needrestart-notify --package-version=2.7 \
5158
--language=shell $^
59+
60+
61+
mo-files:
62+
make -C po/needrestart
63+
make -C po/needrestart-notify

‎po/needrestart-notify/Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
TEXTDOMAIN:=needrestart-notify
2+
3+
all:
4+
for po in $(wildcard *.po); do \
5+
lang=$$(basename -s .po $$po); \
6+
mkdir -p ../.build/$$lang/LC_MESSAGES; \
7+
msgfmt -o ../.build/$$lang/LC_MESSAGES/$(TEXTDOMAIN).mo $$po; \
8+
done

‎po/needrestart/Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
TEXTDOMAIN:=needrestart
2+
3+
all:
4+
for po in $(wildcard *.po); do \
5+
lang=$$(basename -s .po $$po); \
6+
mkdir -p ../.build/$$lang/LC_MESSAGES; \
7+
msgfmt -o ../.build/$$lang/LC_MESSAGES/$(TEXTDOMAIN).mo $$po; \
8+
done

0 commit comments

Comments
 (0)
Please sign in to comment.