tazpkg diff Makefile @ rev 878

module install: implement --quite mode in install_all_deps()
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Nov 30 02:27:33 2015 +0200 (2015-11-30)
parents 4fbdffec7f48
children d2e1b7133079
line diff
     1.1 --- a/Makefile	Sat Aug 15 17:41:08 2015 +0300
     1.2 +++ b/Makefile	Mon Nov 30 02:27:33 2015 +0200
     1.3 @@ -1,27 +1,37 @@
     1.4  # Makefile for TazPkg.
     1.5  #
     1.6 -prefix?=/usr
     1.7 -exec_prefix?=$(prefix)
     1.8 -bindir?=$(exec_prefix)/bin
     1.9 -libexecdir?=$(exec_prefix)/libexec
    1.10 -datarootdir?=$(prefix)/share
    1.11 -sysconfdir?=/etc
    1.12 -docdir?=$(datarootdir)/doc/tazpkg
    1.13 -libdir?=$(exec_prefix)/lib
    1.14 -localedir?=$(datarootdir)/locale
    1.15 -iconsdir?=$(datarootdir)/icons
    1.16 +prefix      ?= /usr
    1.17 +exec_prefix ?= $(prefix)
    1.18 +bindir      ?= $(exec_prefix)/bin
    1.19 +libexecdir  ?= $(exec_prefix)/libexec
    1.20 +datarootdir ?= $(prefix)/share
    1.21 +sysconfdir  ?= /etc
    1.22 +docdir      ?= $(datarootdir)/doc/tazpkg
    1.23 +libdir      ?= $(exec_prefix)/lib
    1.24 +localedir   ?= $(datarootdir)/locale
    1.25 +iconsdir    ?= $(datarootdir)/icons
    1.26  
    1.27 -DESTDIR?=
    1.28 -LINGUAS?=el es fr pl pt_BR ru sv zh_CN zh_TW
    1.29 +DESTDIR ?=
    1.30 +LINGUAS ?= el es fr pl pt_BR ru sv zh_CN zh_TW
    1.31 +MODULES := $(shell ls modules)
    1.32  
    1.33 -VERSION:=$(shell grep ^VERSION=[0-9] tazpkg | cut -d'=' -f2)
    1.34 +VERSION := 5.0
    1.35  ICONS = $(DESTDIR)$(iconsdir)/hicolor/32x32
    1.36  
    1.37  tmpdir = tar-install/tazpkg-$(VERSION)
    1.38  tarball = tazpkg-$(VERSION).tar.gz
    1.39  
    1.40 +.PHONY: all pot msgmerge msgfmt install uninstall clean targz help
    1.41 +
    1.42  all: msgfmt
    1.43 +	mkdir build
    1.44 +	cp -a tazpkg tazpkg-box tazpkg-notify \
    1.45 +		modules/* tazpanel/pkgs.cgi tazpanel/pkgs.css \
    1.46 +		build
    1.47 +	./stripall.sh
    1.48  
    1.49 +	# Substitute "@@MODULES@@" with modules path
    1.50 +	find build -type f -exec sed -i "s|@@MODULES@@|$(libexecdir)/tazpkg|g" \{\} \;
    1.51  
    1.52  # i18n.
    1.53  
    1.54 @@ -29,10 +39,9 @@
    1.55  	xgettext -o po/tazpkg.pot -L Shell \
    1.56  		--package-name=TazPkg \
    1.57  		--package-version="$(VERSION)" -kaction -ktitle -kdie -k_ -k_n -k_p:1,2 \
    1.58 -		./tazpkg \
    1.59 -		./modules/convert ./modules/find-depends ./modules/help ./modules/info \
    1.60 -		./modules/list ./modules/mkdb ./modules/recharge ./modules/upgrade \
    1.61 -		./tazpkg-box ./tazpkg-notify ./tazpanel/pkgs.cgi
    1.62 +		tazpkg \
    1.63 +		$(foreach module, $(MODULES), modules/$(module) ) \
    1.64 +		tazpkg-box tazpkg-notify tazpanel/pkgs.cgi
    1.65  
    1.66  msgmerge:
    1.67  	@for l in $(LINGUAS); do \
    1.68 @@ -58,34 +67,32 @@
    1.69  
    1.70  install: msgfmt
    1.71  	# TazPkg command line interface
    1.72 -	install -m 0755 -d     $(DESTDIR)$(bindir)
    1.73 -	install -m 0755 tazpkg $(DESTDIR)$(bindir)
    1.74 +	install -m 0755 -d           $(DESTDIR)$(bindir)
    1.75 +	install -m 0755 build/tazpkg $(DESTDIR)$(bindir)
    1.76  
    1.77  	# TazPkg modules
    1.78 -	install -m 0755 -d        $(DESTDIR)$(libexecdir)/tazpkg
    1.79 -	install -m 0755 modules/* $(DESTDIR)$(libexecdir)/tazpkg
    1.80 -	# Substitute "@@MODULES@@" with modules path
    1.81 -	sed -i "s|@@MODULES@@|$(libexecdir)/tazpkg|g" $(DESTDIR)$(bindir)/tazpkg
    1.82 -	sed -i "s|@@MODULES@@|$(libexecdir)/tazpkg|g" $(DESTDIR)$(libexecdir)/tazpkg/convert
    1.83 +	install -m 0755 -d                $(DESTDIR)$(libexecdir)/tazpkg
    1.84 +	$(foreach module, $(MODULES), install -m 0755 build/$(module) $(DESTDIR)$(libexecdir)/tazpkg;)
    1.85  
    1.86  	# TazPkg-box GUI
    1.87 -	install -m 0777 tazpkg-notify $(DESTDIR)$(bindir)
    1.88 -	install -m 0777 tazpkg-box    $(DESTDIR)$(bindir)
    1.89 +	install -m 0777 build/tazpkg-notify $(DESTDIR)$(bindir)
    1.90 +	install -m 0777 build/tazpkg-box    $(DESTDIR)$(bindir)
    1.91  
    1.92  	# Configuration files
    1.93  	install -m 0755 -d          $(DESTDIR)$(sysconfdir)/slitaz
    1.94  	install -m 0644 tazpkg.conf $(DESTDIR)$(sysconfdir)/slitaz
    1.95 +	sed -i "s|@@sysconfdir@@|$(sysconfdir)|g" $(DESTDIR)$(sysconfdir)/slitaz/tazpkg.conf
    1.96  
    1.97  	# Documentation
    1.98  	install -m 0755 -d $(DESTDIR)$(docdir)
    1.99  	cp -a doc/*        $(DESTDIR)$(docdir)
   1.100  
   1.101  	# TazPanel files
   1.102 -	install -m 0755 -d                $(DESTDIR)/var/www/tazpanel/menu.d
   1.103 -	install -m 0755 tazpanel/pkgs.cgi $(DESTDIR)/var/www/tazpanel
   1.104 -	ln -fs ../pkgs.cgi                $(DESTDIR)/var/www/tazpanel/menu.d/pkgs
   1.105 -	install -m 0755 -d                $(DESTDIR)/var/www/tazpanel/styles/default
   1.106 -	install -m 0644 tazpanel/pkgs.css $(DESTDIR)/var/www/tazpanel/styles/default
   1.107 +	install -m 0755 -d             $(DESTDIR)/var/www/tazpanel/menu.d
   1.108 +	install -m 0755 build/pkgs.cgi $(DESTDIR)/var/www/tazpanel
   1.109 +	ln -fs ../pkgs.cgi             $(DESTDIR)/var/www/tazpanel/menu.d/pkgs
   1.110 +	install -m 0755 -d             $(DESTDIR)/var/www/tazpanel/styles/default
   1.111 +	install -m 0644 build/gz/pkgs.css.gz $(DESTDIR)/var/www/tazpanel/styles/default
   1.112  
   1.113  	# The i18n files
   1.114  	install -m 0755 -d $(DESTDIR)$(localedir)
   1.115 @@ -103,7 +110,7 @@
   1.116  	install -m 0644    pixmaps/tazpkg.png           $(ICONS)/apps
   1.117  	install -m 0644    pixmaps/tazpkg-up.png        $(ICONS)/actions
   1.118  	install -m 0644    pixmaps/tazpkg-installed.png $(ICONS)/status
   1.119 -	ln -fs tazpkg.png  $(ICONS)/apps/TazPkg.png     # icon for Yad
   1.120 +	#ln -fs tazpkg.png  $(ICONS)/apps/TazPkg.png     # icon for Yad
   1.121  
   1.122  	# TazPkg Notify XDG autostart
   1.123  	mkdir -p            $(DESTDIR)$(sysconfdir)/xdg
   1.124 @@ -141,6 +148,7 @@
   1.125  
   1.126  
   1.127  clean:
   1.128 +	rm -rf build
   1.129  	rm -rf _pkg
   1.130  	rm -rf tar-install
   1.131  	rm -rf po/mo