From 41e9a6a60c620f1a9a0c5ec65f0ae5ed7b3249f8 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Aug 28 2009 16:14:08 +0000 Subject: initial spec --- diff --git a/.cvsignore b/.cvsignore index e69de29..ea1cf6c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +dzen2-latest.tar.gz diff --git a/dzen2-0.8.5-check_environment.patch b/dzen2-0.8.5-check_environment.patch new file mode 100644 index 0000000..066436e --- /dev/null +++ b/dzen2-0.8.5-check_environment.patch @@ -0,0 +1,93 @@ +diff -up dzen2-0.8.5/config.mk.check_environment dzen2-0.8.5/config.mk +--- dzen2-0.8.5/config.mk.check_environment 2007-08-18 08:18:50.000000000 +0200 ++++ dzen2-0.8.5/config.mk 2007-12-26 13:40:06.000000000 +0100 +@@ -4,40 +4,41 @@ VERSION = 0.8.5 + # Customize below to fit your system + + # paths +-PREFIX = /usr/local +-MANPREFIX = ${PREFIX}/share/man ++PREFIX ?= /usr/local ++MANPREFIX ?= ${PREFIX}/share/man + + X11INC = /usr/X11R6/include + X11LIB = /usr/X11R6/lib + INCS = -I. -I/usr/include -I${X11INC} + + # Configure the features you want to be supported +-# Only one of the following options has to be uncommented, +-# all others must be commented! +-# +-# Uncomment: Remove # from the beginning of respective lines +-# Comment : Add # to the beginning of the respective lines + +-# Option 1: No Xinerama no XPM +-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 +-CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" ++# Remove the # from the next line to enable Xinerama support ++#DZEN_XINERAMA=1 ++ ++# Remove the # from the next line to enable Xpm support ++#DZEN_XPM=1 + +-# Option 2: No Xinerama with XPM +-#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXpm +-#CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XPM +- +-# Option 3: With Xinerama no XPM +-#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXinerama +-#CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XINERAMA +- +-# Option 4: With Xinerama and XPM +-#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXinerama -lXpm +-#CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XINERAMA -DDZEN_XPM ++# Uncomment: Remove # from the beginning of respective lines ++# Comment : Add # to the beginning of the respective lines + + # END of feature configuration + ++CFLAGS ?= -Os ++CFLAGS += ${INCS} -DVERSION=\"${VERSION}\" ++LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ++ ++ifeq ($(DZEN_XINERAMA),1) ++LIBS += -lXinerama ++CFLAGS += -DDZEN_XINERAMA ++endif ++ ++ifeq ($(DZEN_XPM), 1) ++LIBS += -lXpm ++CFLAGS += -DDZEN_XPM ++endif + +-LDFLAGS = ${LIBS} ++LDFLAGS = ${CFLAGS} ${LIBS} + + # Solaris, uncomment for Solaris + #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" +diff -up dzen2-0.8.5/gadgets/config.mk.check_environment dzen2-0.8.5/gadgets/config.mk +--- dzen2-0.8.5/gadgets/config.mk.check_environment 2007-08-18 08:18:50.000000000 +0200 ++++ dzen2-0.8.5/gadgets/config.mk 2007-12-26 13:39:04.000000000 +0100 +@@ -1,8 +1,8 @@ + # Customize below to fit your system + + # paths +-PREFIX = /usr/local +-MANPREFIX = ${PREFIX}/share/man ++PREFIX ?= /usr/local ++MANPREFIX ?= ${PREFIX}/share/man + + X11INC = /usr/X11R6/include + INCS = -I. -I/usr/include -I${X11INC} +@@ -10,8 +10,9 @@ INCS = -I. -I/usr/include -I${X11INC} + X11LIB = /usr/X11R6/lib + LIBS = -L/usr/lib + +-CFLAGS = -Os ${INCS} +-LDFLAGS = ${LIBS} ++CFLAGS ?= -Os ++CFLAGS += ${INCS} ++LDFLAGS = ${CFLAGS} ${LIBS} + + # compiler and linker + CC = gcc diff --git a/dzen2-0.8.5-verbose.patch b/dzen2-0.8.5-verbose.patch new file mode 100644 index 0000000..58d2435 --- /dev/null +++ b/dzen2-0.8.5-verbose.patch @@ -0,0 +1,58 @@ +diff -up dzen2-0.8.5/Makefile.verbose dzen2-0.8.5/Makefile +--- dzen2-0.8.5/Makefile.verbose 2007-08-18 08:18:50.000000000 +0200 ++++ dzen2-0.8.5/Makefile 2008-11-01 11:25:01.000000000 +0100 +@@ -17,14 +17,13 @@ options: + + .c.o: + @echo CC $< +- @${CC} -c ${CFLAGS} $< ++ ${CC} -c ${CFLAGS} $< + + ${OBJ}: dzen.h action.h config.mk + + dzen2: ${OBJ} + @echo LD $@ +- @${LD} -o $@ ${OBJ} ${LDFLAGS} +- @strip $@ ++ ${LD} -o $@ ${OBJ} ${LDFLAGS} + @echo "Run ./help for documentation" + + clean: +diff -up dzen2-0.8.5/gadgets/Makefile.verbose dzen2-0.8.5/gadgets/Makefile +--- dzen2-0.8.5/gadgets/Makefile.verbose 2007-08-18 08:18:50.000000000 +0200 ++++ dzen2-0.8.5/gadgets/Makefile 2008-11-01 11:26:30.000000000 +0100 +@@ -17,29 +17,25 @@ options: + + .c.o: + @echo CC $< +- @${CC} -c ${CFLAGS} $< ++ ${CC} -c ${CFLAGS} $< + + ${OBJ}: config.mk + + dbar: ${OBJ} + @echo LD $@ +- @${LD} -o $@ dbar.o ${LDFLAGS} +- @strip $@ ++ ${LD} -o $@ dbar.o ${LDFLAGS} + + gdbar: ${OBJ} + @echo LD $@ +- @${LD} -o $@ gdbar.o ${LDFLAGS} -L${X11LIB} -lX11 +- @strip $@ ++ ${LD} -o $@ gdbar.o ${LDFLAGS} -L${X11LIB} -lX11 + + gcpubar: ${OBJ} + @echo LD $@ +- @${LD} -o $@ gcpubar.o ${LDFLAGS} -L${X11LIB} +- @strip $@ ++ ${LD} -o $@ gcpubar.o ${LDFLAGS} -L${X11LIB} + + textwidth: ${OBJ} + @echo LD $@ +- @${LD} -o $@ textwidth.o ${LDFLAGS} -L${X11LIB} -lX11 +- @strip $@ ++ ${LD} -o $@ textwidth.o ${LDFLAGS} -L${X11LIB} -lX11 + + clean: + @echo cleaning diff --git a/dzen2-dbar.1 b/dzen2-dbar.1 new file mode 100644 index 0000000..a12f78f --- /dev/null +++ b/dzen2-dbar.1 @@ -0,0 +1,55 @@ +.TH "DBAR" 1 "Jan 01 2008" +.SH NAME +dzen2-dbar \- simple gadget that you can use in combination with dzen to display a progressbar. +.SH SYNOPSIS +.HP 7 +\fBdzen2-dbar\fR [\-w \fIcharacters\fR] [\-s \fIsymbol\fR] [\-min \fIminvalue\fR] [\-max \fImaxvalue\fR] [\-l \fIstring\fR] [\-nonl] +.SH DESCRIPTION +.B dbar +is an application that generates semi graphical progress meters, from some values you supply to it. +.PP +See the usage examples for a description of the expected input format. +.SH OPTIONS +A summary of options is included below. +.TP +.B \-max +Value to be considered 100% (default: 100) +.TP +.B \-min +Value to be considered 0% (default: 0) +.TP +.B \-w +Number of charcaters to be considered 100% in the bar (default: 25 ) +.TP +.B \-s +Symbol represeting the percentage value in the bar (default: = ) +.TP +.B \-l +label to be prepended to the bar (default: '' ) +.TP +.B \-nonl +no new line, don't put '\n' at the end of the bar (default: do print '\n') +.SH USAGE EXAMPLES +.TP +.B Static 0% and 100% mark or single value input: +.ip +Command: echo 25 | dbar -m 100 -l Sometext +.br +Output: Sometext 25% [====== ] +.TP +.B If your 100% mark changes dynamically or 2-values input: +.ip +Command: echo "50 150" | dbar +.br +Output: 33% [======== ] +.TP +.B If your value range is not between [0, maxval] or 3-values input: +.ip +Command: echo "50 -25 150" | dbar +.br +Output: 43% [=========== ] +.PP +Dbar was written by Robert Manea. +.PP +This manual page was written by bertagaz , +for the Debian project (but may be used by others). diff --git a/dzen2-gcpubar.1 b/dzen2-gcpubar.1 new file mode 100644 index 0000000..9a950e5 --- /dev/null +++ b/dzen2-gcpubar.1 @@ -0,0 +1,37 @@ +.TH "GCPUBAR" 1 "Jan 01 2008" +.SH NAME +dzen2-gcpubar \- graphical CPU usage meter +.SH SYNOPSIS +.HP 7 +\fBdzen2-gcpubar\fR [\-i \fIinterval\fR] [\-c \fIcount\fR] [\-fg \fIcolor\fR] [\-bg \fIcolor\fR] [\-w \fIpixel\fR] [\-h\ \fIpixel\fR] [\-nonl] +.SH DESCRIPTION +.B gcpubar +is a CPU utilization meter for Linux. It relies on the existence of the /proc/stat file and generates fully graphical meters viewable with dzen. +.SH OPTIONS +A summary of options is included below. +.TP +.B \-i +Update interval in seconds (default 1). You can use positive values less than 1 for intervals shorter than 1 second. +.TP +.B \-c +Terminate after displaying argument to this option (default infinite). +.TP +.B \-fg +Foreground color +.TP +.B \-bg +Background color +.TP +.B \-w +Width in piwels +.TP +.B \-h +Height in pixels +.TP +.B \-nonl +No new line, don't put '\n' at the end of the bar (default: do print '\n') +.PP +gcpubar was written by Robert Manea. +.PP +This manual page was written by bertagaz , +for the Debian project (but may be used by others). diff --git a/dzen2-gdbar.1 b/dzen2-gdbar.1 new file mode 100644 index 0000000..6bd2d78 --- /dev/null +++ b/dzen2-gdbar.1 @@ -0,0 +1,49 @@ +.TH "GDBAR" 1 "Jan 01 2008" +.SH NAME +dzen2-gdbar \- generates fully graphical progress meters +.SH SYNOPSIS +.HP 7 +\fBdzen2-gdbar\fR [\-w \fIcharacters\fR] [\-s \fIsymbol\fR] [\-fg \fIcolor\fR] [\-bg \fIcolor\fR] [\-min \fIminvalue\fR] [\-max \fImaxvalue\fR] [\-l \fIstring\fR] [\-nonl] [\-o] +.SH DESCRIPTION +.B gdbar +application that generates fully graphical progress meters, from some values you supply to it. +.PP +It has the same input semantics as dbar (see +.B dbar (1) +\). In contrast to dbar, gdbar draws fully graphical meters which are only useful in combination with dzen. +.PP +See the usage examples for a description of the expected input format. +.SH OPTIONS +A summary of options is included below. +.TP +.B \-max +Value to be considered 100% (default: 100) +.TP +.B \-min +Value to be considered 0% (default: 0) +.TP +.B \-fg +Foreground color. (default white) +.TP +.B \-bg +Bacground color (default darkgrey) +.TP +.B \-w +Size in pixels to be considered 100% in the bar (default: 80 ) +.TP +.B \-h +Bar height. +.TP +.B \-l +label to be prepended to the bar (default: '' ) +.TP +.B \-o +Draw conky style meters. +.TP +.B \-nonl +no new line, don't put '\n' at the end of the bar (default: do print '\n') +.PP +Dbar was written by Robert Manea. +.PP +This manual page was written by bertagaz , +for the Debian project (but may be used by others). diff --git a/dzen2-textwidth.1 b/dzen2-textwidth.1 new file mode 100644 index 0000000..e674b35 --- /dev/null +++ b/dzen2-textwidth.1 @@ -0,0 +1,26 @@ +.TH "TEXTWIDTH" 1 "Jan 01 2008" +.SH NAME +dzen2-textwidth \- calculate the width in pixels of text for a given font. +.SH SYNOPSIS +.HP 7 +\fBdzen2-textwidth\fR \fIfontname\fR \fIstring\fR +.SH DESCRIPTION +.B textwidth +is a simple utility to calculate the width in pixels of text with a given font. +.PP +This tool is provided as part of the +.B dzen2 (1) +package. +.SH OPTIONS +A summary of options is included below. +.TP +.B fontname +Set the font. +.TP +.B string +Set the string. +.PP +textwidth was written by Robert Manea. +.PP +This manual page was written by bertagaz , +for the Debian project (but may be used by others). diff --git a/dzen2.1 b/dzen2.1 new file mode 100644 index 0000000..d19e6fb --- /dev/null +++ b/dzen2.1 @@ -0,0 +1,91 @@ +.T utf8 +.TH DZEN 1 +.SH NAME +dzen2 \- general-purpose messaging and notification for X11 +.SH SYNOPSIS +.B dzen2 +[\-v] [\-p [seconds]] [\-m [v|h]] [\-ta ] [\-sa ] + [\-x ] [\-y ] [\-w ] [\-tw ] [\-u] + [\-e ] [\-l ] [\-fn ] [\-bg ] + [\-fg ] [\-xs ] +.SH DESCRIPTION +.B Dzen +is a general\-purpose messaging and notification program for X11, +desigend to be scriptable in any language and integrate well with +window managers like dwm, wmii and xmonad though it will work with any +windowmanger. +.PP +.B Dzen +expects the status message on its standard input, and uses a custom +formatting language for colors and several other features (like bar +meters and such). See README for detailed usage and scripting +instructions. +.SH OPTIONS +.TP +.B \-fg +Set foreground color. The can be specified either as symbolic +name (e.g. red, darkgreen, etc.) or as #rrggbb hex\-value +(e.g. #ffffaa). +.TP +.B \-bg +Set background color (same format as \-fg). +.TP +.B \-fn +Set font (using the format of xlsfonts and xfontsel). +.TP +.B \-ta +Set alignement of title window content: l(eft), c(center) or r(ight). +.TP +.B \-tw +Set title window width. +.TP +.B \-sa +Set alignment of slave window (see +.B \-ta +). +.TP +.B \-l +Number of lines to display in slave window (see (1) in README). +.TP +.B \-e +Set up events and actions, eg. responses to mouse clicks (see (2) in README). +.TP +.B \-m +Start up in menu mode (see (3) in README). +.TP +.B \-u +Update contents of title and slave window simultaneously, see (see (4) in README). +.TP +.B \-p [] +Persist EOF (optional timeout in seconds). +.TP +.B \-x +Set x position on the screen. +.TP +.B \-y +Set y position on the screen. +.TP +.B \-h +Set line height (defaults to fontheight + 2 pixels). +.TP +.B \-w +width +.TP +.B \-xs +Set the Xinerama screen number where dzen should appear. +.TP +.B \-v +Display version information. + +.SH SEE ALSO +More detailed documentation (especially on the formatting language of +dzen2) is available in /usr/share/doc/dzen2/README.gz. + +.SH AUTHOR +.B Dzen2 +has been written by +.B Robert Manea. +This manpage has been written, based on dzen documentation, by Petr +Ročkai, for Debian GNU/Linux, but may be used by others. This manpage +falls under the same licence as Dzen2 itself, see +/usr/share/doc/dzen2/copyright. diff --git a/dzen2.spec b/dzen2.spec new file mode 100644 index 0000000..1e6742b --- /dev/null +++ b/dzen2.spec @@ -0,0 +1,103 @@ +Name: dzen2 +Version: 0.8.5 +Release: 5%{?dist} +Summary: A general purpose messaging and notification program + +Group: User Interface/X +License: MIT +URL: http://gotmor.googlepages.com/dzen +Source0: http://gotmor.googlepages.com/%{name}-latest.tar.gz +Source1: dzen2.1 +Source2: dzen2-dbar.1 +Source3: dzen2-gcpubar.1 +Source4: dzen2-gdbar.1 +Source5: dzen2-textwidth.1 + +# 2007-12-26: sent to upstream via private e-mail, inclusion depends on usability +# for *BSD and Solaris +Patch0: dzen2-0.8.5-check_environment.patch +# Not sent to upstream: removes strip and shows cc invocations, which seems not to +# be wanted by upstream +Patch1: dzen2-0.8.5-verbose.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: libXpm-devel libXinerama-devel + +%description +Dzen is a general purpose messaging, notification and menuing program for X11. +It was desigend to be scriptable in any language and integrate well with window +managers like dwm, wmii and xmonad though it will work with any windowmanger. + + +%prep +%setup -q +%patch0 -p1 -b .check_environment +%patch1 -p1 -b .verbose + + +%build +export CFLAGS="${RPM_OPT_FLAGS}" +export LDFLAGS="${RPM_OPT_FLAGS}" +make %{?_smp_mflags} DZEN_XINERAMA=1 DZEN_XPM=1 +make -C gadgets %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +mkdir $RPM_BUILD_ROOT +export CFLAGS="${RPM_OPT_FLAGS}" +make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} DZEN_XINERAMA=1 DZEN_XPM=1 +make -C gadgets install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} +for gadget in dbar gcpubar gdbar textwidth +do +mv $RPM_BUILD_ROOT%{_bindir}/{,dzen2-}"${gadget}" +done + +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 +for manpage in %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} +do +install -m 0644 "${manpage}" $RPM_BUILD_ROOT%{_mandir}/man1/"${manpage##*/}" +done + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +# There is no .desktop file, because the applications displays data received +# via stdin, e.g. from xmonad, a window manager +# This cannot be done using a .desktop file +%doc LICENSE CREDITS README README.dzen +%doc gadgets/README.* +%{_bindir}/dzen2 +%{_bindir}/dzen2-dbar +%{_bindir}/dzen2-gcpubar +%{_bindir}/dzen2-gdbar +%{_bindir}/dzen2-textwidth +%{_mandir}/man1/dzen2.1* +%{_mandir}/man1/dzen2-dbar.1* +%{_mandir}/man1/dzen2-gcpubar.1* +%{_mandir}/man1/dzen2-gdbar.1* +%{_mandir}/man1/dzen2-textwidth.1* + + +%changelog +* Thu Aug 27 2009 Till Maas - 0.8.5-5 +- Remove uneeded PREFIX= argument to make in %%build + +* Wed Aug 26 2009 Till Maas - 0.8.5-4 +- export LDFLAGS +- explain missing .desktop file + +* Tue Aug 25 2009 Till Maas - 0.8.5-3 +- use make -C instead of pushd/popd +- add manpages from debian +- prefix gadgets with dzen2 like debian does it + +* Tue Mar 31 2009 Till Maas - 0.8.5-2 +- Add description + +* Sat Nov 01 2008 Till Maas - 0.8.5-1 +- Initial package for Fedora diff --git a/import.log b/import.log new file mode 100644 index 0000000..9677f71 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +dzen2-0_8_5-5_fc10:HEAD:dzen2-0.8.5-5.fc10.src.rpm:1251475848 diff --git a/sources b/sources index e69de29..c3f24bb 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +5978620c2124c8a8ad52d7f17ce94fd7 dzen2-latest.tar.gz