slitaz-tools rev 601
Makefile: install tools and boxes with PO files to be more standard and avoid many cp in receipt. Also update the README
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Jun 01 19:04:13 2011 +0200 (2011-06-01) |
parents | 5339148bf771 |
children | bb2489a18dc8 |
files | Makefile README tazdrop/Makefile |
line diff
1.1 --- a/Makefile Wed Jun 01 18:09:27 2011 +0200 1.2 +++ b/Makefile Wed Jun 01 19:04:13 2011 +0200 1.3 @@ -7,8 +7,8 @@ 1.4 TOOLS?=scpbox tazbox tazdrop 1.5 TINYUTILS?=scpbox 1.6 LINGUAS?=fr pt 1.7 - 1.8 -all: 1.9 + 1.10 +all: msgfmt 1.11 1.12 # i18n. 1.13 1.14 @@ -46,13 +46,80 @@ 1.15 msgfmt: 1.16 @for p in $(TOOLS); do \ 1.17 for l in $(LINGUAS); do \ 1.18 - echo -n "Compiling $$p $$l mo file... "; \ 1.19 - mkdir -p po/mo/$$l; \ 1.20 - [ -f "po/$$p/$$l.po" ] && msgfmt -o po/mo/$$l/$$p.mo po/$$p/$$l.po; \ 1.21 - echo "done"; \ 1.22 + [ -f "po/$$p/$$l.po" ] && \ 1.23 + echo -n "Compiling $$p $$l mo file... " && \ 1.24 + mkdir -p po/mo/$$l && \ 1.25 + msgfmt -o po/mo/$$l/$$p.mo po/$$p/$$l.po && \ 1.26 + echo "done"; \ 1.27 done; \ 1.28 done; 1.29 1.30 +# Installation 1.31 + 1.32 +install: 1.33 + install -m 0777 -d $(DESTDIR)/sbin 1.34 + install -m 0777 -d $(DESTDIR)/etc/X11 1.35 + install -m 0777 -d $(DESTDIR)$(PREFIX)/bin 1.36 + install -m 0777 -d $(DESTDIR)$(PREFIX)/sbin 1.37 + cp -a rootfs/etc $(DESTDIR) 1.38 + chmod +x $(DESTDIR)/etc/init.d/* 1.39 + cp -a rootfs/usr/share/licenses $(DESTDIR)$(PREFIX)/share 1.40 + # /sbin tools. 1.41 + for i in tazlocale tazkeymap tazhw hwsetup; do \ 1.42 + install -m 0755 tinyutils/$$i $(DESTDIR)/sbin; \ 1.43 + done; 1.44 + # Declare all config files. 1.45 + for file in etc/motd etc/locale.conf etc/keymap.conf etc/TZ \ 1.46 + etc/X11/screen.conf; \ 1.47 + do \ 1.48 + touch $(DESTDIR)/$$file; \ 1.49 + done; 1.50 + # /usr/bin tools. 1.51 + for app in startx history tazdialog editor browser terminal file-manager; \ 1.52 + do \ 1.53 + install -m 0755 tinyutils/$$app $(DESTDIR)$(PREFIX)/bin; \ 1.54 + done; 1.55 + # /usr/sbin sound tools. 1.56 + install -m 0755 tinyutils/soundconf $(DESTDIR)$(PREFIX)/sbin 1.57 + install -m 0755 tinyutils/setmixer $(DESTDIR)$(PREFIX)/sbin 1.58 + # Installer's 1.59 + install -m 0777 -d $(DESTDIR)$(PREFIX)/share/slitaz/messages/en 1.60 + install -m 0755 installer/slitaz-installer $(DESTDIR)$(PREFIX)/bin 1.61 + install -m 0755 installer/tazinst $(DESTDIR)$(PREFIX)/bin 1.62 + install -m 0644 messages/en/installer.msg \ 1.63 + $(DESTDIR)$(PREFIX)/share/slitaz/messages/en 1.64 + 1.65 +install-boxes: 1.66 + install -m 0777 -d $(DESTDIR)/etc/wireless 1.67 + install -m 0777 -d $(DESTDIR)$(PREFIX)/bin 1.68 + install -m 0777 -d $(DESTDIR)$(PREFIX)/lib/slitaz 1.69 + install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale 1.70 + install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications 1.71 + install -m 0777 -d $(DESTDIR)$(PREFIX)/share/pixmaps 1.72 + install -m 0777 -d $(DESTDIR)$(PREFIX)/share/doc 1.73 + install -m 0755 tinyutils/*box $(DESTDIR)$(PREFIX)/bin 1.74 + install -m 0755 tazbox/tazbox $(DESTDIR)$(PREFIX)/bin 1.75 + # Libs 1.76 + install -m 0755 lib/[a-z]* $(DESTDIR)$(PREFIX)/lib/slitaz 1.77 + # Desktop files, icons and doc. 1.78 + install -m 0644 rootfs/usr/share/applications/* \ 1.79 + $(DESTDIR)$(PREFIX)/share/applications 1.80 + install -m 0644 rootfs/usr/share/pixmaps/* \ 1.81 + $(DESTDIR)$(PREFIX)/share/pixmaps 1.82 + cp -a doc $(DESTDIR)$(PREFIX)/share/doc/slitaz-tools 1.83 + # i18n 1.84 + for l in $(LINGUAS); \ 1.85 + do \ 1.86 + install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \ 1.87 + install po/mo/$$l/* $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \ 1.88 + done; 1.89 + # Default English messages (will move to po) 1.90 + install -m 0777 -d $(DESTDIR)$(PREFIX)/share/slitaz/messages/en 1.91 + install -m 0644 messages/en/desktopbox.msg \ 1.92 + $(DESTDIR)$(PREFIX)/share/slitaz/messages/en 1.93 + # Gksu fake for pcmanfm. 1.94 + cd $(DESTDIR)$(PREFIX)/bin && ln -s subox gksu 1.95 + 1.96 clean: 1.97 rm -rf po/mo 1.98 rm -f po/*/*.po~
2.1 --- a/README Wed Jun 01 18:09:27 2011 +0200 2.2 +++ b/README Wed Jun 01 19:04:13 2011 +0200 2.3 @@ -15,17 +15,23 @@ 2.4 2.5 More tools information 2.6 ----------------------- 2.7 +You will find documentation in the doc/ folder and README files for some tools: 2.8 2.9 * installer/README 2.10 * tazbox/README 2.11 + * tazdrop/README 2.12 2.13 2.14 Installation 2.15 ------------ 2.16 -The tools are built and installed through tazwok and the wok, and split 2.17 -into 2 separate packages: one with only ncurses dependencies (for a text 2.18 -system) and one with GTK dependencies (for a graphical system). So make 2.19 -install... 2.20 +The tools are split into 2 separate packages: one with only ncurses dependencies 2.21 +(for a text system) and one with GTK dependencies (for a graphical system). So 2.22 +we have 2 make install and make default to compile PO files. Install's support 2.23 +DESTDIR for packaging: 2.24 + 2.25 +# make 2.26 +# make install 2.27 +# make install-boxes 2.28 2.29 2.30 Translation
3.1 --- a/tazdrop/Makefile Wed Jun 01 18:09:27 2011 +0200 3.2 +++ b/tazdrop/Makefile Wed Jun 01 19:04:13 2011 +0200 3.3 @@ -2,16 +2,23 @@ 3.4 # 3.5 PREFIX?=/usr 3.6 SYSCONFDIR?=/etc/slitaz 3.7 +LINGUAS?=pt 3.8 3.9 # Installation 3.10 3.11 install: 3.12 mkdir -p $(DESTDIR)$(PREFIX)/bin \ 3.13 + $(DESTDIR)$(PREFIX)/share/doc/tazdrop \ 3.14 $(DESTDIR)$(PREFIX)/share/locale \ 3.15 $(DESTDIR)$(PREFIX)/share/applications \ 3.16 $(DESTDIR)$(SYSCONFDIR) 3.17 - cp -a tazdrop $(DESTDIR)$(PREFIX)/bin 3.18 - cp -a *.conf $(DESTDIR)$(SYSCONFDIR) 3.19 - cp -a data/*.desktop $(DESTDIR)$(PREFIX)/share/applications 3.20 - cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale 2>/dev/null || return 0 3.21 - 3.22 + install -m 0777 tazdrop $(DESTDIR)$(PREFIX)/bin 3.23 + install -m 0644 *.conf $(DESTDIR)$(SYSCONFDIR) 3.24 + install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications 3.25 + install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/tazdrop 3.26 + for l in $(LINGUAS); \ 3.27 + do \ 3.28 + install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \ 3.29 + install -m 0644 ../po/mo/$$l/tazdrop.mo \ 3.30 + $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \ 3.31 + done;