cookutils annotate Makefile @ rev 604
cooker.cgi: fix files= output (thanks Aleksej)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jul 26 17:55:18 2013 +0000 (2013-07-26) |
parents | 50cd87593dae |
children | dab2c8b677a9 |
rev | line source |
---|---|
pankso@7 | 1 # Makefile for SliTaz Cooker. |
pankso@7 | 2 # |
pankso@7 | 3 |
pankso@7 | 4 PREFIX?=/usr |
pankso@7 | 5 DESTDIR?= |
al@596 | 6 LINGUAS?=ru |
al@596 | 7 VERSION:=$(shell grep ^VERSION cook | cut -d'=' -f2) |
pankso@7 | 8 |
pankso@7 | 9 all: |
pankso@7 | 10 |
pankso@422 | 11 install: install-cook install-libcook install-cross |
pankso@422 | 12 uninstall: uninstall-cook uninstall-libcook uninstall-cross |
pankso@422 | 13 |
pankso@422 | 14 # Cook |
pankso@422 | 15 |
pankso@422 | 16 install-cook: |
pankso@361 | 17 install -m 0755 -d $(DESTDIR)/etc/slitaz |
pankso@362 | 18 install -m 0755 -d $(DESTDIR)/etc/init.d |
pankso@362 | 19 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin |
pankso@362 | 20 install -m 0755 -d $(DESTDIR)/var/www/cgi-bin/cooker |
pankso@361 | 21 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications |
pankso@362 | 22 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cook/cooktest |
pankso@361 | 23 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@261 | 24 install -m 0755 cook $(DESTDIR)$(PREFIX)/bin |
pankso@261 | 25 install -m 0755 cooker $(DESTDIR)$(PREFIX)/bin |
pankso@320 | 26 install -m 0755 cookiso $(DESTDIR)$(PREFIX)/bin |
pankso@7 | 27 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz |
pankso@7 | 28 install -m 0644 cook.site $(DESTDIR)/etc/slitaz |
pankso@362 | 29 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker |
pankso@362 | 30 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications |
pankso@362 | 31 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook |
pankso@362 | 32 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook |
pankso@362 | 33 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest |
pankso@362 | 34 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@362 | 35 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@362 | 36 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d |
pankso@362 | 37 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi |
pankso@7 | 38 |
pankso@422 | 39 uninstall-cook: |
pankso@16 | 40 rm -rf \ |
pankso@7 | 41 $(DESTDIR)$(PREFIX)/bin/cook \ |
pankso@7 | 42 $(DESTDIR)$(PREFIX)/bin/cooker \ |
pankso@16 | 43 $(DESTDIR)/etc/slitaz/cook.* \ |
pankso@261 | 44 $(DESTDIR)/var/www/cooker |
pankso@361 | 45 |
pankso@422 | 46 # Libcook |
pankso@422 | 47 |
pankso@422 | 48 install-libcook: |
pankso@422 | 49 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@422 | 50 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@422 | 51 |
pankso@422 | 52 uninstall-libcook: |
pankso@422 | 53 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh |
pankso@422 | 54 |
pankso@361 | 55 # Cross |
pankso@361 | 56 |
pankso@361 | 57 install-cross: |
pankso@361 | 58 install -m 0755 -d $(DESTDIR)/etc/slitaz |
pankso@361 | 59 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin |
pankso@361 | 60 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@361 | 61 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin |
pankso@361 | 62 install -m 0644 cross.conf $(DESTDIR)/etc/slitaz |
pankso@361 | 63 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@361 | 64 |
pankso@361 | 65 uninstall-cross: |
pankso@361 | 66 rm -rf \ |
pankso@361 | 67 $(DESTDIR)$(PREFIX)/bin/cross \ |
pankso@361 | 68 $(DESTDIR)/etc/slitaz/cross.conf \ |
pankso@361 | 69 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt |
al@596 | 70 |
al@596 | 71 # i18n |
al@596 | 72 |
al@596 | 73 pot: |
al@596 | 74 xgettext -o po/cook.pot -k_ -k_n -L Shell -cL10n \ |
al@596 | 75 --copyright-holder="SliTaz Association" \ |
al@596 | 76 --package-name="Cook" \ |
al@596 | 77 --package-version="$(VERSION)" \ |
al@596 | 78 ./cook |
al@596 | 79 |
al@596 | 80 msgmerge: |
al@596 | 81 @for l in $(LINGUAS); do \ |
al@596 | 82 echo -n "Updating $$l po file."; \ |
al@596 | 83 msgmerge -U po/$$l.po po/cook.pot; \ |
al@596 | 84 done; |
al@596 | 85 |
al@596 | 86 msgfmt: |
al@596 | 87 @for l in $(LINGUAS); do \ |
al@596 | 88 echo "Compiling $$l mo file..."; \ |
al@596 | 89 mkdir -p po/mo/$$l/LC_MESSAGES; \ |
al@596 | 90 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \ |
al@596 | 91 done; |
al@596 | 92 |
al@596 | 93 # Clean source |
al@596 | 94 |
al@596 | 95 clean: |
al@596 | 96 rm -rf po/mo |
al@596 | 97 rm -f po/*.mo |
al@596 | 98 rm -f po/*.*~ |
al@596 | 99 |
al@596 | 100 help: |
al@596 | 101 @echo "make" |
al@596 | 102 @echo " install | uninstall - all" |
al@596 | 103 @echo " install-cook | uninstall-cook - cook" |
al@596 | 104 @echo " install-libcook | uninstall-libcook - libcook" |
al@596 | 105 @echo " install-cross | uninstall-cross - cross" |
al@596 | 106 @echo " pot | msgmerge | msgfmt | clean - i18n" |