[EMAIL PROTECTED] wrote: > > It's that way now, but I've just a few things to tidy up. The last > > file I used this on was SING, and it worked well. I'm putting > > documentation into the Makefile, and more. Once I get this fixed up, > > I'll start cleaning the CDROM out, throwing out precompiled source in > > favor of the source files and a LRP diff. > > Would you mind sharing before you go into production? Of course. I've now compiled one for SING-1.1, and it seems to be quite complete - whether it is robust or not I'll leave to you :-) To make this work, either create a directory (just to see it) or download SING-current.tar.gz (and unpack it) - then change to the appropriate directory and do: patch -p1 < ../SING-1.1-lrp.diff Then, to compile SING, (assuming an appropriate environment... but the compilation doesn't depend on glibc 2.0.7, just everyone else's LRP :-) try this: cd SING-1.1 ./configure --prefix=/ make # here is the LRP part cd lrp make This should create sing.lrp in the lrp/ directory. Documentation is in the Makefile mostly.
diff -uNr SING-1.1/lrp/Makefile SING-1.1-lrp/lrp/Makefile --- SING-1.1/lrp/Makefile Wed Dec 31 18:00:00 1969 +++ SING-1.1-lrp/lrp/Makefile Tue May 8 12:16:22 2001 @@ -0,0 +1,115 @@ +#---------------------------------------- +# PACKAGE SPECIFICS +#---------------------------------------- +# Modify the following for the package being created. + +# Package name +PKG = sing + +# Source filename and destination directory pairs +PAIRS = ../sing usr/bin + +# Version numbers of this binary and package +VERSION = 1.1 +RELEASE = 3 + +# Man page source +MANPAGE = ../sing.8 + +# Source tar file dependencies +# ...these are *NOT* resolved, but must be redone +# one level up +DEPS = ../sing.8 ../sing + +# Binaries to strip +STRIP = usr/bin/sing + +# Source help file name (overrides man page) +# ...create in this directory if desired +# HELPFILE = $(PKG).help + +# Source configuration file name +# ...create in this directory if desired +# CONFFILE = $(PKG).conf + +# These are the destination help and conf files; +# if these files will not exist comment the line out +HELPF = $(BASE)/$(LRPKG)/$(PKG).help +# CONFF = $(BASE)/$(LRPKG)/$(PKG).conf + +#---------------------------------------- +# GENERAL +#---------------------------------------- + +BASE = pkg +DIRS = bin sbin usr etc lib +LRPKG = var/lib/lrpkg +DOCS = usr/share/doc +PKGDOCS = $(BASE)/$(DOCS)/$(PKG)-$(VERSION) +LISTF = $(BASE)/$(LRPKG)/$(PKG).list +VRSNF = $(BASE)/$(LRPKG)/$(PKG).version +PKGFILES = $(LISTF) $(HELPF) $(CONFF) $(VRSNF) + +all: $(PKG).lrp + +# pkg.conf: contains a list of configuration files with +# optional description (separated by tab) + +$(CONFF): + [ -d $(BASE)/$(LRPKG) ] || mkdir -p $(BASE)/$(LRPKG) + if [ -n "$(CONFFILE)" -a -f "$(CONFFILE)" ] ; then \ + cp -a $(CONFFILE) $(CONFF) ; \ + fi + +# pkg.list: contains a list of ambiguous filenames and +# paths - files to be included in the package + +$(LISTF): + chmod 755 ./list2 + [ -d $(BASE)/$(LRPKG) ] || mkdir -p $(BASE)/$(LRPKG) + ./list2 $(PKG) $(PAIRS) + +# pkg.version: contains the version of this package + +$(VRSNF): + [ -d $(BASE)/$(LRPKG) ] || mkdir -p $(BASE)/$(LRPKG) + echo $(VERSION)-$(RELEASE) > $(VRSNF) + +# mkdir -p $(PKGDOCS) ; \ +# echo "$(DOCS)/$(PKG)-*" >> $(LRPKG)/$(PKG).list ; \ +# nroff -man $(MANPAGE) > $(DOCS)/`basename $(MANPAGE)` ; \ + +# pkg.help: a help file for the package + +$(HELPF): + [ -d $(BASE)/$(LRPKG) ] || mkdir -p $(BASE)/$(LRPKG) + if [ -n "$(HELPFILE)" -a -f "$(HELPFILE)" ] ; then \ + cp -a $(HELPFILE) $(HELPF) ; \ + else \ + if [ -n "$(MANPAGE)" ] ; then \ + nroff -man $(MANPAGE) > $(HELPF) ; \ + fi ; \ + fi + +# create the actual package here + +$(PKG).lrp: $(PKGFILES) $(DEPS) + chmod 755 ./cp2 ./mklrp + env BASE=$(BASE) ./cp2 $(PAIRS) + cd $(BASE) ; strip $(STRIP) + env BASE=$(BASE) ./mklrp $(PKG) + echo ; tar tzvf $@ + +# cleanup: +# +# clean - general cleanup +# spotless - clean out ALL nondistributed stuff +# distclean - another (more common) name for spotless + +clean: distclean + +spotless: distclean + +distclean: + rm -rf *.lrp $(BASE) + diff -uNr SING-1.1/lrp/cp2 SING-1.1-lrp/lrp/cp2 --- SING-1.1/lrp/cp2 Wed Dec 31 18:00:00 1969 +++ SING-1.1-lrp/lrp/cp2 Tue May 8 12:07:22 2001 @@ -0,0 +1,13 @@ +#!/bin/ksh + +BASE=${BASE:-pkg} + +while [ $# -gt 0 ]; do + DESTDIR=$BASE/$2 + SRCFILE=$1 + + [ ! -d $DESTDIR ] && mkdir -p $DESTDIR + cp -a $SRCFILE $DESTDIR + shift 2 +done + diff -uNr SING-1.1/lrp/list2 SING-1.1-lrp/lrp/list2 --- SING-1.1/lrp/list2 Wed Dec 31 18:00:00 1969 +++ SING-1.1-lrp/lrp/list2 Tue May 8 12:07:22 2001 @@ -0,0 +1,20 @@ +#!/bin/ksh + +PKG=$1 ; shift +BASE=${BASE:-pkg} +LRPKG=var/lib/lrpkg +LIST=$BASE/$LRPKG/$PKG.list + +mkdir -p $BASE/$LRPKG +echo > $LIST + +while [ $# -gt 0 ]; do + DIR=$2 + FILE=$(basename $1) + + echo $DIR/$FILE >> $LIST + shift 2 +done + +echo "var/lib/lrpkg/${PKG}.*" >> $LIST + diff -uNr SING-1.1/lrp/mklrp SING-1.1-lrp/lrp/mklrp --- SING-1.1/lrp/mklrp Wed Dec 31 18:00:00 1969 +++ SING-1.1-lrp/lrp/mklrp Tue May 8 12:07:22 2001 @@ -0,0 +1,10 @@ +#!/bin/ksh + +PKG=$1 +BASE=${BASE:-pkg} +HOME=$(pwd) +PKGLIST=var/lib/lrpkg/$PKG.list + +cd $BASE +tar cvf - $(cat $PKGLIST) | gzip -9 -c - > $HOME/$PKG.lrp +