tazpkg annotate Makefile @ rev 769

Makefile: TazPanel' icons no need anymore, removed.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Apr 07 03:40:20 2015 +0300 (2015-04-07)
parents 7a731e6f61a6
children e5c261e450c7
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@686 7 LINGUAS?=el es fr pl pt_BR ru sv zh_CN zh_TW
pankso@5 8
pankso@453 9 VERSION:=$(shell grep ^VERSION=[0-9] tazpkg | cut -d '=' -f 2)
al@710 10 ICONS = $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32
pankso@452 11
erjo@529 12 tmpdir = tar-install/tazpkg-$(VERSION)
erjo@529 13 tarball = tazpkg-$(VERSION).tar.gz
erjo@529 14
pankso@500 15 all: msgfmt
al@633 16
al@695 17
pankso@343 18 # i18n.
pankso@343 19
pankso@343 20 pot:
al@633 21 xgettext -o po/tazpkg.pot -L Shell \
al@633 22 --package-name=TazPkg \
al@707 23 --package-version="$(VERSION)" -kaction -ktitle -k_ -k_n -k_p:1,2 \
al@745 24 ./tazpkg ./modules/tazpkg-convert ./modules/tazpkg-find-depends ./tazpkg-box \
pascal@764 25 ./tazpanel/pkgs.cgi ./tazpkg-notify
al@633 26
pankso@343 27 msgmerge:
pankso@343 28 @for l in $(LINGUAS); do \
al@633 29 if [ -f "po/$$l.po" ]; then \
pankso@472 30 echo -n "Updating $$l po file."; \
al@633 31 msgmerge -U po/$$l.po po/tazpkg.pot ; \
pankso@471 32 fi; \
pankso@499 33 done
pankso@343 34
pankso@343 35 msgfmt:
pankso@343 36 @for l in $(LINGUAS); do \
al@633 37 if [ -f "po/$$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 \
al@633 41 po/$$l.po ; \
pankso@500 42 echo "done"; \
pankso@472 43 fi; \
pankso@343 44 done;
pankso@343 45
al@695 46
pankso@343 47 # Installation.
pankso@343 48
erjo@529 49 install: msgfmt
al@633 50 # TazPkg command line interface
al@695 51 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
al@695 52 install -m 0777 tazpkg $(DESTDIR)$(PREFIX)/bin
pascal@703 53 -[ "$(VERSION)" ] && sed -i 's/^VERSION=[0-9].*/VERSION=$(VERSION)/' $(DESTDIR)$(PREFIX)/bin/tazpkg
al@713 54 install -m 0777 modules/tazpkg-convert $(DESTDIR)$(PREFIX)/bin
al@713 55 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/tazpkg
al@713 56 install -m 0777 modules/tazpkg-find-depends $(DESTDIR)$(PREFIX)/lib/tazpkg
al@695 57
al@633 58 # TazPkg-box GUI
pankso@473 59 install -m 0777 tazpkg-notify $(DESTDIR)$(PREFIX)/bin
al@695 60 install -m 0777 tazpkg-box $(DESTDIR)$(PREFIX)/bin
al@695 61
pankso@345 62 # Configuration files
al@695 63 install -m 0755 -d $(DESTDIR)$(SYSCONFDIR)
pankso@345 64 install -m 0644 tazpkg.conf $(DESTDIR)$(SYSCONFDIR)
al@695 65
pankso@345 66 # Documentation
pankso@345 67 install -m 0755 -d $(DESTDIR)$(DOCDIR)/tazpkg
al@695 68 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazpkg
al@695 69
al@633 70 # TazPanel files
al@713 71 install -m 0755 -d $(DESTDIR)/var/www/tazpanel/menu.d
al@713 72 cp -a tazpanel/pkgs.cgi $(DESTDIR)/var/www/tazpanel
al@769 73 ln -fs ../pkgs.cgi $(DESTDIR)/var/www/tazpanel/menu.d/pkgs
al@718 74 install -m 0755 -d $(DESTDIR)/var/www/tazpanel/styles/default
al@718 75 cp -a tazpanel/pkgs.css $(DESTDIR)/var/www/tazpanel/styles/default
al@695 76
pankso@345 77 # The i18n files
pankso@508 78 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
al@695 79 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
al@695 80
pankso@343 81 # Desktop integration
al@695 82 mkdir -p $(DESTDIR)$(PREFIX)/share
al@695 83 cp -a applications $(DESTDIR)$(PREFIX)/share
al@695 84 #cp -a mime $(DESTDIR)$(PREFIX)/share # moved to shared-mime-info package
al@710 85
al@710 86 # Default icons
al@710 87 install -m 0755 -d $(ICONS)/apps
al@710 88 install -m 0644 pixmaps/tazpkg.png $(ICONS)/apps
al@710 89 ln -fs tazpkg.png $(ICONS)/apps/TazPkg.png # icon for Yad
al@710 90 install -m 0755 -d $(ICONS)/actions
al@710 91 install -m 0644 pixmaps/tazpkg-up.png $(ICONS)/actions
al@710 92 install -m 0755 -d $(ICONS)/status
al@710 93 install -m 0644 pixmaps/tazpkg-installed.png $(ICONS)/status
al@695 94
al@695 95 # TazPkg Notify XDG autostart
al@695 96 mkdir -p $(DESTDIR)/etc/xdg
pankso@641 97 cp -a xdg/autostart $(DESTDIR)/etc/xdg
al@695 98
pankso@343 99
pankso@343 100 # Uninstallation and clean-up commands.
pankso@5 101
pankso@5 102 uninstall:
al@695 103 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg
al@695 104 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg-convert
al@695 105 rm -f $(DESTDIR)$(PREFIX)/lib/tazpkg/tazpkg-find-depends
al@695 106
al@695 107 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg-notify
al@695 108 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg-box
al@695 109
al@695 110 rm -f $(DESTDIR)$(SYSCONFDIR)/tazpkg.conf
al@695 111
pankso@343 112 rm -rf $(DESTDIR)$(DOCDIR)/tazpkg
al@695 113
al@695 114 rm -f $(DESTDIR)/var/www/tazpanel/pkgs.cgi
al@695 115 rm -f $(DESTDIR)/var/www/tazpanel/menu.d/pkgs
al@695 116
al@695 117 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg.mo
al@695 118
al@695 119 rm -f $(DESTDIR)$(PREFIX)/share/applications/tazpkg-*.desktop
al@695 120 rm -f $(DESTDIR)$(PREFIX)/share/applications/tazpanel-pkgs.desktop
al@695 121
al@710 122 rm -f $(ICONS)/apps/tazpkg.png
al@710 123 rm -f $(ICONS)/actions/tazpkg-up.png
al@710 124 rm -f $(ICONS)/status/tazpkg-installed.png
al@695 125
al@695 126 rm -f $(DESTDIR)/etc/xdg/autostart/tazpkg-notify.desktop
al@695 127
erjo@259 128
pankso@343 129 clean:
pankso@343 130 rm -rf _pkg
erjo@529 131 rm -rf tar-install
pankso@343 132 rm -rf po/mo
al@633 133 rm -f po/*~
al@633 134 rm -f po/*.mo
al@695 135
erjo@529 136
erjo@529 137 targz:
erjo@529 138 rm -rf ${tmpdir}
erjo@529 139 mkdir -p ${tmpdir}
al@695 140
erjo@529 141 make DESTDIR=${tmpdir} install
al@695 142
erjo@529 143 cd tar-install ; \
erjo@529 144 tar cvzf ${tarball} tazpkg-$(VERSION) ; \
erjo@529 145 cd -
al@695 146
erjo@529 147 @echo "** Tarball successfully created in tar-install/${tarball}"
al@633 148
al@695 149
al@633 150 help:
al@633 151 @echo "make [ pot | msgmerge | msgfmt | all | install | uninstall | clear | targz ]"