cookutils annotate Makefile @ rev 874
modules/compressor: fix compress_manpages(): when there's a lot of manpages (like in openssl package), it found (in the second turn) some of just compressed manpages and compress them again (*.gz.gz)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jan 28 13:01:27 2017 +0200 (2017-01-28) |
parents | c6bbdbfdc285 |
children | 9a70c8fdc40c |
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 |
pankso@362 | 19 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin |
al@857 | 20 install -m 0755 -d $(DESTDIR)$(PREFIX)/libexec/cookutils |
pankso@362 | 21 install -m 0755 -d $(DESTDIR)/var/www/cgi-bin/cooker |
pankso@361 | 22 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications |
pankso@362 | 23 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cook/cooktest |
pankso@361 | 24 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils |
al@857 | 25 install -m 0755 cook $(DESTDIR)$(PREFIX)/bin |
al@857 | 26 install -m 0755 cooks $(DESTDIR)$(PREFIX)/bin |
al@769 | 27 install -m 0755 fix-desktop-file $(DESTDIR)$(PREFIX)/bin |
al@857 | 28 install -m 0755 cooker $(DESTDIR)$(PREFIX)/bin |
al@857 | 29 install -m 0755 cookiso $(DESTDIR)$(PREFIX)/bin |
al@857 | 30 install -m 0755 cooklinux $(DESTDIR)$(PREFIX)/bin |
al@865 | 31 install -m 0755 modules/pkgdb modules/compressor \ |
al@865 | 32 $(DESTDIR)$(PREFIX)/libexec/cookutils |
al@857 | 33 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz |
al@857 | 34 install -m 0644 cook.site $(DESTDIR)/etc/slitaz |
al@857 | 35 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker |
al@857 | 36 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications |
al@857 | 37 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook |
al@857 | 38 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook |
al@857 | 39 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest |
al@857 | 40 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils |
al@857 | 41 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils |
al@857 | 42 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d |
pankso@362 | 43 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi |
al@866 | 44 sed -i "s|@@PREFIX@@|$(PREFIX)|g" $(DESTDIR)$(PREFIX)/bin/cook |
pankso@7 | 45 |
pankso@422 | 46 uninstall-cook: |
pankso@16 | 47 rm -rf \ |
pankso@7 | 48 $(DESTDIR)$(PREFIX)/bin/cook \ |
al@850 | 49 $(DESTDIR)$(PREFIX)/bin/cooks \ |
al@769 | 50 $(DESTDIR)$(PREFIX)/bin/fix-desktop-file \ |
pankso@7 | 51 $(DESTDIR)$(PREFIX)/bin/cooker \ |
pankso@633 | 52 $(DESTDIR)$(PREFIX)/bin/cookiso \ |
pankso@633 | 53 $(DESTDIR)$(PREFIX)/bin/cooklinux \ |
al@857 | 54 $(DESTDIR)$(PREFIX)/libexec/cookutils \ |
pankso@633 | 55 $(DESTDIR)$(PREFIX)/share/cook \ |
pankso@16 | 56 $(DESTDIR)/etc/slitaz/cook.* \ |
pankso@261 | 57 $(DESTDIR)/var/www/cooker |
pankso@361 | 58 |
pankso@422 | 59 # Libcook |
pankso@422 | 60 |
pankso@422 | 61 install-libcook: |
pankso@422 | 62 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@422 | 63 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@422 | 64 |
pankso@422 | 65 uninstall-libcook: |
pankso@422 | 66 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh |
pankso@422 | 67 |
pankso@361 | 68 # Cross |
pankso@361 | 69 |
pankso@361 | 70 install-cross: |
pankso@361 | 71 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin |
pankso@656 | 72 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross |
pankso@361 | 73 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils |
al@857 | 74 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin |
al@857 | 75 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@649 | 76 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross |
pankso@361 | 77 |
pankso@361 | 78 uninstall-cross: |
pankso@361 | 79 rm -rf \ |
pankso@361 | 80 $(DESTDIR)$(PREFIX)/bin/cross \ |
pankso@656 | 81 $(DESTDIR)$(PREFIX)/share/cross \ |
pankso@361 | 82 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt |
al@596 | 83 |
al@596 | 84 # i18n |
al@596 | 85 |
al@596 | 86 pot: |
al@779 | 87 xgettext -o po/cook.pot -kaction -ktitle -k_ -k_n -k_p:1,2 -L Shell -cL10n \ |
al@596 | 88 --copyright-holder="SliTaz Association" \ |
al@596 | 89 --package-name="Cook" \ |
al@596 | 90 --package-version="$(VERSION)" \ |
al@857 | 91 ./cook ./modules.pkgdb |
al@596 | 92 |
al@596 | 93 msgmerge: |
al@596 | 94 @for l in $(LINGUAS); do \ |
al@596 | 95 echo -n "Updating $$l po file."; \ |
al@596 | 96 msgmerge -U po/$$l.po po/cook.pot; \ |
al@596 | 97 done; |
al@596 | 98 |
al@596 | 99 msgfmt: |
al@596 | 100 @for l in $(LINGUAS); do \ |
al@596 | 101 echo "Compiling $$l mo file..."; \ |
al@596 | 102 mkdir -p po/mo/$$l/LC_MESSAGES; \ |
al@596 | 103 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \ |
al@596 | 104 done; |
al@596 | 105 |
al@596 | 106 # Clean source |
al@596 | 107 |
al@596 | 108 clean: |
al@596 | 109 rm -rf po/mo |
al@596 | 110 rm -f po/*.mo |
al@596 | 111 rm -f po/*.*~ |
al@596 | 112 |
al@596 | 113 help: |
al@596 | 114 @echo "make" |
al@596 | 115 @echo " install | uninstall - all" |
al@596 | 116 @echo " install-cook | uninstall-cook - cook" |
al@596 | 117 @echo " install-libcook | uninstall-libcook - libcook" |
al@596 | 118 @echo " install-cross | uninstall-cross - cross" |
al@596 | 119 @echo " pot | msgmerge | msgfmt | clean - i18n" |