slitaz-tools annotate Makefile @ rev 641

Makefile use pt_BR tools po file and tazbox export LANG after locale config on boot so we have keymap config in native language
author Christophe Lincoln <pankso@slitaz.org>
date Sat Jun 18 22:19:50 2011 +0200 (2011-06-18)
parents 04f34d2e0930
children b28d4a6bf467
rev   line source
pankso@447 1 # Makefile for SliTaz tools.
pankso@447 2 # Check the README for more information.
pankso@447 3 #
pankso@447 4 PREFIX?=/usr
pankso@447 5 DOCDIR?=/usr/share/doc
pankso@447 6 DESTDIR?=
pankso@622 7
pankso@622 8 PROJECTS=slitaz-tools slitaz-boxes tazbox tazdrop
pankso@622 9 LINGUAS=fr pt_BR
pankso@601 10
pankso@601 11 all: msgfmt
pankso@447 12
pankso@622 13 help:
pankso@622 14 @echo ""
pankso@622 15 @echo "make: pot msgmerge msgfmt install install-boxes clean"
pankso@622 16 @echo ""
pankso@622 17
pankso@447 18 # i18n.
pankso@447 19
pankso@622 20 tools-pot:
pankso@622 21 @echo -n "Generating SliTaz Tools pot file... "
pankso@622 22 @xgettext -o po/slitaz-tools/slitaz-tools.pot -L Shell \
pankso@622 23 --package-name="SliTaz Tools" \
pankso@628 24 ./tinyutils/tazlocale ./tinyutils/tazkeymap ./tinyutils/setmixer \
pankso@628 25 ./tinyutils/tazx
pankso@622 26 @echo "done"
pankso@622 27
pankso@622 28 boxes-pot:
pankso@622 29 @echo -n "Generating SliTaz Boxes pot file... "
pankso@622 30 @xgettext -o po/slitaz-boxes/slitaz-boxes.pot -L Shell \
pankso@622 31 --package-name="SliTaz Boxes" \
pankso@622 32 ./tinyutils/scpbox
pankso@622 33 @echo "done"
pankso@622 34
pankso@556 35 tazbox-pot:
pankso@569 36 @echo -n "Generating tazbox pot file... "
pankso@569 37 @xgettext -o po/tazbox/tazbox.pot -L Shell \
pankso@553 38 --package-name="TazBox" ./tazbox/tazbox
pankso@569 39 @echo "done"
pankso@553 40
pankso@556 41 tazdrop-pot:
pankso@569 42 @echo -n "Generating tazdrop pot file... "
pankso@569 43 @xgettext -o po/tazdrop/tazdrop.pot -L Shell \
pankso@556 44 --package-name="TazDrop" ./tazdrop/tazdrop
pankso@569 45 @echo "done"
pankso@556 46
pankso@622 47 pot: tools-pot boxes-pot tazbox-pot tazdrop-pot
pankso@590 48
pankso@447 49 msgmerge:
pankso@622 50 @for p in $(PROJECTS); do \
pankso@447 51 for l in $(LINGUAS); do \
pankso@590 52 echo -en "\rUpdating $$p $$l po file."; \
pankso@590 53 [ -f "po/$$p/$$l.po" ] && \
pankso@590 54 msgmerge -U po/$$p/$$l.po po/$$p/$$p.pot; \
pankso@447 55 done; \
pankso@447 56 done;
pankso@447 57
pankso@447 58 msgfmt:
pankso@622 59 @for p in $(PROJECTS); do \
pankso@447 60 for l in $(LINGUAS); do \
pankso@601 61 [ -f "po/$$p/$$l.po" ] && \
pankso@601 62 echo -n "Compiling $$p $$l mo file... " && \
pankso@601 63 mkdir -p po/mo/$$l && \
pankso@601 64 msgfmt -o po/mo/$$l/$$p.mo po/$$p/$$l.po && \
pankso@601 65 echo "done"; \
pankso@447 66 done; \
pankso@447 67 done;
pankso@447 68
pankso@601 69 # Installation
pankso@601 70
pankso@601 71 install:
pankso@601 72 install -m 0777 -d $(DESTDIR)/sbin
pankso@601 73 install -m 0777 -d $(DESTDIR)/etc/X11
pankso@601 74 install -m 0777 -d $(DESTDIR)$(PREFIX)/bin
pankso@601 75 install -m 0777 -d $(DESTDIR)$(PREFIX)/sbin
pankso@602 76 install -m 0777 -d $(DESTDIR)$(PREFIX)/share
pankso@636 77 cp -a rootfs/etc $(DESTDIR)/
pankso@601 78 chmod +x $(DESTDIR)/etc/init.d/*
pankso@601 79 cp -a rootfs/usr/share/licenses $(DESTDIR)$(PREFIX)/share
pankso@601 80 # /sbin tools.
pankso@601 81 for i in tazlocale tazkeymap tazhw hwsetup; do \
pankso@601 82 install -m 0755 tinyutils/$$i $(DESTDIR)/sbin; \
pankso@601 83 done;
pankso@601 84 # Declare all config files.
pankso@622 85 for file in etc/locale.conf etc/keymap.conf etc/TZ etc/X11/screen.conf; \
pankso@601 86 do \
pankso@601 87 touch $(DESTDIR)/$$file; \
pankso@601 88 done;
pankso@601 89 # /usr/bin tools.
pankso@630 90 for app in tazx startx history editor browser terminal file-manager; \
pankso@601 91 do \
pankso@601 92 install -m 0755 tinyutils/$$app $(DESTDIR)$(PREFIX)/bin; \
pankso@601 93 done;
pankso@601 94 # /usr/sbin sound tools.
pankso@601 95 install -m 0755 tinyutils/soundconf $(DESTDIR)$(PREFIX)/sbin
pankso@601 96 install -m 0755 tinyutils/setmixer $(DESTDIR)$(PREFIX)/sbin
pankso@601 97 # Installer's
pankso@601 98 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/slitaz/messages/en
pankso@601 99 install -m 0755 installer/slitaz-installer $(DESTDIR)$(PREFIX)/bin
pankso@601 100 install -m 0755 installer/tazinst $(DESTDIR)$(PREFIX)/bin
pankso@601 101 install -m 0644 messages/en/installer.msg \
pankso@601 102 $(DESTDIR)$(PREFIX)/share/slitaz/messages/en
pankso@636 103 # slitaz-tools i18n
pankso@641 104 for l in $(LINGUAS); \
pankso@641 105 do \
pankso@641 106 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
pankso@641 107 install -m 0644 po/mo/$$l/slitaz-tools.mo \
pankso@641 108 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
pankso@641 109 done;
pankso@601 110
pankso@601 111 install-boxes:
pankso@601 112 install -m 0777 -d $(DESTDIR)/etc/wireless
pankso@601 113 install -m 0777 -d $(DESTDIR)$(PREFIX)/bin
pankso@601 114 install -m 0777 -d $(DESTDIR)$(PREFIX)/lib/slitaz
pankso@601 115 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale
pankso@601 116 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications
pankso@601 117 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/pixmaps
pankso@601 118 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/doc
pankso@601 119 install -m 0755 tinyutils/*box $(DESTDIR)$(PREFIX)/bin
pankso@601 120 install -m 0755 tazbox/tazbox $(DESTDIR)$(PREFIX)/bin
pankso@601 121 # Libs
pankso@601 122 install -m 0755 lib/[a-z]* $(DESTDIR)$(PREFIX)/lib/slitaz
pankso@601 123 # Desktop files, icons and doc.
pankso@601 124 install -m 0644 rootfs/usr/share/applications/* \
pankso@601 125 $(DESTDIR)$(PREFIX)/share/applications
pankso@601 126 install -m 0644 rootfs/usr/share/pixmaps/* \
pankso@601 127 $(DESTDIR)$(PREFIX)/share/pixmaps
pankso@601 128 cp -a doc $(DESTDIR)$(PREFIX)/share/doc/slitaz-tools
pankso@636 129 # i18n.
pankso@601 130 for l in $(LINGUAS); \
pankso@601 131 do \
pankso@601 132 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
pankso@636 133 install -m 0644 po/mo/$$l/*box* \
pankso@610 134 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
pankso@601 135 done;
pankso@601 136 # Default English messages (will move to po)
pankso@601 137 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/slitaz/messages/en
pankso@601 138 install -m 0644 messages/en/desktopbox.msg \
pankso@601 139 $(DESTDIR)$(PREFIX)/share/slitaz/messages/en
pankso@601 140 # Gksu fake for pcmanfm.
pankso@601 141 cd $(DESTDIR)$(PREFIX)/bin && ln -s subox gksu
pankso@601 142
pankso@447 143 clean:
pankso@447 144 rm -rf po/mo
pankso@590 145 rm -f po/*/*.po~