tazpkg annotate Makefile @ rev 644
Added tag 5.1.3 for changeset 21c10ed6e99e
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jan 05 17:56:40 2014 +0100 (2014-01-05) |
parents | 5317ffe7bfbb |
children | 91458aa88694 |
rev | line source |
---|---|
al@633 | 1 # Makefile for TazPkg. |
pankso@5 | 2 # |
pankso@5 | 3 PREFIX?=/usr |
erjo@259 | 4 DOCDIR?=$(PREFIX)/share/doc |
pankso@307 | 5 SYSCONFDIR?=/etc/slitaz |
pankso@343 | 6 DESTDIR?= |
al@633 | 7 LINGUAS?=el es fr pl pt_BR ru sv |
pankso@5 | 8 |
pankso@453 | 9 VERSION:=$(shell grep ^VERSION=[0-9] tazpkg | cut -d '=' -f 2) |
pankso@452 | 10 |
erjo@529 | 11 tmpdir = tar-install/tazpkg-$(VERSION) |
erjo@529 | 12 tarball = tazpkg-$(VERSION).tar.gz |
erjo@529 | 13 |
pankso@500 | 14 all: msgfmt |
al@633 | 15 |
pankso@343 | 16 # i18n. |
pankso@343 | 17 |
pankso@343 | 18 pot: |
al@633 | 19 xgettext -o po/tazpkg.pot -L Shell \ |
al@633 | 20 --package-name=TazPkg \ |
al@633 | 21 --package-version="$(VERSION)" -kaction -ktitle \ |
al@633 | 22 ./tazpkg ./tazpkg-box ./pkgs ./pkgs.cgi ./tazpkg-notify |
al@633 | 23 |
pankso@343 | 24 msgmerge: |
pankso@343 | 25 @for l in $(LINGUAS); do \ |
al@633 | 26 if [ -f "po/$$l.po" ]; then \ |
pankso@472 | 27 echo -n "Updating $$l po file."; \ |
al@633 | 28 msgmerge -U po/$$l.po po/tazpkg.pot ; \ |
pankso@471 | 29 fi; \ |
pankso@499 | 30 done |
pankso@343 | 31 |
pankso@343 | 32 msgfmt: |
pankso@343 | 33 @for l in $(LINGUAS); do \ |
al@633 | 34 if [ -f "po/$$l.po" ]; then \ |
pankso@500 | 35 echo -n "Compiling tazpkg $$l mo file... "; \ |
pankso@472 | 36 mkdir -p po/mo/$$l/LC_MESSAGES; \ |
pankso@472 | 37 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpkg.mo \ |
al@633 | 38 po/$$l.po ; \ |
pankso@500 | 39 echo "done"; \ |
pankso@472 | 40 fi; \ |
pankso@343 | 41 done; |
pankso@343 | 42 |
pankso@343 | 43 # Installation. |
pankso@343 | 44 |
erjo@529 | 45 install: msgfmt |
al@633 | 46 # TazPkg command line interface |
pankso@345 | 47 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin |
pankso@345 | 48 install -m 0777 tazpkg $(DESTDIR)$(PREFIX)/bin |
al@633 | 49 # TazPkg-box GUI |
pankso@473 | 50 install -m 0777 tazpkg-notify $(DESTDIR)$(PREFIX)/bin |
pankso@542 | 51 install -m 0777 tazpkg-box $(DESTDIR)$(PREFIX)/bin |
pankso@345 | 52 # Configuration files |
pankso@345 | 53 install -m 0755 -d $(DESTDIR)$(SYSCONFDIR) |
pankso@345 | 54 install -m 0644 tazpkg.conf $(DESTDIR)$(SYSCONFDIR) |
pankso@345 | 55 # Documentation |
pankso@345 | 56 install -m 0755 -d $(DESTDIR)$(DOCDIR)/tazpkg |
pankso@345 | 57 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazpkg |
al@633 | 58 # TazPanel files |
pascal@627 | 59 install -m 0755 -d $(DESTDIR)/var/www/tazpanel/menu.d |
pascal@627 | 60 cp -a pkgs.cgi $(DESTDIR)/var/www/tazpanel |
pascal@627 | 61 cp -a pkgs $(DESTDIR)/var/www/tazpanel/menu.d |
pankso@345 | 62 # The i18n files |
pankso@508 | 63 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale |
pankso@500 | 64 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale |
pankso@343 | 65 # Desktop integration |
pankso@343 | 66 mkdir -p $(DESTDIR)$(PREFIX)/share |
pankso@343 | 67 cp -a applications $(DESTDIR)$(PREFIX)/share |
pankso@362 | 68 cp -a mime $(DESTDIR)$(PREFIX)/share |
pankso@362 | 69 cp -a pixmaps $(DESTDIR)$(PREFIX)/share |
pankso@641 | 70 # TazPKG Notify XDG autostart |
pankso@641 | 71 mkdir -p $(DESTDIR)/etc/xdg |
pankso@641 | 72 cp -a xdg/autostart $(DESTDIR)/etc/xdg |
pankso@641 | 73 |
pankso@343 | 74 |
pankso@343 | 75 # Uninstallation and clean-up commands. |
pankso@5 | 76 |
pankso@5 | 77 uninstall: |
pankso@343 | 78 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg |
pankso@542 | 79 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg-box |
pascal@627 | 80 rm -f $(DESTDIR)$(PREFIX)/var/www/tazpanel/menu.d/pkgs |
pascal@627 | 81 rm -f $(DESTDIR)$(PREFIX)/var/www/tazpanel/pkgs.cgi |
pankso@493 | 82 rm -rf $(DESTDIR)$(PREFIX)/tazpkg-notify |
pankso@343 | 83 rm -rf $(DESTDIR)$(DOCDIR)/tazpkg |
pankso@343 | 84 rm -f $(DESTDIR)$(SYSCONFDIR)/tazpkg.conf |
pankso@343 | 85 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg*.mo |
erjo@259 | 86 |
pankso@343 | 87 clean: |
pankso@343 | 88 rm -rf _pkg |
erjo@529 | 89 rm -rf tar-install |
pankso@343 | 90 rm -rf po/mo |
al@633 | 91 rm -f po/*~ |
al@633 | 92 rm -f po/*.mo |
pankso@343 | 93 |
erjo@529 | 94 |
erjo@529 | 95 targz: |
erjo@529 | 96 rm -rf ${tmpdir} |
erjo@529 | 97 mkdir -p ${tmpdir} |
erjo@529 | 98 |
erjo@529 | 99 make DESTDIR=${tmpdir} install |
erjo@529 | 100 |
erjo@529 | 101 cd tar-install ; \ |
erjo@529 | 102 tar cvzf ${tarball} tazpkg-$(VERSION) ; \ |
erjo@529 | 103 cd - |
erjo@529 | 104 |
erjo@529 | 105 @echo "** Tarball successfully created in tar-install/${tarball}" |
al@633 | 106 |
al@633 | 107 help: |
al@633 | 108 @echo "make [ pot | msgmerge | msgfmt | all | install | uninstall | clear | targz ]" |