wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 8177ac58d70150204eea65863f36d820f485424d
parent 2177aed027e2f87ac491347ad3809dae92d36787
Author: Kris Maglione <kris@suckless.org>
Date:   Wed, 23 Jun 2010 10:55:55 -0400

Sync makefiles with libixp. Fix some PKGBUILD bugs.

Diffstat:
PKGBUILD | 26++++++++++++--------------
cmd/wmii/client.c | 3+--
mk/common.mk | 14++++++++++++++
mk/hdr.mk | 13+++++++------
mk/man.mk | 24++++++++++++++++++++++--
5 files changed, 56 insertions(+), 24 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD @@ -1,36 +1,34 @@ -pkgname="wmii-hg" -pkgver=2647 +pkgname=wmii-hg +pkgver=2739 pkgrel=1 pkgdesc="The latest hg pull of wmii, a lightweight, dynamic window manager for X11" url="http://wmii.suckless.org" -license=("MIT") -arch=("i686" "x86_64") -depends=("libx11" "libxinerama" "libxrandr") -makedepends=("mercurial") +license=(MIT) +arch=(i686 x86_64) +depends=(libx11 libxinerama libxrandr) +makedepends=(mercurial libixp-hg) optdepends=("plan9port: for use of the alternative plan9port wmiirc" \ "python: for use of the alternative Python wmiirc" \ "ruby-rumai: for use of the alternative Ruby wmiirc" \ "libxft: for anti-aliased font support") -provides=("wmii") -conflicts=("wmii") +provides=(wmii) +conflicts=(wmii) source=() -FORCE_VER=$(hg tip --template {rev}) -#_hgroot="http://hg.suckless.org/" -#_hgrepo="wmii" +FORCE_VER=$(hg log -r . --template {rev}) build() { cd $startdir flags=(PREFIX=/usr \ ETC=/etc \ - DESTDIR="$startdir/pkg") + DESTDIR="$pkgdir") make "${flags[@]}" || return 1 make "${flags[@]}" install || return 1 - install -m644 -D ./debian/file/wmii.desktop $startdir/pkg/etc/X11/sessions/wmii.desktop - install -m644 -D ./LICENSE $startdir/pkg/usr/share/licenses/wmii/LICENSE + install -m644 -D ./debian/file/wmii.desktop "$pkgdir/etc/X11/sessions/wmii.desktop" + install -m644 -D ./LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/cmd/wmii/client.c b/cmd/wmii/client.c @@ -686,8 +686,7 @@ client_seturgent(Client *c, int urgent, int from) { c->urgent = urgent; ewmh_updatestate(c); if(c->sel) { - if(c->sel->view == selview) - frame_draw(c->sel); + frame_draw(c->sel); for(f=c->frame; f; f=f->cnext) { SET(ff); if(!urgent) diff --git a/mk/common.mk b/mk/common.mk @@ -18,6 +18,20 @@ simpleinstall: $(INSTALL) -b 0755 $$f $(DIR) $$f; \ done +simpleuninstall: + for f in $(DOCS); do \ + $(UNINSTALL) $$f $(DOCDIR) $$f; \ + done + for f in $(TEXT); do \ + $(UNINSTALL) $$f $(DIR) $$f; \ + done + for f in $(BINARY); do \ + $(UNINSTALL) -b $$f $(DIR) $$f; \ + done + for f in $(EXECS); do \ + $(UNINSTALL) -b $$f $(DIR) $$f; \ + done + cleandep: echo CLEANDEP rm .depend 2>/dev/null || true diff --git a/mk/hdr.mk b/mk/hdr.mk @@ -56,7 +56,7 @@ MKCFG!=$(MKCFGSH) include $(MKCFG) .SILENT: -.SUFFIXES: .out .o .o_pic .c .pdf .sh .rc .$(SOEXT) .awk .1 .man1 .depend .install .uninstall .clean +.SUFFIXES: .out .o .o_pic .c .pdf .sh .rc .$(SOEXT) .awk .1 .3 .man1 .man3 .depend .install .uninstall .clean all: MAKEFILES=.depend @@ -65,7 +65,7 @@ MAKEFILES=.depend [ -n "$(noisycc)" ] && echo $(MKDEP) $(COMPILE_FLAGS) $< || true eval "$(MKDEP) $(COMPILE_FLAGS)" $< | sed '1s|.*:|$(<:%.c=%.o):|' >>.depend -.sh.depend .rc.depend .1.depend .awk.depend: +.sh.depend .rc.depend .1.depend .3.depend .awk.depend: : .c.o: @@ -87,7 +87,7 @@ MAKEFILES=.depend $(FILTER) $< >$@; \ chmod 0755 $@ -.man1.1: +.man1.1 .man3.3: echo TXT2TAGS $(BASE)$< [ -n "$(noisycc)" ] && set -x; \ txt2tags -o- $< >$@ @@ -98,6 +98,7 @@ INSTALL= _install() { set -e; \ if [ ! -d $$d ]; then echo MKDIR $$3; mkdir -p $$d; fi; \ echo INSTALL $$($(CLEANNAME) $(BASE)$$2); \ [ -n "$(noisycc)" ] && set -x; \ + rm -f $$f; \ if [ "$$dashb" = -b ]; \ then cp -f $$2 $$f; \ else $(FILTER) <$$2 >$$f; \ @@ -106,9 +107,9 @@ INSTALL= _install() { set -e; \ set +x; \ }; _install UNINSTALL= _uninstall() { set -e; \ - echo UNINSTALL $$($(CLEANNAME) $(BASE)$$2); \ + echo UNINSTALL $$($(CLEANNAME) $(BASE)$$1); \ [ -n "$(noisycc)" ] && set -x; \ - rm -f $(DESTDIR)$$3/$$(basename $$4); \ + rm -f $(DESTDIR)$$2/$$(basename $$3); \ }; _uninstall .out.install: @@ -137,7 +138,7 @@ MANSECTIONS=1 2 3 4 5 6 7 8 9 $(MANSECTIONS:%=.%.install): $(INSTALMAN) $< $(MANSECTIONS:%=.%.uninstall): - $(UNINSTALL) $< + $(UNINSTALLMAN) $< .out.clean: echo CLEAN $$($(CLEANNAME) $(BASE)$<) diff --git a/mk/man.mk b/mk/man.mk @@ -1,7 +1,27 @@ +targ = for k in $(MANPAGES); do echo $$k | sed 's/ .*//'; done +TARG := $(shell $(targ)) +TARG != $(targ) + all: $(TARG) -install: $(TARG:.1=.install) -uninstall: $(TARG:.1=.uninstall) +install: $(TARG:.1=.install) $(TARG:.3=.install) maninstall +uninstall: $(TARG:.1=.uninstall) $(TARG:.3=.uninstall) manuninstall + +.PHONY: maninstall manuninstall + +MANLOOP = \ + set -ef; \ + for k in $(MANPAGES); do \ + set -- $$k; \ + real=$$1; shift; \ + for targ; do \ + _ $$real $(MAN)/man$${real\#\#*.}/$$targ; \ + done; \ + done +maninstall: + _() { echo LN $$1 $${2##*/}; ln -sf $$1 $(DESTDIR)$$2; }; $(MANLOOP) +manuninstall: + _() { echo RM $${2##*/}; rm -f $(DESTDIR)$$2; }; $(MANLOOP) printinstall: echo 'Install directories:'