cookutils annotate Makefile @ rev 1059
modules/pkgdb: provide "atomic" update now
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue May 29 04:09:44 2018 +0300 (2018-05-29) |
parents | 51460e8c74d7 |
children | 77291d41f21a |
rev | line source |
---|---|
pankso@7 | 1 # Makefile for SliTaz Cooker. |
pankso@7 | 2 # |
pankso@7 | 3 |
al@857 | 4 PREFIX ?= /usr |
al@857 | 5 DESTDIR ?= |
al@863 | 6 LINGUAS ?= fr ja pt_BR ru zh_CN zh_TW |
al@857 | 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 |
al@1049 | 19 install -m 0755 -d $(DESTDIR)/bin |
pankso@362 | 20 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin |
al@857 | 21 install -m 0755 -d $(DESTDIR)$(PREFIX)/libexec/cookutils |
pankso@362 | 22 install -m 0755 -d $(DESTDIR)/var/www/cgi-bin/cooker |
pankso@361 | 23 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications |
pankso@362 | 24 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cook/cooktest |
pankso@361 | 25 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils |
al@1049 | 26 install -m 0755 uname $(DESTDIR)/bin |
al@857 | 27 install -m 0755 cook $(DESTDIR)$(PREFIX)/bin |
al@857 | 28 install -m 0755 cooks $(DESTDIR)$(PREFIX)/bin |
al@769 | 29 install -m 0755 fix-desktop-file $(DESTDIR)$(PREFIX)/bin |
al@857 | 30 install -m 0755 cooker $(DESTDIR)$(PREFIX)/bin |
al@857 | 31 install -m 0755 cookiso $(DESTDIR)$(PREFIX)/bin |
al@857 | 32 install -m 0755 cooklinux $(DESTDIR)$(PREFIX)/bin |
al@932 | 33 install -m 0755 modules/pkgdb \ |
al@932 | 34 modules/compressor \ |
al@932 | 35 modules/deps \ |
al@999 | 36 modules/mk_pkg_receipt \ |
al@1012 | 37 modules/precheck \ |
al@865 | 38 $(DESTDIR)$(PREFIX)/libexec/cookutils |
al@857 | 39 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz |
al@857 | 40 install -m 0644 cook.site $(DESTDIR)/etc/slitaz |
al@857 | 41 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker |
al@857 | 42 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications |
al@857 | 43 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook |
al@857 | 44 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook |
al@857 | 45 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest |
al@857 | 46 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils |
al@857 | 47 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils |
al@857 | 48 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d |
pankso@362 | 49 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi |
al@866 | 50 sed -i "s|@@PREFIX@@|$(PREFIX)|g" $(DESTDIR)$(PREFIX)/bin/cook |
pankso@7 | 51 |
pankso@422 | 52 uninstall-cook: |
pankso@16 | 53 rm -rf \ |
al@1049 | 54 $(DESTDIR)/bin/uname \ |
pankso@7 | 55 $(DESTDIR)$(PREFIX)/bin/cook \ |
al@850 | 56 $(DESTDIR)$(PREFIX)/bin/cooks \ |
al@769 | 57 $(DESTDIR)$(PREFIX)/bin/fix-desktop-file \ |
pankso@7 | 58 $(DESTDIR)$(PREFIX)/bin/cooker \ |
pankso@633 | 59 $(DESTDIR)$(PREFIX)/bin/cookiso \ |
pankso@633 | 60 $(DESTDIR)$(PREFIX)/bin/cooklinux \ |
al@857 | 61 $(DESTDIR)$(PREFIX)/libexec/cookutils \ |
pankso@633 | 62 $(DESTDIR)$(PREFIX)/share/cook \ |
pankso@16 | 63 $(DESTDIR)/etc/slitaz/cook.* \ |
pankso@261 | 64 $(DESTDIR)/var/www/cooker |
pankso@361 | 65 |
pankso@422 | 66 # Libcook |
pankso@422 | 67 |
pankso@422 | 68 install-libcook: |
pankso@422 | 69 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@422 | 70 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@422 | 71 |
pankso@422 | 72 uninstall-libcook: |
pankso@422 | 73 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh |
pankso@422 | 74 |
pankso@361 | 75 # Cross |
pankso@361 | 76 |
pankso@361 | 77 install-cross: |
pankso@361 | 78 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin |
pankso@656 | 79 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross |
pankso@361 | 80 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils |
al@857 | 81 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin |
al@857 | 82 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@649 | 83 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross |
pankso@361 | 84 |
pankso@361 | 85 uninstall-cross: |
pankso@361 | 86 rm -rf \ |
pankso@361 | 87 $(DESTDIR)$(PREFIX)/bin/cross \ |
pankso@656 | 88 $(DESTDIR)$(PREFIX)/share/cross \ |
pankso@361 | 89 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt |
al@596 | 90 |
al@596 | 91 # i18n |
al@596 | 92 |
al@596 | 93 pot: |
al@779 | 94 xgettext -o po/cook.pot -kaction -ktitle -k_ -k_n -k_p:1,2 -L Shell -cL10n \ |
al@596 | 95 --copyright-holder="SliTaz Association" \ |
al@596 | 96 --package-name="Cook" \ |
al@596 | 97 --package-version="$(VERSION)" \ |
al@857 | 98 ./cook ./modules.pkgdb |
al@596 | 99 |
al@596 | 100 msgmerge: |
al@596 | 101 @for l in $(LINGUAS); do \ |
al@596 | 102 echo -n "Updating $$l po file."; \ |
al@596 | 103 msgmerge -U po/$$l.po po/cook.pot; \ |
al@596 | 104 done; |
al@596 | 105 |
al@596 | 106 msgfmt: |
al@596 | 107 @for l in $(LINGUAS); do \ |
al@596 | 108 echo "Compiling $$l mo file..."; \ |
al@596 | 109 mkdir -p po/mo/$$l/LC_MESSAGES; \ |
al@596 | 110 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \ |
al@596 | 111 done; |
al@596 | 112 |
al@596 | 113 # Clean source |
al@596 | 114 |
al@596 | 115 clean: |
al@596 | 116 rm -rf po/mo |
al@596 | 117 rm -f po/*.mo |
al@596 | 118 rm -f po/*.*~ |
al@596 | 119 |
al@596 | 120 help: |
al@596 | 121 @echo "make" |
al@596 | 122 @echo " install | uninstall - all" |
al@596 | 123 @echo " install-cook | uninstall-cook - cook" |
al@596 | 124 @echo " install-libcook | uninstall-libcook - libcook" |
al@596 | 125 @echo " install-cross | uninstall-cross - cross" |
al@596 | 126 @echo " pot | msgmerge | msgfmt | clean - i18n" |