Update to 20010309 and general overhaul.

Submitted by Andrey Smagin <andrey@smagin.com>.
This commit is contained in:
naddy 2002-02-20 12:47:55 +00:00
parent f95baad058
commit c7013b749b
12 changed files with 282 additions and 106 deletions

View File

@ -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"
DISTNAME= pwm-1.0
DISTNAME= pwm-20010309
CATEGORIES= x11
NEED_VERSION= 1.402
NEED_VERSION= 1.500
HOMEPAGE= http://www.students.tut.fi/~tuomov/pwm/
MASTER_SITES= http://www.students.tut.fi/~tuomov/dl/
MAINTAINER= Andrey Smagin <andrey@smagin.com>
# 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
USE_GMAKE= Yes
NO_REGRESS= 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 <bsd.port.mk>

3
x11/pwm/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (pwm-20010309.tar.gz) = 2d5e5c33020c97edd85c4e0b47930e00
RMD160 (pwm-20010309.tar.gz) = e083a60b6bd2a6e40715ec75a277f5e9b0a7b1df
SHA1 (pwm-20010309.tar.gz) = 2c66b778095793cb4ddbf4cbc721edac67250ae9

View File

@ -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

View File

@ -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
$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

View File

@ -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"

View File

@ -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 <stdlib.h>
#include <unistd.h>
+#include <string.h>
#include <sys/time.h>
#include "common.h"

View File

@ -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}

View File

@ -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

View File

@ -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
##

25
x11/pwm/pkg/DEINSTALL Normal file
View File

@ -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

72
x11/pwm/pkg/INSTALL Normal file
View File

@ -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

View File

@ -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