From 7abcab7d94c845b1bff8e4472874b930d1e0be3e Mon Sep 17 00:00:00 2001 From: zinke Date: Tue, 10 Jul 2012 12:24:54 +0000 Subject: [PATCH] Import sselp-0.2. Description: Simple X selection printer. Prints the X selection to stdout. If there is no X client owning the selection it just exits. Useful for scripts where you can query the X selection without pressing mouse Button2 in cumbersome ways. Based roughly on a submission from Jan Klemkow. ok sthen@ --- x11/sselp/Makefile | 29 ++++++++++++++++++++++++++ x11/sselp/distinfo | 5 +++++ x11/sselp/patches/patch-Makefile | 33 ++++++++++++++++++++++++++++++ x11/sselp/patches/patch-config_mk | 34 +++++++++++++++++++++++++++++++ x11/sselp/pkg/DESCR | 4 ++++ x11/sselp/pkg/PLIST | 2 ++ 6 files changed, 107 insertions(+) create mode 100644 x11/sselp/Makefile create mode 100644 x11/sselp/distinfo create mode 100644 x11/sselp/patches/patch-Makefile create mode 100644 x11/sselp/patches/patch-config_mk create mode 100644 x11/sselp/pkg/DESCR create mode 100644 x11/sselp/pkg/PLIST diff --git a/x11/sselp/Makefile b/x11/sselp/Makefile new file mode 100644 index 00000000000..1ef0d752423 --- /dev/null +++ b/x11/sselp/Makefile @@ -0,0 +1,29 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2012/07/10 12:24:54 zinke Exp $ + +COMMENT= print X selection to standard out + +DISTNAME= sselp-0.2 + +CATEGORIES= x11 + +HOMEPAGE= http://tools.suckless.org/sselp + +MAINTAINER= Joerg Zinke + +# MIT +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +WANTLIB= X11 c + +MASTER_SITES= http://dl.suckless.org/tools/ + +MAKE_FLAGS= CC="${CC}" +MAKE_ENV= LDFLAGS="${LDFLAGS}" +FAKE_FLAGS= DESTDIR="" + +NO_REGRESS= Yes + +.include diff --git a/x11/sselp/distinfo b/x11/sselp/distinfo new file mode 100644 index 00000000000..fae9f5c7991 --- /dev/null +++ b/x11/sselp/distinfo @@ -0,0 +1,5 @@ +MD5 (sselp-0.2.tar.gz) = t01lWHkNjfiX20C8qQvA9g== +RMD160 (sselp-0.2.tar.gz) = AIw7+UIlwgqYuVo9x2aj6QA6DF8= +SHA1 (sselp-0.2.tar.gz) = ionLETiPCUWNfpxUnN85TIq62gQ= +SHA256 (sselp-0.2.tar.gz) = zQ+V7A61cabdPEi6OqkxCA6zO8gYBb1ygyzATAG4uCI= +SIZE (sselp-0.2.tar.gz) = 2562 diff --git a/x11/sselp/patches/patch-Makefile b/x11/sselp/patches/patch-Makefile new file mode 100644 index 00000000000..a390e5f9e44 --- /dev/null +++ b/x11/sselp/patches/patch-Makefile @@ -0,0 +1,33 @@ +$OpenBSD: patch-Makefile,v 1.1.1.1 2012/07/10 12:24:54 zinke Exp $ +--- Makefile.orig Tue Jul 10 13:49:30 2012 ++++ Makefile Tue Jul 10 13:50:56 2012 +@@ -14,14 +14,12 @@ options: + @echo "CC = ${CC}" + + .c.o: +- @echo CC $< +- @${CC} -c ${CFLAGS} $< ++ ${CC} -c ${CFLAGS} $< + + ${OBJ}: config.mk + + sselp: ${OBJ} +- @echo CC -o $@ +- @${CC} -o $@ ${OBJ} ${LDFLAGS} ++ ${CC} -o $@ ${OBJ} ${LDFLAGS} + + clean: + @echo cleaning +@@ -36,10 +34,8 @@ dist: clean + @rm -rf sselp-${VERSION} + + install: all +- @echo installing executable file to ${DESTDIR}${PREFIX}/bin +- @mkdir -p ${DESTDIR}${PREFIX}/bin +- @cp -f sselp ${DESTDIR}${PREFIX}/bin +- @chmod 755 ${DESTDIR}${PREFIX}/bin/sselp ++ ${BSD_INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/bin ++ ${BSD_INSTALL_PROGRAM} sselp ${DESTDIR}${PREFIX}/bin + + uninstall: + @echo removing executable file from ${DESTDIR}${PREFIX}/bin diff --git a/x11/sselp/patches/patch-config_mk b/x11/sselp/patches/patch-config_mk new file mode 100644 index 00000000000..2e8e29eba6f --- /dev/null +++ b/x11/sselp/patches/patch-config_mk @@ -0,0 +1,34 @@ +$OpenBSD: patch-config_mk,v 1.1.1.1 2012/07/10 12:24:54 zinke Exp $ +--- config.mk.orig Tue Jul 10 13:47:09 2012 ++++ config.mk Tue Jul 10 13:49:16 2012 +@@ -4,20 +4,20 @@ VERSION = 0.2 + # Customize below to fit your system + + # paths +-PREFIX = /usr/local +-MANPREFIX = ${PREFIX}/share/man ++PREFIX ?= /usr/local ++MANPREFIX = ${PREFIX}/man + +-X11INC = /usr/X11R6/include +-X11LIB = /usr/X11R6/lib ++X11INC = ${X11BASE}/include ++X11LIB = ${X11BASE}/lib + + # includes and libs +-INCS = -I. -I/usr/include -I${X11INC} +-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ++INCS = -I${X11INC} ++LIBS = -L${X11LIB} -lX11 + + # flags +-CPPFLAGS = -DVERSION=\"${VERSION}\" +-CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} +-LDFLAGS = -s ${LIBS} ++CPPFLAGS += -DVERSION=\"${VERSION}\" ++CFLAGS += -std=c99 -pedantic -Wall ${INCS} ${CPPFLAGS} ++LDFLAGS += ${LIBS} + + # compiler and linker +-CC = cc ++CC ?= cc diff --git a/x11/sselp/pkg/DESCR b/x11/sselp/pkg/DESCR new file mode 100644 index 00000000000..66836ba1204 --- /dev/null +++ b/x11/sselp/pkg/DESCR @@ -0,0 +1,4 @@ +Simple X selection printer. Prints the X selection to stdout. If there +is no X client owning the selection it just exits. Useful for scripts +where you can query the X selection without pressing mouse Button2 in +cumbersome ways. diff --git a/x11/sselp/pkg/PLIST b/x11/sselp/pkg/PLIST new file mode 100644 index 00000000000..468e8aed299 --- /dev/null +++ b/x11/sselp/pkg/PLIST @@ -0,0 +1,2 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2012/07/10 12:24:54 zinke Exp $ +@bin bin/sselp