From 477233436d34c62c0a4ba169bc523a8403ff82bf Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 7 Jan 2006 01:08:49 +0000 Subject: [PATCH] Added heyu, thanks to Geoffrey Kruse, closes #131 SVN-Revision: 2851 --- openwrt/package/Config.in | 1 + openwrt/package/Makefile | 1 + openwrt/package/heyu/Config.in | 8 + openwrt/package/heyu/Makefile | 33 +++ openwrt/package/heyu/files/x10.conf | 24 +++ .../package/heyu/ipkg/files/heyu.conffiles | 1 + openwrt/package/heyu/ipkg/heyu.control | 7 + .../heyu/patches/01-avoid_configure.patch | 194 ++++++++++++++++++ openwrt/package/wx200d/Config.in | 1 + 9 files changed, 270 insertions(+) create mode 100644 openwrt/package/heyu/Config.in create mode 100644 openwrt/package/heyu/Makefile create mode 100644 openwrt/package/heyu/files/x10.conf create mode 100644 openwrt/package/heyu/ipkg/files/heyu.conffiles create mode 100644 openwrt/package/heyu/ipkg/heyu.control create mode 100644 openwrt/package/heyu/patches/01-avoid_configure.patch diff --git a/openwrt/package/Config.in b/openwrt/package/Config.in index 320fd6cba9e1..322f2a5ad362 100644 --- a/openwrt/package/Config.in +++ b/openwrt/package/Config.in @@ -240,6 +240,7 @@ source "package/peercast/Config.in" source "package/setpwc/Config.in" comment "Serial communications & terminal emulation" +source "package/heyu/Config.in" source "package/lrzsz/Config.in" source "package/microcom/Config.in" source "package/picocom/Config.in" diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 04551c234d6e..78a8e2ee7023 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -56,6 +56,7 @@ package-$(BR2_COMPILE_GNUTLS) += gnutls package-$(BR2_PACKAGE_GPSD) += gpsd package-$(BR2_COMPILE_GSM) += gsm package-$(BR2_PACKAGE_HASERL) += haserl +package-$(BR2_PACKAGE_HEYU) += heyu package-$(BR2_PACKAGE_HOSTAP_UTILS) += hostap-utils package-$(BR2_PACKAGE_HOSTAPD) += hostapd package-$(BR2_COMPILE_HOWL) += howl diff --git a/openwrt/package/heyu/Config.in b/openwrt/package/heyu/Config.in new file mode 100644 index 000000000000..c8e178391b76 --- /dev/null +++ b/openwrt/package/heyu/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HEYU + prompt "heyu.............................. X10 home automation control using a CM11A" + tristate + default m if CONFIG_DEVEL + help + X10 home automation control using the CM11A serial device. + + See http://heyu.tanj.com/heyu2/ for details. diff --git a/openwrt/package/heyu/Makefile b/openwrt/package/heyu/Makefile new file mode 100644 index 000000000000..9262b46ea8f9 --- /dev/null +++ b/openwrt/package/heyu/Makefile @@ -0,0 +1,33 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=heyu +PKG_VERSION:=2.0beta.2 +PKG_RELEASE:=2 +PKG_MD5SUM:=b7bd60580f74998ae7733e4711942c74 +PKG_SOURCE_URL:=http://heyu.tanj.com/heyu2/ +PKG_SOURCE:=heyu-$(PKG_VERSION).tgz +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_CAT:=zcat + +include $(TOPDIR)/package/rules.mk + +$(eval $(call PKG_template,HEYU,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +$(PKG_BUILD_DIR)/.configured: + touch $@ + +$(PKG_BUILD_DIR)/.built: + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \ + CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR) -DSYSV -DPOSIX -DHAS_ITIMER -DLINUX -DHASSELECT -DHASTZ" + touch $@ + +$(IPKG_HEYU): + install -d -m0755 $(IDIR_HEYU)/etc/$(PKG_NAME) + install -m0644 ./files/x10.conf $(IDIR_HEYU)/etc/$(PKG_NAME)/x10.conf + install -d -m0755 $(IDIR_HEYU)/usr/bin + install -m0644 $(PKG_BUILD_DIR)/heyu $(IDIR_HEYU)/usr/bin/ + $(RSTRIP) $(IDIR_HEYU) + $(IPKG_BUILD) $(IDIR_HEYU) $(PACKAGE_DIR) diff --git a/openwrt/package/heyu/files/x10.conf b/openwrt/package/heyu/files/x10.conf new file mode 100644 index 000000000000..3cacaf5e8a9a --- /dev/null +++ b/openwrt/package/heyu/files/x10.conf @@ -0,0 +1,24 @@ +# this file should contain x10 appliance aliases, one per line, as: +# appliance-name housecode modulenumber +# for example: +# mydesklamp A 4 +# atticfan B 3 +# sumppump C 3 +# manythings J 1-4 +# +# IMPORTANT! disable the serial console if you need to use heyu +# on /dev/tts/0. Read http://forum.openwrt.org/viewtopic.php?id=1767 +# +# NOTE: using /dev/tts/1 requires the setserial package to +# set the port to use irq 3, otherwise performance will be +# unbearable as it is polled. +# +TTY /dev/tts/1 +# +# give your location - for computing sunrise and sunset times +# Boston, MA USA: +#LATITUDE N42:20 +#LONGITUDE W71:05 +# Menlo Park, CA USA: +LATITUDE N37:43 +LONGITUDE W122:20 diff --git a/openwrt/package/heyu/ipkg/files/heyu.conffiles b/openwrt/package/heyu/ipkg/files/heyu.conffiles new file mode 100644 index 000000000000..f3c36bc00f49 --- /dev/null +++ b/openwrt/package/heyu/ipkg/files/heyu.conffiles @@ -0,0 +1 @@ +/etc/heyu/x10.conf diff --git a/openwrt/package/heyu/ipkg/heyu.control b/openwrt/package/heyu/ipkg/heyu.control new file mode 100644 index 000000000000..c2800f6018b0 --- /dev/null +++ b/openwrt/package/heyu/ipkg/heyu.control @@ -0,0 +1,7 @@ +Package: heyu +Priority: optional +Section: misc +Maintainer: Gregory P. Smith +Source: buildroot internal +Description: X10 home automation control using the CM11A +Depends: setserial diff --git a/openwrt/package/heyu/patches/01-avoid_configure.patch b/openwrt/package/heyu/patches/01-avoid_configure.patch new file mode 100644 index 000000000000..894397ad8673 --- /dev/null +++ b/openwrt/package/heyu/patches/01-avoid_configure.patch @@ -0,0 +1,194 @@ +diff -urN orig/heyu-2.0beta.2/Makefile heyu-2.0beta.2/Makefile +--- orig/heyu-2.0beta.2/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ heyu-2.0beta.2/Makefile 2006-01-07 01:53:25.000000000 +0100 +@@ -0,0 +1,183 @@ ++# Makefile for HEYU, a program to control an X10 CM11A computer interface. ++# This makefile is generated by the Configure program. ++# ++BIN = /usr/bin ++MAN = /usr/man/man1 ++MAN5 = /usr/man/man5 ++GROUP = sys ++OWNER = root ++ ++# set DFLAGS equal to: ++# -DSYSV if using SYSTEM V ++# -DVOID if compiler doesn't understand 'void' ++ ++#This makefile is built for linux ++DFLAGS = -DSYSV -DPOSIX -DHAS_ITIMER -DLINUX -DHASSELECT -DHASTZ ++LIBS = -lm -lc ++# # The rest of the makefile should need no changes ++ ++## Makefile template for Heyu, a program to control an X10 CM11A computer ++## interface. From this point on the Makefile is copied from Makefile.in ++## by the Configure program ++ ++SRCS = date.c erase.c info.c message.c relay.c \ ++ monitor.c reset.c setclock.c stop.c \ ++ tty.c turn.c x10.c xread.c xwrite.c status.c cm11a.c \ ++ eeprom.c preset.c process.c sun.c cmd.c config.c x10state.c \ ++ poll.c modules.c ++ ++OBJS = date.o erase.o info.o message.o relay.o \ ++ monitor.o reset.o setclock.o stop.o \ ++ tty.o turn.o x10.o xread.o xwrite.o status.o cm11a.o \ ++ eeprom.o preset.o process.o sun.o cmd.o config.o x10state.o \ ++ poll.o modules.o ++ ++OTHERSRC = README README2 Makefile x10config.sample protocol.txt eeprom.h \ ++ x10.sched.sample monit x10biff heyu.1 x10.h x10config.5 \ ++ history.txt version.h heyufaq.txt x10sched.5 process.h sun.h \ ++ x10scripts.5 Configure Makefile.in install.sh INSTALL LICENSE ++ ++EVERYTHING = $(OTHERSRC) $(SRCS) ++ ++all: heyu ++ ++heyu: $(OBJS) version.h ++ $(CC) $(LDFLAGS) -o heyu $(OBJS) $(LIBS) ++ @echo `id` >usergroup.tmp ++ @echo ${HOME} >userhome.tmp ++ @echo "** Now become root and run 'make install' **" ++ ++$(OBJS): x10.h process.h sun.h ++ ++eeprom.o: eeprom.h ++ ++install: $(BIN)/heyu $(MAN)/heyu.1 $(MAN5)/x10config.5 $(MAN5)/x10sched.5 \ ++ $(MAN5)/x10scripts.5 ++ ++uninstall: ++ rm -f $(BIN)/heyu ++ rm -f $(MAN)/heyu.1 ++ rm -f $(MAN5)/x10config.5 ++ rm -f $(MAN5)/x10sched.5 ++ rm -f $(MAN5)/x10scripts.5 ++ ++$(BIN)/heyu: heyu ++ mkdir -p -m 755 $(BIN) ++ cp heyu $(BIN) ++ chgrp $(GROUP) $(BIN)/heyu ++ chmod 755 $(BIN)/heyu ++ chown $(OWNER) $(BIN)/heyu ++ ./install.sh ++ ++$(MAN)/heyu.1: heyu.1 ++ mkdir -p -m 755 $(MAN) ++ cp heyu.1 $(MAN) ++ chmod 644 $(MAN)/heyu.1 ++ ++$(MAN5)/x10config.5: x10config.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10config.5 $(MAN5) ++ chmod 644 $(MAN5)/x10config.5 ++ ++$(MAN5)/x10sched.5: x10sched.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10sched.5 $(MAN5) ++ chmod 644 $(MAN5)/x10sched.5 ++ ++$(MAN5)/x10scripts.5: x10scripts.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10scripts.5 $(MAN5) ++ chmod 644 $(MAN5)/x10scripts.5 ++ ++lint: ++ lint $(DFLAGS) $(SRCS) ++ ++shar: x10_heyu.shar.1 x10_heyu.shar.2 ++ ++x10.o: x10.c version.h ++ ++ci: $(SRCS) index.html Makefile ++ @ for FL in $+ ; do \ ++ if test -w $$FL ; then \ ++ ci -l $$FL ;\ ++ fi ;\ ++ done ++ ++x10_heyu.shar.1: ++ shar $(OTHERSRC) >x10_heyu.shar.1 ++ ++x10_heyu.shar.2: ++ shar $(SRCS) > x10_heyu.shar.2 ++ ++bigshar: ++ shar $(EVERYTHING) > x10_heyu.shar ++ ++tar: x10_heyu.tgz ++ ++x10_heyu.tgz: $(EVERYTHING) ++ rm -fr heyu.dir ++ mkdir heyu.dir ++ cp -p $(EVERYTHING) heyu.dir ++ cp Makefile.dist heyu.dir/Makefile ++ tar -czvf x10_heyu.tgz heyu.dir ++ ++heyudistro: $(EVERYTHING) ++ rm -rf distro.dir ++ mkdir distro.dir ++ cp -p $(EVERYTHING) distro.dir ++ cp -p release_notes.txt distro.dir ++ rm distro.dir/Makefile ++ ++ ++beta: x10_beta.tgz ++ ++x10_beta.tgz: $(EVERYTHING) ++ rm -fr heyu.beta ++ mkdir heyu.beta ++ cp -p $(EVERYTHING) heyu.beta ++ cp Makefile.dist heyu.dir/Makefile ++ tar -czvf x10_beta.tgz heyu.beta ++ ++zip: x10_heyu.zip ++ ++x10_heyu.zip: $(EVERYTHING) ++ rm -f x10_heyu.zip ++ zip -kl x10_heyu.zip $(EVERYTHING) ++ ++touch: ++ touch $(OTHERSRC) ++ touch $(SRCS) ++ ++clean: ++ rm -f *.o ++ ++clobber: clean ++ rm -f heyu ++ ++upload: heyu index.html x10_heyu.tgz x10_heyu.zip ++ /bin/sh -c ./upload.sh ++ ++rcsdiffrw: ++ @-for x in `$(MAKE) rw` ;\ ++ do \ ++ echo ;\ ++ echo $$x ;\ ++ echo ========= ;\ ++ rcsdiff $$x ;\ ++ done 2>&1 ;\ ++ echo ;\ ++ echo all done ++ ++list: ++ @ls $(EVERYTHING) | more ++ ++rw: ++ @ls -l $(EVERYTHING) | \ ++ egrep '^[^l].w' | \ ++ sed 's;.* ;;' # strip to last space ++ ++populate: $(EVERYTHING) ++ ++$(EVERYTHING): ++## co -r$(revision) $@ ++ +diff -urN orig/heyu-2.0beta.2/local.h heyu-2.0beta.2/local.h +--- orig/heyu-2.0beta.2/local.h 1970-01-01 01:00:00.000000000 +0100 ++++ heyu-2.0beta.2/local.h 2006-01-07 01:54:13.000000000 +0100 +@@ -0,0 +1,3 @@ ++#define USESIGINT 1' ++#define SPOOLDIR "/tmp" ++#define LOCKDIR "/tmp" diff --git a/openwrt/package/wx200d/Config.in b/openwrt/package/wx200d/Config.in index b7e88ca4e255..f9c5b6b66c50 100644 --- a/openwrt/package/wx200d/Config.in +++ b/openwrt/package/wx200d/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_WX200D prompt "wx200d............................ weather station data collector" tristate default m if CONFIG_DEVEL + select BR2_PACKAGE_LIBPQ help wx200d is a weather station data collector and server daemon for the WX200, WM918, WMR918 and WMR968 weather station -- 2.30.2