tazpkg annotate Makefile @ rev 521

tazpkg: Fixed the 'can't cd to .' errors again. Using 2>/dev/null to PACKAGE_DIR to stop the error.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Aug 08 19:21:29 2011 +0000 (2011-08-08)
parents 3c5a8949732f
children 22f7288b8253
rev   line source
pankso@5 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?=
pankso@507 7 LINGUAS?=fr pt_BR
pankso@5 8
pankso@453 9 VERSION:=$(shell grep ^VERSION=[0-9] tazpkg | cut -d '=' -f 2)
pankso@452 10
pankso@500 11 all: msgfmt
erjo@259 12
pankso@343 13 # i18n.
pankso@343 14
pankso@343 15 pot:
pankso@451 16 xgettext -o po/tazpkg/tazpkg.pot -L Shell \
pankso@452 17 --package-name=Tazpkg \
pankso@452 18 --package-version="$(VERSION)" ./tazpkg
pankso@451 19 xgettext -o po/tazpkg-notify/tazpkg-notify.pot -L Shell \
pankso@452 20 --package-name="Tazpkg Notification" \
pankso@452 21 --package-version="$(VERSION)" ./tazpkg-notify
pankso@343 22
pankso@343 23 msgmerge:
pankso@343 24 @for l in $(LINGUAS); do \
pankso@500 25 if [ -f "po/tazpkg/$$l.po" ]; then \
pankso@472 26 echo -n "Updating $$l po file."; \
pankso@472 27 msgmerge -U po/tazpkg/$$l.po po/tazpkg/tazpkg.pot ; \
pankso@472 28 fi; \
pankso@500 29 if [ -f "po/tazpkg-notify/$$l.po" ]; then \
pankso@472 30 echo -n "Updating $$l po file."; \
pankso@499 31 msgmerge -U po/tazpkg-notify/$$l.po po/tazpkg-notify/tazpkg-notify.pot; \
pankso@471 32 fi; \
pankso@499 33 done
pankso@343 34
pankso@343 35 msgfmt:
pankso@343 36 @for l in $(LINGUAS); do \
pankso@500 37 if [ -f "po/tazpkg/$$l.po" ]; then \
pankso@500 38 echo -n "Compiling tazpkg $$l mo file... "; \
pankso@472 39 mkdir -p po/mo/$$l/LC_MESSAGES; \
pankso@472 40 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpkg.mo \
pankso@472 41 po/tazpkg/$$l.po ; \
pankso@500 42 echo "done"; \
pankso@472 43 fi; \
pankso@500 44 if [ -f "po/tazpkg-notify/$$l.po" ]; then \
pankso@500 45 echo -n "Compiling tazpkg-notify $$l mo file... "; \
pankso@472 46 mkdir -p po/mo/$$l/LC_MESSAGES; \
pankso@472 47 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpkg-notify.mo \
pankso@472 48 po/tazpkg-notify/$$l.po ; \
pankso@500 49 echo "done"; \
pankso@472 50 fi; \
pankso@343 51 done;
pankso@343 52
pankso@343 53 # Installation.
pankso@343 54
pankso@473 55 install:
pankso@345 56 # Tazpkg command line interface
pankso@345 57 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
pankso@345 58 install -m 0777 tazpkg $(DESTDIR)$(PREFIX)/bin
pankso@351 59 # Tazpkgbox GUI
pankso@473 60 install -m 0777 tazpkg-notify $(DESTDIR)$(PREFIX)/bin
pankso@360 61 install -m 0777 tazpkgbox-install $(DESTDIR)$(PREFIX)/bin
pankso@345 62 # Configuration files
pankso@345 63 install -m 0755 -d $(DESTDIR)$(SYSCONFDIR)
pankso@345 64 install -m 0644 tazpkg.conf $(DESTDIR)$(SYSCONFDIR)
pankso@345 65 # Documentation
pankso@345 66 install -m 0755 -d $(DESTDIR)$(DOCDIR)/tazpkg
pankso@345 67 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazpkg
pankso@345 68 # The i18n files
pankso@508 69 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
pankso@500 70 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
pankso@343 71 # Desktop integration
pankso@343 72 mkdir -p $(DESTDIR)$(PREFIX)/share
pankso@343 73 cp -a applications $(DESTDIR)$(PREFIX)/share
pankso@362 74 cp -a mime $(DESTDIR)$(PREFIX)/share
pankso@362 75 cp -a pixmaps $(DESTDIR)$(PREFIX)/share
pankso@343 76
pankso@343 77 # Uninstallation and clean-up commands.
pankso@5 78
pankso@5 79 uninstall:
pankso@343 80 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg
pankso@343 81 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkgbox
pankso@493 82 rm -rf $(DESTDIR)$(PREFIX)/tazpkg-notify
pankso@493 83 rm -f $(DESTDIR)$(PREFIX)/tazpkgbox-install
pankso@343 84 rm -rf $(DESTDIR)$(DOCDIR)/tazpkg
pankso@343 85 rm -f $(DESTDIR)$(SYSCONFDIR)/tazpkg.conf
pankso@343 86 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg*.mo
erjo@259 87
pankso@343 88 clean:
pankso@343 89 rm -rf _pkg
pankso@343 90 rm -rf po/mo
pankso@451 91 rm -f po/*/*~
pankso@472 92 rm -f po/*/*.mo
pankso@343 93