From owner-freebsd-ports Sun Jan 2 9:36:54 2000 Delivered-To: freebsd-ports@freebsd.org Received: from Genesis.Denninger.Net (209-176-244-82.inil.com [209.176.244.82]) by hub.freebsd.org (Postfix) with ESMTP id 07CA614C49 for ; Sun, 2 Jan 2000 09:36:49 -0800 (PST) (envelope-from karl@Genesis.Denninger.Net) Received: (from karl@localhost) by Genesis.Denninger.Net (8.9.3/8.8.2) id LAA25089; Sun, 2 Jan 2000 11:36:46 -0600 (CST) Message-ID: <20000102113646.A23255@Denninger.Net> Date: Sun, 2 Jan 2000 11:36:46 -0600 From: Karl Denninger To: Steve Price Cc: freebsd-ports@FreeBSD.ORG Subject: Re: ports/15822: Update port misc/HomeDaemon to V0.99 References: <20000101222748.A21389@Denninger.Net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: ; from Steve Price on Sun, Jan 02, 2000 at 11:02:49AM -0600 Organization: Karl's Sushi and Packet Smashers X-Die-Spammers: Spammers cheerfully broiled for supper and served with ketchup! Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, Jan 02, 2000 at 11:02:49AM -0600, Steve Price wrote: > Karl, > > Attached is a new shar file. I made some minor mods that probably > need clarification. > > 1) The 'Whom:' line in the port's Makefile changed. This format is > preferred so we know who created the port and what their email > address is. You can change it to HomeDaemon@ if you'd like. Yes. A role account is appropriate here. > 2) No need to pass things from the port's Makefile to the main > Makefile if we like the default values there. Less to maintain > too. :) Weeeeeeellllll, yes and no. I prefer to pass them through for a bunch of reasons, not the least of which is making them visible. Unless there is a serious objection I'd like to leave that alone as I submitted it. Note that I had to use "X"-prefixed variables in a bunch of instances here (due to the system having obstinate ideas about what was "supposed" to be in some of them when built outside of the PORTS system - keeping compatible with that is one of my MAJOR goals here) In particular, I want the binary ownership to be evident along with the defaults. The best way to do that in a port seems to me to expose them in the Makefile. > 3) I added back the '@unexec rmdir ...' to the pkg/PLIST. These lines > are required for a clean deinstall. They *will not* remove any > user created configuration files. If the user has copied the > .sample files over then they will be left along with the directories. > However, if the user installs the port, reads the README, and > decides this port is not for her, then when she does a pkg_delete > everything this port installed gets removed. This is very important. > I also sorted the PLIST to make it easier to find files. Ok. > 4) Install HomeDaemon.rc as HomeDaemon.sh so that it gets picked up > automatically at startup. As a .rc file the user has to tweak > config scripts or start it manually and that is probably not what > is desired. Ok. > 5) Move '-O' to 'CFLAGS?= -O'. This is so that if the user wants to > do a CFLAGS="-O3 -pipe" they can. This has exactly the same effect > if the user doesn't define CFLAGS and the way you had it before. > It just doesn't force me to use -O. > > 6) Added 'CC?= cc' and deployed it. You were using the default make > rule to build the .o files and then hardcoding cc(1) to build the > executables. If I did a 'CC=gcc make', and cc and gcc weren't > the same compiler then this could spell disaster. > > 7) Use ${SHELL} instead of sh. Some systems (eg. Solaris) use /sbin/sh > which may not be in the user's PATH. I can live with these in the base and made the changes; I also am now passing the CFLAGS to the link stage, which is important to pick up the strip option (and to make it easy to change to "-g" for symbols). > 8) Ensure that PREFIX gets passed to install-default-files, otherwise > HomeDaemon.sh gets installed to a hardcoded /usr/local/etc/rc.d > which defeats the purpose of allowing the user to install into a > new PREFIX. There are a lot of ways to do this and I chose the > easiest but not necessarily the cleanest way. That's easily fixed; I'll do it slightly differently in the base. > 9) In install-default-files instead of testing for $1/lib/foo and > installing in /usr/local/share/HomeDaemon/lib/foo, use $1 all the > time. Ditto; fixed. > 10) Made HomeDaemon.sh PREFIX-compliant so no hand tweaking other than > copying the .sample files over is required if PREFIX is not > /usr/local. Uh, I didn't see that one in the shar you posted here. That one, if you want it, HAS to be either a patch or done from the Makefile during install, since "PREFIX" is a concept that not all systems have and certainly cannot be counted on after the install is complete. > 11) Added the missing events.sample to pkg/PLIST. Ok. > Seems like a lot, but it really isn't. Mostly cosmetic changes. > Comments? > > We probably need to have a pkg/INSTALL so that we can make the package > PREFIX-compliant. Right now whatever you build with you're stuck with > on pkg_add(1). However it won't work 100% without support (maybe a -f > switch to the main daemon) that allows the PREFIX to be set when the > daemon starts at bootup. I don't like the pkg/INSTALL. Hell, I don't like the PACKAGE format for this in the FIRST PLACE! Since you MUST have a compiler to run this anyway (Dan Lancini's code pretty much makes that mandatory) the entire concept of loading this from a package is rather silly. But, in the interests of peace, we can leave it package-buildable. Please find enclosed a new "shar" reflecting the above; the repository has been updated to work with this. -- -- Karl Denninger (karl@denninger.net) Web: http://childrens-justice.org Isn't it time we started putting KIDS first? See the above URL for a plan to do exactly that! # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # . # ./Makefile # ./files # ./files/md5 # ./pkg # ./pkg/COMMENT # ./pkg/DESCR # ./pkg/PLIST # ./pkg/MESSAGE # echo c - . mkdir -p . > /dev/null 2>&1 echo x - ./Makefile sed 's/^X//' >./Makefile << 'END-of-./Makefile' X# New ports collection makefile for: HomeDaemon X# Version required: 0.99 X# Date created: 1 January 2000 X# Whom: HomeDaemon@denninger.net (Karl Denninger) X# X# $FreeBSD$ X# X XDISTNAME= HomeDaemon-0.99 XCATEGORIES= misc XMASTER_SITES= http://genesis.denninger.net/ X XMAINTAINER= HomeDaemon@denninger.net X XNO_CDROM="No commercial sale w/o permission - see README and LICENSE" X XBINMODE= 4700 XBINOWN= xten XSHAREMODE= 700 XSHAREOWN= ${BINOWN} XSHAREDIR= ${PREFIX}/share/HomeDaemon X XMAKE_ENV+= PREFIX=${PREFIX} XBINMODE=${BINMODE} XBINOWN=${BINOWN} \ X XSHAREMODE=${SHAREMODE} XSHAREOWN=${SHAREOWN} \ X XSHAREDIR=${SHAREDIR} X X.include END-of-./Makefile echo c - ./files mkdir -p ./files > /dev/null 2>&1 echo x - ./files/md5 sed 's/^X//' >./files/md5 << 'END-of-./files/md5' XMD5 (HomeDaemon-0.99.tar.gz) = 36360c1fff45071ca296ac31dc9a806b END-of-./files/md5 echo c - ./pkg mkdir -p ./pkg > /dev/null 2>&1 echo x - ./pkg/COMMENT sed 's/^X//' >./pkg/COMMENT << 'END-of-./pkg/COMMENT' XHome automation software that runs on FreeBSD (see the README) END-of-./pkg/COMMENT echo x - ./pkg/DESCR sed 's/^X//' >./pkg/DESCR << 'END-of-./pkg/DESCR' X* HomeDaemon - Home Automation Software for FreeBSD X* Supports the CM11A X10 powerline interface and Applied Digital's protocol X* VERSION 0.99 X* X* NOTE! BETA SOFTWARE! USE AT YOUR OWN RISK! X* X* This entire software package is Copyright 1999 Karl Denninger X* All rights reserved. X* X* RESTRICTED RIGHTS - SEE THE README FILE FOR MORE INFORMATION X XThis package requires: X X1. A free serial port (to connect the CM11A computer interface) and X (optionally) a second port for an Applied Digital RS-422 bridge X2. A CM11A (you can obtain one from Radio Shack or http://www.x10.com) X and (optional) the Applied Digital Bridge (for ADICON support) X3. Dan Lancini's "x10d" package (see above) X XCURRENT code is available at http://genesis.denninger.net X XONE FINAL WARNING - IF YOU DO NOT LOOK AT THE README FILE, THIS PORT XWILL NOT WORK! REQUIRED CONFIGURATION INFORMATION IS IN THAT FILE! X X- Karl Denninger Xkarl@denninger.net END-of-./pkg/DESCR echo x - ./pkg/PLIST sed 's/^X//' >./pkg/PLIST << 'END-of-./pkg/PLIST' Xbin/HomeDaemon-appdig Xbin/HomeDaemon-dump Xbin/HomeDaemon-events Xbin/HomeDaemon-parse Xbin/HomeDaemon-shmem Xbin/HomeDaemon-status.cgi Xbin/appdig-clear Xbin/appdig-setup Xetc/rc.d/HomeDaemon.sh Xshare/HomeDaemon/LICENSE Xshare/HomeDaemon/README Xshare/HomeDaemon/lib/appdig.devices.sample Xshare/HomeDaemon/lib/events.english.sample Xshare/HomeDaemon/lib/events.sample Xshare/HomeDaemon/lib/localize.sample X@unexec rmdir %D/share/HomeDaemon/lib > /dev/null 2>&1 || true X@unexec rmdir %D/share/HomeDaemon > /dev/null 2>&1 || true END-of-./pkg/PLIST echo x - ./pkg/MESSAGE sed 's/^X//' >./pkg/MESSAGE << 'END-of-./pkg/MESSAGE' XYou must view the files README and LICENSE for important information! X XTHIS SOFTWARE WILL NOT OPERATE UNTIL YOU HAVE READ AND FOLLOWED THE XINSTRUCTIONS IN THESE TWO FILES! X XBy default these files are installed in your $PREFIX/share/HomeDaemon, which Xby convention is /usr/local/share/HomeDaemon. X XThe start-up script is to be found in /usr/local/etc/rc.d/HomeDaemon.rc; Xlook here for the start-up sequence and modify as needed. X XNOTE THAT THIS PACKAGE WILL NOT OPERATE UNTIL IT IS CONFIGURED, as it XREQUIRES several files in that directory tree to be copied from the X"samples" provided. X XCopy each to a file with the same name but without the ".sample" suffix, Xand edit as appropriate before attempting to start the software. X XYou must also obtain Dan Lancini's x10d_cm11 software and build it before Xthis package will operate correctly. See the README for more details. X XThe home page for HomeDaemon is found on the web at Xhttp://www.denninger.net/homedaemon.htm. X XPlease Check here for updated information or if you have trouble with Xthis package. END-of-./pkg/MESSAGE exit To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message