From c7013b749bea68cd494db412d59472fdd0a314c2 Mon Sep 17 00:00:00 2001 From: naddy Date: Wed, 20 Feb 2002 12:47:55 +0000 Subject: [PATCH] Update to 20010309 and general overhaul. Submitted by Andrey Smagin . --- x11/pwm/Makefile | 31 ++++---- x11/pwm/distinfo | 3 + x11/pwm/files/md5 | 3 - x11/pwm/patches/patch-Makefile | 105 ++++++++++++++++++++++++--- x11/pwm/patches/patch-config.h | 11 --- x11/pwm/patches/patch-event_c | 11 --- x11/pwm/patches/patch-libtu_Makefile | 64 ++++++++++++++++ x11/pwm/patches/patch-pwm.1x.in | 32 -------- x11/pwm/patches/patch-system.mk | 11 --- x11/pwm/pkg/DEINSTALL | 25 +++++++ x11/pwm/pkg/INSTALL | 72 ++++++++++++++++++ x11/pwm/pkg/PLIST | 20 +++-- 12 files changed, 282 insertions(+), 106 deletions(-) create mode 100644 x11/pwm/distinfo delete mode 100644 x11/pwm/files/md5 delete mode 100644 x11/pwm/patches/patch-config.h delete mode 100644 x11/pwm/patches/patch-event_c create mode 100644 x11/pwm/patches/patch-libtu_Makefile delete mode 100644 x11/pwm/patches/patch-pwm.1x.in delete mode 100644 x11/pwm/patches/patch-system.mk create mode 100644 x11/pwm/pkg/DEINSTALL create mode 100644 x11/pwm/pkg/INSTALL diff --git a/x11/pwm/Makefile b/x11/pwm/Makefile index 251227f6f23..15c87da75a3 100644 --- a/x11/pwm/Makefile +++ b/x11/pwm/Makefile @@ -1,30 +1,25 @@ -# $OpenBSD: Makefile,v 1.5 2001/10/28 13:05:50 espie Exp $ +# $OpenBSD: Makefile,v 1.6 2002/02/20 12:47:55 naddy Exp $ -COMMENT= "lightweight window manager with emphasis on usability" +COMMENT= "lightweight window manager with emphasis on usability" -DISTNAME= pwm-1.0 -CATEGORIES= x11 -NEED_VERSION= 1.402 +DISTNAME= pwm-20010309 +CATEGORIES= x11 +NEED_VERSION= 1.500 -HOMEPAGE= http://www.students.tut.fi/~tuomov/pwm/ +HOMEPAGE= http://www.students.tut.fi/~tuomov/pwm/ +MASTER_SITES= http://www.students.tut.fi/~tuomov/dl/ +MAINTAINER= Andrey Smagin + +# Artistic License PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -MASTER_SITES= http://www.students.tut.fi/~tuomov/dl/ +USE_X11= Yes +NO_REGRESS= Yes -USE_X11= Yes -USE_GMAKE= Yes - -do-install: - mkdir -p ${PREFIX}/share/pwm - mkdir -p ${PREFIX}/share/doc/pwm - ${INSTALL_PROGRAM} ${WRKSRC}/pwm ${PREFIX}/bin - ${INSTALL_MAN} ${WRKSRC}/pwm.1x ${PREFIX}/man/man1/pwm.1 - ${INSTALL_DATA} ${WRKSRC}/etc/pwm/*.conf ${PREFIX}/share/pwm - ${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/pwm - ${INSTALL_DATA} ${WRKSRC}/config.txt ${PREFIX}/share/doc/pwm +MAKE_ENV= CC='${CC}' SYSCONFDIR='${SYSCONFDIR}' .include diff --git a/x11/pwm/distinfo b/x11/pwm/distinfo new file mode 100644 index 00000000000..db4e724249b --- /dev/null +++ b/x11/pwm/distinfo @@ -0,0 +1,3 @@ +MD5 (pwm-20010309.tar.gz) = 2d5e5c33020c97edd85c4e0b47930e00 +RMD160 (pwm-20010309.tar.gz) = e083a60b6bd2a6e40715ec75a277f5e9b0a7b1df +SHA1 (pwm-20010309.tar.gz) = 2c66b778095793cb4ddbf4cbc721edac67250ae9 diff --git a/x11/pwm/files/md5 b/x11/pwm/files/md5 deleted file mode 100644 index 586c0ccadb6..00000000000 --- a/x11/pwm/files/md5 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (pwm-1.0.tar.gz) = 9a1efe73f597a3303aa94b8d0136779d -SHA1 (pwm-1.0.tar.gz) = 79c708a2a6260a06bc8dc586110578bf23aa01e7 -RMD160 (pwm-1.0.tar.gz) = 1a7c47446baf0947e085585a5837de06d8bffd8c diff --git a/x11/pwm/patches/patch-Makefile b/x11/pwm/patches/patch-Makefile index a811b96c017..0749179f551 100644 --- a/x11/pwm/patches/patch-Makefile +++ b/x11/pwm/patches/patch-Makefile @@ -1,11 +1,98 @@ ---- Makefile~ Sat Jul 1 15:48:50 2000 -+++ Makefile Sat Mar 17 19:19:05 2001 -@@ -21,7 +21,7 @@ OBJS= main.o draw.o font.o frame.o event - binding.o winlist.o mwmhints.o signal.o winprops.o +$OpenBSD: patch-Makefile,v 1.2 2002/02/20 12:47:55 naddy Exp $ +--- Makefile.orig Fri Mar 9 09:20:04 2001 ++++ Makefile Mon Feb 18 21:54:35 2002 +@@ -1,69 +1,34 @@ +-## +-## PWM Makefile +-## +- +-# System-specific configuration is in system.mk +-include system.mk +- +-###################################### +- +-SUBDIRS=libtu +-LIBS += -L./libtu -ltu -lm $(X11_LIBS) -lX11 +-INCLUDES += -I./libtu/include $(X11_INCLUDES) +-DEFINES += -DETCDIR=\"$(ETCDIR)\" +-CFLAGS += $(XOPEN_SOURCE) +-TO_REALCLEAN += pwm.1x +- + OBJS= main.o draw.o font.o frame.o event.o clientwin.o thing.o \ + property.o pointer.o key.o moveres.o cursor.o function.o \ + exec.o focus.o workspace.o winobj.o screen.o menu.o \ + readconfig.o menudata.o dock.o frameid.o placement.o \ + binding.o winlist.o mwmhints.o signal.o winprops.o - BINDIR=$(PREFIX)/bin --ETCDIR=$(PREFIX)/etc -+ETCDIR=$(PREFIX)/share - MANDIR=$(PREFIX)/man/man1 - DOCDIR=$(PREFIX)/doc +-TARGETS=pwm +- +-###################################### +- +-include rules.mk +- +-###################################### +- +-pwm: $(OBJS) pwm.1x +- $(CC) $(OBJS) $(LDFLAGS) -o $@ +- +-pwm.1x: pwm.1x.in +- sed 's#PREFIX#$(PREFIX)#g' pwm.1x.in > pwm.1x +- +-_install: +- $(INSTALLDIR) $(BINDIR) +- $(INSTALL) -m $(BIN_MODE) pwm $(BINDIR) +- $(STRIP) $(BINDIR)/pwm +- +- $(INSTALLDIR) $(MANDIR)/man1 +- $(INSTALL) -m $(DATA_MODE) pwm.1x $(MANDIR)/man1 +- +- $(INSTALLDIR) $(DOCDIR) +- $(INSTALLDIR) $(DOCDIR)/pwm +- $(INSTALL) -m $(DATA_MODE) config.txt $(DOCDIR)/pwm +- $(INSTALL) -m $(DATA_MODE) LICENSE $(DOCDIR)/pwm +- +- $(INSTALLDIR) $(ETCDIR) +- $(INSTALLDIR) $(ETCDIR)/pwm +- for i in etc/pwm/*.conf; do \ +- $(INSTALL) -m $(DATA_MODE) $$i $(ETCDIR)/pwm; \ +- done +- @ if test -f $(ETCDIR)/pwm/pwm.conf ; then \ +- echo "$(ETCDIR)/pwm/pwm.conf already exists. Not installing one."; \ +- else \ +- echo "Installing sample configuration file $(ETCDIR)/pwm/pwm.conf"; \ +- $(INSTALL) -m $(DATA_MODE) etc/pwm/sample.conf $(ETCDIR)/pwm/pwm.conf; \ +- fi +- ++CFLAGS += -DPREFIX=\"${PREFIX}\" -DETCDIR=\"${SYSCONFDIR}\" -Ilibtu/include -I${X11BASE}/include +-# Disclaimer: I don't have either Gnome or KDE. ++LDFLAGS += ${WARN} -Llibtu -ltu -lm -lX11 -L${X11BASE}/lib + +-install-gnomede: support/PWM.desktop +- $(INSTALL) -m $(DATA_MODE) support/PWM.desktop \ +- `gnome-config --datadir`/gnome/wm-properties ++all: main + +-install-gnome: install install-gnomede ++main: ${OBJS} ++ ${CC} ${OBJS} ${LDFLAGS} -o pwm ++ sed -e 's#/usr/local/etc#${SYSCONFDIR}#g' -e 's#PREFIX#${PREFIX}/share#g' pwm.1x.in > pwm.1x ++ ++$(OBJS): libtu ++ ++libtu:: ++ (cd ${.CURDIR}/libtu && ${MAKE}) ++ ++install: ++ ${BSD_INSTALL_PROGRAM} pwm ${PREFIX}/bin ++ ${BSD_INSTALL_MAN} pwm.1x ${PREFIX}/man/man1/pwm.1 ++ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/share/doc/pwm ++ ${BSD_INSTALL_DATA} LICENSE ${PREFIX}/share/doc/pwm ++ ${BSD_INSTALL_DATA} config.txt ${PREFIX}/share/doc/pwm ++ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/share/examples/pwm ++ ${BSD_INSTALL_DATA} etc/pwm/buttons-default.conf ${PREFIX}/share/examples/pwm/buttons-default.conf-sample ++ ${BSD_INSTALL_DATA} etc/pwm/look-beoslike.conf ${PREFIX}/share/examples/pwm/look-beoslike.conf-sample ++ ${BSD_INSTALL_DATA} etc/pwm/menus-default.conf ${PREFIX}/share/examples/pwm/menus-default.conf-sample ++ ${BSD_INSTALL_DATA} etc/pwm/keys-default.conf ${PREFIX}/share/examples/pwm/keys-default.conf-sample ++ ${BSD_INSTALL_DATA} etc/pwm/look-brownsteel.conf ${PREFIX}/share/examples/pwm/look-brownsteel.conf-sample ++ ${BSD_INSTALL_DATA} etc/pwm/sample.conf ${PREFIX}/share/examples/pwm/pwm.conf-sample diff --git a/x11/pwm/patches/patch-config.h b/x11/pwm/patches/patch-config.h deleted file mode 100644 index 5df88352987..00000000000 --- a/x11/pwm/patches/patch-config.h +++ /dev/null @@ -1,11 +0,0 @@ ---- config.h~ Sat Jun 3 22:12:54 2000 -+++ config.h Sat Mar 17 20:10:43 2001 -@@ -64,7 +64,7 @@ - #define PREFIX "" - #endif - --#define CF_SYS_CONFIG_LOCATION PREFIX"/etc/pwm/" -+#define CF_SYS_CONFIG_LOCATION PREFIX"/share/pwm/" - #define CF_GLOBAL_CFGFILE CF_SYS_CONFIG_LOCATION"pwm.conf" - #define CF_USER_CONFIG_LOCATION ".pwm/" - #define CF_USER_CFGFILE CF_USER_CONFIG_LOCATION"pwm.conf" diff --git a/x11/pwm/patches/patch-event_c b/x11/pwm/patches/patch-event_c deleted file mode 100644 index 318e83abca9..00000000000 --- a/x11/pwm/patches/patch-event_c +++ /dev/null @@ -1,11 +0,0 @@ -$OpenBSD: patch-event_c,v 1.1 2002/02/10 19:06:58 pvalchev Exp $ ---- event.c.orig Sun Feb 10 12:59:06 2002 -+++ event.c Sun Feb 10 12:58:56 2002 -@@ -7,6 +7,7 @@ - - #include - #include -+#include - #include - - #include "common.h" diff --git a/x11/pwm/patches/patch-libtu_Makefile b/x11/pwm/patches/patch-libtu_Makefile new file mode 100644 index 00000000000..3693a9f0b85 --- /dev/null +++ b/x11/pwm/patches/patch-libtu_Makefile @@ -0,0 +1,64 @@ +$OpenBSD: patch-libtu_Makefile,v 1.1 2002/02/20 12:47:55 naddy Exp $ +--- libtu/Makefile.orig Fri Mar 9 09:20:04 2001 ++++ libtu/Makefile Mon Feb 18 20:15:03 2002 +@@ -1,56 +1,4 @@ +-LIBTU_NO_ERRMSG=1 +-## +-## libtu Makefile +-## +- +-# System-specific configuration is in ../system.mk +-include ../system.mk +- +-###################################### +- +-INCLUDES += -I./include +-CFLAGS += $(POSIX_SOURCE) +- +-OBJS= misc.o output.o util.o optparser.o parser.o tokenizer.o +- +-ifdef LIBTU_NO_ERRMSG +-DEFINES += -DLIBTU_NO_ERRMSG +-else +-ifndef HAS_SYSTEM_ASPRINTF +-OBJS += ../snprintf_2.2/snprintf.o +-else +-DEFINES += -DHAS_SYSTEM_ASPRINTF +-endif +-endif +- +-TARGETS=libtu.a +-TESTERS=tester tester2 tester3 +- +-###################################### +- +-include ../rules.mk +- +-###################################### +- +-testers: $(TESTERS) +- +-libtu.a: $(OBJS) +- $(AR) $(ARFLAGS) $@ $+ +- $(RANLIB) $@ +- +-tester: tester.c libtu.a +- $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ +- +-tester2: tester2.c libtu.a +- $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ +- +-tester3: tester3.c libtu.a +- $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ +- +-_install: +- $(INSTALLDIR) $(LIBDIR) +- $(INSTALLDIR) $(INCDIR)/libtu +- $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR) +- for i in include/libtu/*.h; do \ +- $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR)/libtu; \ +- done ++CFLAGS += -Iinclude -DLIBTU_NO_ERRMSG ++OBJS = misc.o output.o util.o optparser.o parser.o tokenizer.o ++all: ${OBJS} ++ ${AR} ${ARFLAGS} libtu.a ${OBJS} diff --git a/x11/pwm/patches/patch-pwm.1x.in b/x11/pwm/patches/patch-pwm.1x.in deleted file mode 100644 index 93ff66a3ec6..00000000000 --- a/x11/pwm/patches/patch-pwm.1x.in +++ /dev/null @@ -1,32 +0,0 @@ ---- pwm.1x.in~ Sat Jul 1 14:11:03 2000 -+++ pwm.1x.in Mon Mar 19 00:00:06 2001 -@@ -30,16 +30,16 @@ Show about text - - .SH FILES - .TP --.B PREFIX/etc/pwm/pwm.conf -+.B PREFIX/share/pwm/pwm.conf - System default configuration file - .TP --.B PREFIX/etc/pwm/look-*.conf -+.B PREFIX/share/pwm/look-*.conf - Color scheme configuration files - .TP --.B PREFIX/etc/pwm/keys-*.conf -+.B PREFIX/share/pwm/keys-*.conf - Key binding configuration files - .TP --.B PREFIX/etc/pwm/buttons-*.conf -+.B PREFIX/share/pwm/buttons-*.conf - Pointer (mouse) button binding configuration files - .TP - .B ~/.pwm/pwm.conf -@@ -48,7 +48,7 @@ User default configuration file (overrid - .SH SEE ALSO - The PWM home page, http://www.students.tut.fi/~tuomov/pwm/ - .PP --.BR PREFIX/doc/pwm/config.txt -+.BR PREFIX/share/doc/pwm/config.txt - .PP - .BR X (1x) - .SH AUTHOR diff --git a/x11/pwm/patches/patch-system.mk b/x11/pwm/patches/patch-system.mk deleted file mode 100644 index 7c3ad2da194..00000000000 --- a/x11/pwm/patches/patch-system.mk +++ /dev/null @@ -1,11 +0,0 @@ ---- system.mk~ Sat Jul 1 12:37:50 2000 -+++ system.mk Sat Mar 17 18:44:10 2001 -@@ -74,7 +74,7 @@ MAKE_DEPEND=$(CC) -M $(DEFINES) $(INCLUD - ## - - AR=ar --ARFLAGS=crs -+ARFLAGS=cr - - - ## diff --git a/x11/pwm/pkg/DEINSTALL b/x11/pwm/pkg/DEINSTALL new file mode 100644 index 00000000000..2e6a622a2f7 --- /dev/null +++ b/x11/pwm/pkg/DEINSTALL @@ -0,0 +1,25 @@ +#!/bin/sh +# +# $OpenBSD: DEINSTALL,v 1.1 2002/02/20 12:47:55 naddy Exp $ +# pwm de-installation + +set -e +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} +CONFIG_DIR=${SYSCONFDIR:-/etc}/pwm + +if [ -d $CONFIG_DIR ]; then + echo + echo "+---------------" + echo "| To completely deinstall the $1 package you need to perform" + echo "| this step as root:" + echo "|" + echo "| rm -rf $CONFIG_DIR" + echo "|" + echo "| Do not do this if you plan on re-installing $1" + echo "| at some future time." + echo "+---------------" + echo +fi + +exit 0 diff --git a/x11/pwm/pkg/INSTALL b/x11/pwm/pkg/INSTALL new file mode 100644 index 00000000000..9e30df8efbc --- /dev/null +++ b/x11/pwm/pkg/INSTALL @@ -0,0 +1,72 @@ +#!/bin/sh +# +# $OpenBSD: INSTALL,v 1.1 2002/02/20 12:47:55 naddy Exp $ +# Pre/post-installation setup of pwm + +# exit on errors, use a sane path and install prefix +# +set -e +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} +CONFIG_DIR=${SYSCONFDIR:-/etc}/pwm +SAMPLE_CONFIG_DIR=$PREFIX/share/examples/pwm + +do_notice() +{ + echo + echo "+---------------" + echo "| The existing $1 configuration files in $CONFIG_DIR," + echo "| have NOT been changed. You may want to compare them to the" + echo "| current sample files in $SAMPLE_CONFIG_DIR," + echo "| and update your configuration as needed." + echo "+---------------" + echo +} + +do_install() +{ + install -d -o root -g wheel -m 755 $CONFIG_DIR + install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/buttons-default.conf-sample $CONFIG_DIR/buttons-default.conf + install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/look-beoslike.conf-sample $CONFIG_DIR/look-beoslike.conf + install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/menus-default.conf-sample $CONFIG_DIR/menus-default.conf + install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/keys-default.conf-sample $CONFIG_DIR/keys-default.conf + install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/look-brownsteel.conf-sample $CONFIG_DIR/look-brownsteel.conf + install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/pwm.conf-sample $CONFIG_DIR/pwm.conf + echo + echo "+---------------" + echo "| The $1 configuration files have been installed into" + echo "| $CONFIG_DIR. Please view these files and change the configuration" + echo "| to meet your needs." + echo "+---------------" + echo +} + +# verify proper execution +# +if [ $# -ne 2 ]; then + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 +fi + +# Verify/process the command +# +case $2 in + PRE-INSTALL) + : nothing to pre-install for this port + ;; + POST-INSTALL) + if [ ! -d $CONFIG_DIR ]; then + do_install $1 + elif [ ! -f $CONFIG_DIR/pwm.conf ]; then + do_install $1 + else + do_notice $1 + fi + ;; + *) + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/x11/pwm/pkg/PLIST b/x11/pwm/pkg/PLIST index 294f3a4a37f..d021ffda475 100644 --- a/x11/pwm/pkg/PLIST +++ b/x11/pwm/pkg/PLIST @@ -1,15 +1,13 @@ -@comment $OpenBSD: PLIST,v 1.1.1.1 2001/03/19 15:48:38 jakob Exp $ +@comment $OpenBSD: PLIST,v 1.2 2002/02/20 12:47:55 naddy Exp $ bin/pwm -share/pwm/buttons-default.conf -share/pwm/keys-default.conf -share/pwm/look-beoslike.conf -share/pwm/look-brownsteel.conf -share/pwm/menus-default.conf -@unexec if cmp -s %B/sample.conf %B/pwm.conf; then rm -f %B/pwm.conf; fi -share/pwm/sample.conf -@exec if [ ! -e %B/pwm.conf ]; then cp %B/sample.conf %B/pwm.conf; fi +man/man1/pwm.1 share/doc/pwm/LICENSE share/doc/pwm/config.txt -man/man1/pwm.1 +share/examples/pwm/buttons-default.conf-sample +share/examples/pwm/keys-default.conf-sample +share/examples/pwm/look-beoslike.conf-sample +share/examples/pwm/look-brownsteel.conf-sample +share/examples/pwm/menus-default.conf-sample +share/examples/pwm/pwm.conf-sample +@dirrm share/examples/pwm @dirrm share/doc/pwm -@dirrm share/pwm