cookutils annotate Makefile @ rev 1109
modules/postcheck: overridden permissions/ownership aren't a problem too
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Dec 03 03:28:01 2018 +0200 (2018-12-03) |
parents | 77291d41f21a |
children |
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@1090 | 37 modules/pack \ |
al@1012 | 38 modules/precheck \ |
al@1090 | 39 modules/postcheck \ |
al@1090 | 40 modules/langdesc \ |
al@865 | 41 $(DESTDIR)$(PREFIX)/libexec/cookutils |
al@857 | 42 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz |
al@857 | 43 install -m 0644 cook.site $(DESTDIR)/etc/slitaz |
al@857 | 44 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker |
al@857 | 45 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications |
al@857 | 46 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook |
al@857 | 47 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook |
al@857 | 48 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest |
al@857 | 49 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils |
al@857 | 50 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils |
al@857 | 51 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d |
pankso@362 | 52 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi |
al@1092 | 53 sed -i "s|@@PREFIX@@|$(PREFIX)|g" \ |
al@1092 | 54 $(DESTDIR)$(PREFIX)/bin/cook \ |
al@1092 | 55 $(DESTDIR)$(PREFIX)/libexec/cookutils/pack |
pankso@7 | 56 |
pankso@422 | 57 uninstall-cook: |
pankso@16 | 58 rm -rf \ |
al@1049 | 59 $(DESTDIR)/bin/uname \ |
pankso@7 | 60 $(DESTDIR)$(PREFIX)/bin/cook \ |
al@850 | 61 $(DESTDIR)$(PREFIX)/bin/cooks \ |
al@769 | 62 $(DESTDIR)$(PREFIX)/bin/fix-desktop-file \ |
pankso@7 | 63 $(DESTDIR)$(PREFIX)/bin/cooker \ |
pankso@633 | 64 $(DESTDIR)$(PREFIX)/bin/cookiso \ |
pankso@633 | 65 $(DESTDIR)$(PREFIX)/bin/cooklinux \ |
al@857 | 66 $(DESTDIR)$(PREFIX)/libexec/cookutils \ |
pankso@633 | 67 $(DESTDIR)$(PREFIX)/share/cook \ |
pankso@16 | 68 $(DESTDIR)/etc/slitaz/cook.* \ |
pankso@261 | 69 $(DESTDIR)/var/www/cooker |
pankso@361 | 70 |
pankso@422 | 71 # Libcook |
pankso@422 | 72 |
pankso@422 | 73 install-libcook: |
pankso@422 | 74 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@422 | 75 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@422 | 76 |
pankso@422 | 77 uninstall-libcook: |
pankso@422 | 78 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh |
pankso@422 | 79 |
pankso@361 | 80 # Cross |
pankso@361 | 81 |
pankso@361 | 82 install-cross: |
pankso@361 | 83 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin |
pankso@656 | 84 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross |
pankso@361 | 85 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils |
al@857 | 86 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin |
al@857 | 87 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@649 | 88 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross |
pankso@361 | 89 |
pankso@361 | 90 uninstall-cross: |
pankso@361 | 91 rm -rf \ |
pankso@361 | 92 $(DESTDIR)$(PREFIX)/bin/cross \ |
pankso@656 | 93 $(DESTDIR)$(PREFIX)/share/cross \ |
pankso@361 | 94 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt |
al@596 | 95 |
al@596 | 96 # i18n |
al@596 | 97 |
al@596 | 98 pot: |
al@779 | 99 xgettext -o po/cook.pot -kaction -ktitle -k_ -k_n -k_p:1,2 -L Shell -cL10n \ |
al@596 | 100 --copyright-holder="SliTaz Association" \ |
al@596 | 101 --package-name="Cook" \ |
al@596 | 102 --package-version="$(VERSION)" \ |
al@857 | 103 ./cook ./modules.pkgdb |
al@596 | 104 |
al@596 | 105 msgmerge: |
al@596 | 106 @for l in $(LINGUAS); do \ |
al@596 | 107 echo -n "Updating $$l po file."; \ |
al@596 | 108 msgmerge -U po/$$l.po po/cook.pot; \ |
al@596 | 109 done; |
al@596 | 110 |
al@596 | 111 msgfmt: |
al@596 | 112 @for l in $(LINGUAS); do \ |
al@596 | 113 echo "Compiling $$l mo file..."; \ |
al@596 | 114 mkdir -p po/mo/$$l/LC_MESSAGES; \ |
al@596 | 115 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \ |
al@596 | 116 done; |
al@596 | 117 |
al@596 | 118 # Clean source |
al@596 | 119 |
al@596 | 120 clean: |
al@596 | 121 rm -rf po/mo |
al@596 | 122 rm -f po/*.mo |
al@596 | 123 rm -f po/*.*~ |
al@596 | 124 |
al@596 | 125 help: |
al@596 | 126 @echo "make" |
al@596 | 127 @echo " install | uninstall - all" |
al@596 | 128 @echo " install-cook | uninstall-cook - cook" |
al@596 | 129 @echo " install-libcook | uninstall-libcook - libcook" |
al@596 | 130 @echo " install-cross | uninstall-cross - cross" |
al@596 | 131 @echo " pot | msgmerge | msgfmt | clean - i18n" |