slitaz-tools annotate Makefile @ rev 734
tazinst: fix: : Erreur 1 : mkfs. n'est pas install?
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Wed Apr 25 21:46:48 2012 +0200 (2012-04-25) |
parents | 9dfa90926bf3 |
children | 96a05e0a165d |
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 |
domcox@662 | 8 PROJECTS=slitaz-tools slitaz-boxes tazbox tazinst tazdrop |
domcox@665 | 9 LINGUAS=es_AR 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" |
domcox@655 | 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 |
domcox@655 | 47 tazinst-pot: |
domcox@655 | 48 @echo -n "Generating tazinst pot file... " |
domcox@659 | 49 @xgettext -o po/tazinst/tazinst.pot -L Shell \ |
domcox@659 | 50 --package-name="Tazinst" ./installer/tazinst |
domcox@655 | 51 @echo "done" |
domcox@655 | 52 |
domcox@655 | 53 pot: tools-pot boxes-pot tazbox-pot tazdrop-pot tazinst-pot |
pankso@590 | 54 |
pankso@447 | 55 msgmerge: |
pankso@622 | 56 @for p in $(PROJECTS); do \ |
pankso@447 | 57 for l in $(LINGUAS); do \ |
pankso@590 | 58 echo -en "\rUpdating $$p $$l po file."; \ |
pankso@590 | 59 [ -f "po/$$p/$$l.po" ] && \ |
pankso@590 | 60 msgmerge -U po/$$p/$$l.po po/$$p/$$p.pot; \ |
pankso@447 | 61 done; \ |
pankso@447 | 62 done; |
pankso@447 | 63 |
pankso@447 | 64 msgfmt: |
pankso@622 | 65 @for p in $(PROJECTS); do \ |
pankso@447 | 66 for l in $(LINGUAS); do \ |
pankso@601 | 67 [ -f "po/$$p/$$l.po" ] && \ |
pankso@601 | 68 echo -n "Compiling $$p $$l mo file... " && \ |
pankso@601 | 69 mkdir -p po/mo/$$l && \ |
pankso@601 | 70 msgfmt -o po/mo/$$l/$$p.mo po/$$p/$$l.po && \ |
pankso@601 | 71 echo "done"; \ |
pankso@447 | 72 done; \ |
pankso@447 | 73 done; |
pankso@447 | 74 |
pankso@601 | 75 # Installation |
pankso@601 | 76 |
pankso@601 | 77 install: |
pankso@601 | 78 install -m 0777 -d $(DESTDIR)/sbin |
pankso@601 | 79 install -m 0777 -d $(DESTDIR)/etc/X11 |
pankso@601 | 80 install -m 0777 -d $(DESTDIR)$(PREFIX)/bin |
pankso@601 | 81 install -m 0777 -d $(DESTDIR)$(PREFIX)/sbin |
pankso@602 | 82 install -m 0777 -d $(DESTDIR)$(PREFIX)/share |
pankso@636 | 83 cp -a rootfs/etc $(DESTDIR)/ |
pankso@601 | 84 chmod +x $(DESTDIR)/etc/init.d/* |
pankso@601 | 85 cp -a rootfs/usr/share/licenses $(DESTDIR)$(PREFIX)/share |
pankso@601 | 86 # /sbin tools. |
pankso@601 | 87 for i in tazlocale tazkeymap tazhw hwsetup; do \ |
pankso@601 | 88 install -m 0755 tinyutils/$$i $(DESTDIR)/sbin; \ |
pankso@601 | 89 done; |
pankso@601 | 90 # Declare all config files. |
pankso@622 | 91 for file in etc/locale.conf etc/keymap.conf etc/TZ etc/X11/screen.conf; \ |
pankso@601 | 92 do \ |
pankso@601 | 93 touch $(DESTDIR)/$$file; \ |
pankso@601 | 94 done; |
pankso@601 | 95 # /usr/bin tools. |
pankso@630 | 96 for app in tazx startx history editor browser terminal file-manager; \ |
pankso@601 | 97 do \ |
pankso@601 | 98 install -m 0755 tinyutils/$$app $(DESTDIR)$(PREFIX)/bin; \ |
pankso@601 | 99 done; |
pankso@601 | 100 # /usr/sbin sound tools. |
pankso@601 | 101 install -m 0755 tinyutils/soundconf $(DESTDIR)$(PREFIX)/sbin |
pankso@601 | 102 install -m 0755 tinyutils/setmixer $(DESTDIR)$(PREFIX)/sbin |
domcox@655 | 103 # tazinst |
domcox@665 | 104 install -m 0755 installer/tazinst $(DESTDIR)$(PREFIX)/sbin |
domcox@665 | 105 for l in $(LINGUAS); do \ |
domcox@665 | 106 for i in `ls po/mo/$$l/tazinst.mo` ; do \ |
domcox@665 | 107 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \ |
domcox@665 | 108 install -m 0644 po/mo/$$l/tazinst.mo \ |
domcox@665 | 109 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \ |
domcox@665 | 110 done \ |
domcox@665 | 111 done |
pankso@636 | 112 # slitaz-tools i18n |
pankso@641 | 113 for l in $(LINGUAS); \ |
pankso@641 | 114 do \ |
pankso@641 | 115 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \ |
pankso@641 | 116 install -m 0644 po/mo/$$l/slitaz-tools.mo \ |
pankso@641 | 117 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \ |
pankso@641 | 118 done; |
pankso@601 | 119 |
pankso@601 | 120 install-boxes: |
pankso@601 | 121 install -m 0777 -d $(DESTDIR)/etc/wireless |
pankso@601 | 122 install -m 0777 -d $(DESTDIR)$(PREFIX)/bin |
pankso@601 | 123 install -m 0777 -d $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@601 | 124 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale |
pankso@601 | 125 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications |
pankso@601 | 126 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/pixmaps |
pankso@601 | 127 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/doc |
pankso@601 | 128 install -m 0755 tinyutils/*box $(DESTDIR)$(PREFIX)/bin |
pankso@601 | 129 install -m 0755 tazbox/tazbox $(DESTDIR)$(PREFIX)/bin |
pankso@601 | 130 # Libs |
pankso@601 | 131 install -m 0755 lib/[a-z]* $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@601 | 132 # Desktop files, icons and doc. |
pankso@601 | 133 install -m 0644 rootfs/usr/share/applications/* \ |
pankso@601 | 134 $(DESTDIR)$(PREFIX)/share/applications |
pankso@601 | 135 install -m 0644 rootfs/usr/share/pixmaps/* \ |
pankso@601 | 136 $(DESTDIR)$(PREFIX)/share/pixmaps |
pankso@601 | 137 cp -a doc $(DESTDIR)$(PREFIX)/share/doc/slitaz-tools |
pankso@636 | 138 # i18n. |
pankso@601 | 139 for l in $(LINGUAS); \ |
pankso@601 | 140 do \ |
pankso@601 | 141 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \ |
pankso@636 | 142 install -m 0644 po/mo/$$l/*box* \ |
pankso@610 | 143 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \ |
pankso@601 | 144 done; |
pankso@601 | 145 # Default English messages (will move to po) |
pankso@601 | 146 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/slitaz/messages/en |
pankso@601 | 147 install -m 0644 messages/en/desktopbox.msg \ |
pankso@601 | 148 $(DESTDIR)$(PREFIX)/share/slitaz/messages/en |
pankso@601 | 149 # Gksu fake for pcmanfm. |
pankso@601 | 150 cd $(DESTDIR)$(PREFIX)/bin && ln -s subox gksu |
domcox@655 | 151 |
pankso@447 | 152 clean: |
pankso@447 | 153 rm -rf po/mo |
pankso@590 | 154 rm -f po/*/*.po~ |