- Xchat morse code plugin, chat with other hams on IRC using cw

This commit is contained in:
Diane Bruce 2008-04-11 21:47:53 +00:00
parent f28c034e67
commit 4c56261c42
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=211096
6 changed files with 410 additions and 0 deletions

View file

@ -13,6 +13,7 @@
SUBDIR += bopm
SUBDIR += cgiirc
SUBDIR += ctrlproxy
SUBDIR += cwirc
SUBDIR += dancer
SUBDIR += darkbot
SUBDIR += dcc

41
irc/cwirc/Makefile Normal file
View file

@ -0,0 +1,41 @@
# ports collection makefile for: cwirc
# Date created: 9 April 2008
# Whom: db
#
# $FreeBSD$
#
PORTNAME= cwirc
PORTVERSION= 2.0.0
CATEGORIES= irc comms hamradio
MASTER_SITES= http://users.skynet.be/ppc/cwirc/download/ \
http://www.db.net/downloads/ \
${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= db
MAINTAINER= db@FreeBSD.org
COMMENT= X-Chat morse plugin
BUILD_DEPENDS= xchat:${PORTSDIR}/irc/xchat
post-patch:
${CP} ${FILESDIR}/Makefile ${WRKSRC}
${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \
${WRKSRC}/Makefile
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
.for f in COPYING LISEZMOI README RELEASE_NOTES
@${INSTALL_DATA} ${WRKSRC}/$f ${DOCSDIR}
.endfor
${MKDIR} ${DOCSDIR}/schematics
.for f in cw_oscillator.jpg rs232_key_connection.jpg
@${INSTALL_DATA} ${WRKSRC}/schematics/$f ${DOCSDIR}/schematics
.endfor
@${ECHO} ""
@${ECHO} "cwirc docs installed in ${DOCSDIR}"
@${ECHO} ""
.endif
.include <bsd.port.mk>

3
irc/cwirc/distinfo Normal file
View file

@ -0,0 +1,3 @@
MD5 (cwirc-2.0.0.tar.gz) = 08930a01c0d94b730e184a79bee7fe0c
SHA256 (cwirc-2.0.0.tar.gz) = 90e3bfa916fb8e5478739dc4d14b111bb2ffd1d1fd8ea81ab43486dc1e7e35c0
SIZE (cwirc-2.0.0.tar.gz) = 180759

341
irc/cwirc/files/Makefile Normal file
View file

@ -0,0 +1,341 @@
##### PLEASE SET THE FOLLOWING VARIABLES FIRST ################################
# - Set TARGET_OS to LINUX, FREEBSD or NETBSD.
#
# - PLUGIN_INSTALL_DIRECTORY is where the CWirc plugin stub (cwirc.so) is
# installed. It should be the X-Chat plugins directory, so the CWirc
# plugin is loaded automatically when X-Chat starts.
#
# - FRONTEND_INSTALL_DIRECTORY is where the CWirc frontend executable is
# installed. It should be a bin directory in the PATH, so the plugin
# portion can execute it.
#
# - CWIRC_EXTENSIONS_DIRECTORY is where CWirc will look for extension programs.
#
# - Define any additional linker flags your system might need in EXTRA_LDFLAGS
# (for example, "-lossaudio" with NetBSD 1.6.1)
################################################################################
#
# $FreeBSD$
TARGET_OS=FREEBSD
PLUGIN_INSTALL_DIRECTORY=%%PREFIX%%/lib/xchat/plugins
FRONTEND_INSTALL_DIRECTORY=%%PREFIX%%/bin
CWIRC_EXTENSIONS_DIRECTORY=%%PREFIX%%/share/cwirc/extensions
#EXTRA_LDFLAGS=
# Use these with Debian GNU/Linux for example
#TARGET_OS=LINUX
#PLUGIN_INSTALL_DIRECTORY=/usr/lib/xchat/plugins
#FRONTEND_INSTALL_DIRECTORY=/usr/bin
#CWIRC_EXTENSIONS_DIRECTORY=/usr/lib/cwirc/extensions
#EXTRA_LDFLAGS=
# Use these with FreeBSD 5.1 for example
#TARGET_OS=FREEBSD
#PLUGIN_INSTALL_DIRECTORY=/usr/X11R6/lib/xchat/plugins
#FRONTEND_INSTALL_DIRECTORY=/usr/X11R6/bin
#CWIRC_EXTENSIONS_DIRECTORY=/usr/X11R6/lib/cwirc/extensions
#EXTRA_LDFLAGS=
# Use these with NetBSD 1.6.1 for example
#TARGET_OS=NETBSD
#PLUGIN_INSTALL_DIRECTORY=/usr/pkg/lib/xchat/plugins
#FRONTEND_INSTALL_DIRECTORY=/usr/pkg/bin
#CWIRC_EXTENSIONS_DIRECTORY=/usr/pkg/lib/cwirc/extensions
#EXTRA_LDFLAGS=-lossaudio
################################################################################
VERSION=2.0.0
PLUGIN=cwirc.so
FRONTEND=cwirc_frontend
RM?=/bin/rm
CP?=/bin/cp
MKDIR?=/bin/mkdir
TAR?=tar
PWD?=pwd
CC?=gcc
STRIP?=strip
XCHAT_PLUGIN_INCLUDE_PATH=xchat
XCHAT_INC=-I$(XCHAT_PLUGIN_INCLUDE_PATH)
#CFLAGS=-Wall -Wstrict-prototypes -O2 -D$(TARGET_OS)
CFLAGS+= -D$(TARGET_OS)
GTK_CFLAGS=`pkg-config --cflags gtk+-2.0`
LDFLAGS=-lm ${EXTRA_LDFLAGS}
GTK_LDFLAGS=`pkg-config --libs gtk+-2.0`
all: missing_settings \
$(PLUGIN) \
$(FRONTEND)
install: missing_settings \
$(PLUGIN) \
$(FRONTEND)
$(MKDIR) -p $(PLUGIN_INSTALL_DIRECTORY)
$(MKDIR) -p $(CWIRC_EXTENSIONS_DIRECTORY)
$(CP) $(PLUGIN) $(PLUGIN_INSTALL_DIRECTORY)
$(MKDIR) -p $(FRONTEND_INSTALL_DIRECTORY)
$(CP) $(FRONTEND) $(FRONTEND_INSTALL_DIRECTORY)
uninstall: missing_settings
$(RM) -f $(PLUGIN_INSTALL_DIRECTORY)/$(PLUGIN)
$(RM) -f $(FRONTEND_INSTALL_DIRECTORY)/$(FRONTEND)
PLUGIN_OBJS= plugin.shared.o \
ipc.shared.o \
grid.shared.o \
propagation.shared.o \
cwframe.shared.o
FRONTEND_OBJS= frontend.o \
io.o \
gui.o \
ipc.o \
keyer.o \
grid.o \
propagation.o \
cwsound.o \
cwdecoder.o \
cwframe.o \
rcfile.o \
extension.o
$(PLUGIN): $(PLUGIN_OBJS)
$(CC) -shared $(LDFLAGS) -o $@ $(PLUGIN_OBJS)
$(STRIP) $@
$(FRONTEND): $(FRONTEND_OBJS)
$(CC) $(LDFLAGS) $(GTK_LDFLAGS) -o $@ $(FRONTEND_OBJS)
$(STRIP) $@
plugin.shared.o: plugin.c \
$(XCHAT_PLUGIN_INCLUDE_PATH)/xchat-plugin.h \
types.h \
common.h \
cwirc.h \
cwframe.h \
ipc.h
$(CC) $(CFLAGS) $(XCHAT_INC) -fPIC -c -o $@ plugin.c
frontend.o: frontend.c \
types.h \
cwirc.h \
common.h \
rcfile.h \
io.h \
gui.h \
extension.h \
ipc.h
$(CC) $(CFLAGS) $(XCHAT_INC) -c -o $@ frontend.c
io.o: io.c \
types.h \
io.h \
cwirc.h \
keyer.h \
cwsound.h \
cwdecoder.h \
propagation.h \
extension.h \
ipc.h
$(CC) $(CFLAGS) -c -o $@ io.c
gui.o: gui.c \
types.h \
gui.h \
common.h \
cwirc.h \
rcfile.h \
grid.h \
io.h \
cwdecoder.h \
extension.h \
keyer.h \
ipc.h \
smeter.xpm \
sidetone.xpm \
straightkey.xpm \
iambickey.xpm
$(CC) $(CFLAGS) $(GTK_CFLAGS) -c -o $@ gui.c
keyer.o: keyer.c \
types.h \
keyer.h
$(CC) $(CFLAGS) -c -o $@ keyer.c
grid.o: grid.c \
grid.h
$(CC) $(CFLAGS) -c -o $@ grid.c
grid.shared.o: grid.c \
grid.h
$(CC) $(CFLAGS) -fPIC -c -o $@ grid.c
propagation.o: propagation.c \
propagation.h
$(CC) $(CFLAGS) -c -o $@ propagation.c
propagation.shared.o: propagation.c \
propagation.h
$(CC) $(CFLAGS) -fPIC -c -o $@ propagation.c
cwsound.o: cwsound.c \
types.h \
cwsound.h \
sounder_down.h \
sounder_up.h
$(CC) $(CFLAGS) -c -o $@ cwsound.c
cwframe.o: cwframe.c \
types.h \
cwframe.h \
cwirc.h \
grid.h \
propagation.h \
io.h \
ipc.h
$(CC) $(CFLAGS) -c -o $@ cwframe.c
cwframe.shared.o: cwframe.c \
types.h \
cwframe.h \
cwirc.h \
grid.h \
propagation.h \
io.h \
ipc.h
$(CC) $(CFLAGS) -fPIC -c -o $@ cwframe.c
cwdecoder.o: cwdecoder.c \
types.h \
cwdecoder.h \
morsecodes.h \
cwirc.h
$(CC) $(CFLAGS) -c -o $@ cwdecoder.c
ipc.o: ipc.c \
ipc.h
$(CC) $(CFLAGS) -c -o $@ ipc.c
ipc.shared.o: ipc.c \
ipc.h
$(CC) $(CFLAGS) -fPIC -c -o $@ ipc.c
rcfile.o: rcfile.c \
types.h \
rcfile.h \
cwirc.h \
grid.h \
io.h \
cwdecoder.h
$(CC) $(CFLAGS) -c -o $@ rcfile.c
extension.o: extension.c \
types.h \
cwirc.h \
extension.h \
ipc.h \
common.h
$(CC) $(CFLAGS) -c -o $@ extension.c
sounder_down.h: sounder_down.wav \
mksndinclude
./mksndinclude sounder_down > $@ < sounder_down.wav
sounder_up.h: sounder_up.wav \
mksndinclude
./mksndinclude sounder_up > $@ < sounder_up.wav
mksndinclude: mksndinclude.c \
types.h
$(CC) $(CFLAGS) -o $@ mksndinclude.c
common.h:
echo "#define FRONTEND \"$(FRONTEND)\"" > $@
echo "#define VERSION \"$(VERSION)\"" >> $@
echo "#define EXTENSIONS_DIR \
\"$(CWIRC_EXTENSIONS_DIRECTORY)\"" >> $@
clean:
$(RM) -f $(FRONTEND)
$(RM) -f *.so
$(RM) -f *.o
$(RM) -f common.h
$(RM) -f sounder_down.h
$(RM) -f sounder_up.h
$(RM) -f mksndinclude
$(RM) -rf release
missing_settings:
@(if [ ! "$(TARGET_OS)" ] || \
[ ! "$(PLUGIN_INSTALL_DIRECTORY)" ] || \
[ ! "$(FRONTEND_INSTALL_DIRECTORY)" ] || \
[ ! "$(CWIRC_EXTENSIONS_DIRECTORY)" ];then \
echo; \
echo "*** Please edit the Makefile to ***"; \
echo "**** set the target OS and the ****"; \
echo "**** CWirc installation paths. ****"; \
echo; \
exit 1; \
fi)
########## RELEASE ONLY SECTION ################################################
SRCFILES= COPYING Changelog Makefile README LISEZMOI RELEASE_NOTES\
schematics/rs232_key_connection.jpg \
schematics/cw_oscillator.jpg cwdecoder.c cwframe.c \
cwsound.c frontend.c extension.c grid.c gui.c keyer.c \
io.c ipc.c mksndinclude.c plugin.c propagation.c \
rcfile.c \
cwdecoder.h cwframe.h cwirc.h cwsound.h extension.h \
grid.h gui.h keyer.h io.h ipc.h morsecodes.h \
propagation.h rcfile.h types.h xchat/xchat-plugin.h \
xchat/README.xchat_include_file \
straightkey.xpm iambickey.xpm smeter.xpm sidetone.xpm \
sounder_down.wav sounder_up.wav \
debian/changelog debian/compat debian/control \
debian/copyright debian/rules debian/watch \
rpm/cwirc.spec rpm/rpmmacros
release: source_release debian_release rpm_release
source_release: release/cwirc-$(VERSION).tar.gz
release/cwirc-$(VERSION).tar.gz:
$(MKDIR) -p release/cwirc-$(VERSION)
$(CP) --parents -a $(SRCFILES) release/cwirc-$(VERSION)
$(TAR) -C release -cvzf $@ cwirc-$(VERSION)
$(RM) -r release/cwirc-$(VERSION)
debian_release: release/cwirc-$(VERSION).tar.gz
$(MKDIR) -p release/debian
$(TAR) -C release/debian -zxf $<
(cd release/debian/cwirc-$(VERSION) && \
dpkg-buildpackage -rfakeroot)
$(RM) -rf release/debian/cwirc-$(VERSION)
rpm_release: release/cwirc-$(VERSION).tar.gz
$(MKDIR) -p release/rpm/RPM/BUILD
$(MKDIR) -p release/rpm/RPM/RPMS
$(MKDIR) -p release/rpm/RPM/SOURCES
$(MKDIR) -p release/rpm/RPM/SPECS
$(MKDIR) -p release/rpm/RPM/SRPMS
(if [ -f ~/.rpmmacros ];then \
$(CP) -a ~/.rpmmacros release/rpm/RPM; \
fi)
$(CP) rpm/rpmmacros ~/.rpmmacros
(RPMTOPDIR=`cd release/rpm/RPM && $(PWD)`; \
echo "%_topdir $$RPMTOPDIR" >> ~/.rpmmacros)
$(CP) release/cwirc-$(VERSION).tar.gz release/rpm/RPM/SOURCES
$(CP) rpm/cwirc.spec release/rpm/RPM/SPECS
rpm -ba release/rpm/RPM/SPECS/cwirc.spec
$(CP) release/rpm/RPM/RPMS/*/*.rpm release/rpm
$(CP) release/rpm/RPM/SRPMS/*.src.rpm release/rpm
$(RM) ~/.rpmmacros
(if [ -f release/rpm/RPM/.rpmmacros ];then \
$(CP) -a release/rpm/RPM/.rpmmacros ~; \
fi)
$(RM) -rf release/rpm/RPM
################################################################################

11
irc/cwirc/pkg-descr Normal file
View file

@ -0,0 +1,11 @@
CWirc is a plugin for the X-Chat IRC client to transmit raw morse code
over the internet using IRC servers as reflectors. The transmitted morse
code can be received in near real-time by other X-Chat clients with the CWirc
plugin. CWirc tries to emulate a standard amateur radio rig : it sends and
receives morse over virtual channels, and it can listen to multiple senders
transmitting on the same channel. Morse code is keyed locally using a
straight or iambic key connected to a serial port, or using the mouse buttons,
and the sound is played through the soundcard, or through an external sounder.
WWW: http://users.skynet.be/ppc/cwirc/

13
irc/cwirc/pkg-plist Normal file
View file

@ -0,0 +1,13 @@
bin/cwirc_frontend
lib/xchat/plugins/cwirc.so
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/LISEZMOI
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/RELEASE_NOTES
%%PORTDOCS%%%%DOCSDIR%%/schematics/cw_oscillator.jpg
%%PORTDOCS%%%%DOCSDIR%%/schematics/rs232_key_connection.jpg
%%PORTDOCS%%@dirrm %%DOCSDIR%%/schematics
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm share/cwirc/extensions
@dirrm share/cwirc
@dirrmtry lib/xchat/plugins