Mail Archives: cygwin/2003/11/18/20:05:16
------=_NextPart_000_0049_01C3AE06.D74A8D90
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Igor,
Fixed the script patch as per your comment about -i. The `e [COMMAND]' is
still valid, as replacing it with 'r -' did not work.
Alan
-----Original Message-----
From: Igor Pechtchanski [mailto:pechtcha AT cs DOT nyu DOT edu]
Sent: November 18, 2003 13:02
To: alan DOT miles AT ieee DOT org
Cc: cygwin AT cygwin DOT com
Subject: Re: Diff for generic readme and generic-build script
On Mon, 17 Nov 2003, Alan Miles wrote:
> [snip]
> 7/ Note: the -i option to sed (quoting the man page for sed):
>
> -i[suffix], --in-place[=suffix]
> edit files in place (makes backup if extension supplied)
>
> Extended sed command:
>
> `e [COMMAND]'
> This command allows one to pipe input from a shell command into
> pattern space. Without parameters, the `e' command executes the
> command that is found in pattern space and replaces the pattern
> space with the output; a trailing new-line is suppressed.
>
> If a parameter is specified, instead, the `e' command interprets
> it as a command and sends it to the output stream (like `r' does).
> The command can run across multiple lines, all but the last
> ending with a back-slash.
>
> In both cases, the results are undefined if the command to be
> executed contains a NUL character.
>
> These together constitute the operation of the modifications.
Note: the -i option to sed is buggy, as it will go into an infinite loop
if /tmp is not writable (which does happen occasionally with Cygwin).
It's better to use explicit redirection and renaming instead.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
------=_NextPart_000_0049_01C3AE06.D74A8D90
Content-Type: application/octet-stream;
name="packaging_templates.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="packaging_templates.diff"
diff -ur Original/generic-build-script New/generic-build-script=0A=
--- Original/generic-build-script 2003-10-26 23:14:08.000000000 -0600=0A=
+++ New/generic-build-script 2003-11-18 18:57:24.202196800 -0600=0A=
@@ -24,6 +24,7 @@=0A=
export VER=3D`echo $tscriptname | sed -e "s/${PKG}\-//" -e =
's/\-[^\-]*$//'`=0A=
export REL=3D`echo $tscriptname | sed -e "s/${PKG}\-${VER}\-//"`=0A=
export FULLPKG=3D${PKG}-${VER}-${REL}=0A=
+export NEWVER=3D"" # Place Holder for 'newer' version number=0A=
=0A=
# determine correct decompression option and tarball filename=0A=
if [ -e ${PKG}-${VER}.tar.gz ] ; then=0A=
@@ -48,6 +49,7 @@=0A=
export instdir=3D${srcdir}/.inst=0A=
export srcinstdir=3D${srcdir}/.sinst=0A=
export checkfile=3D${topdir}/${FULLPKG}.check=0A=
+=0A=
# run on=0A=
host=3Di686-pc-cygwin=0A=
# if this package creates binaries, they run on=0A=
@@ -57,6 +59,8 @@=0A=
MY_CFLAGS=3D"-O2"=0A=
MY_LDFLAGS=3D=0A=
=0A=
+export =
ThePackageReadMeFile=3D"${instdir}${prefix}/share/doc/Cygwin/${PKG}-${VER=
}.README"=0A=
+=0A=
mkdirs() {=0A=
(cd ${topdir} && \=0A=
rm -fr ${objdir} ${instdir} ${srcinstdir} && \=0A=
@@ -123,11 +127,11 @@=0A=
fi && \=0A=
if [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.README ]; then \=0A=
/usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/${PKG}.README \=0A=
- ${instdir}${prefix}/share/doc/Cygwin/${PKG}-${VER}.README ; \=0A=
+ "${ThePackageReadMeFile}" ; \=0A=
else \=0A=
if [ -f ${srcdir}/CYGWIN-PATCHES/README ]; then \=0A=
/usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/README \=0A=
- ${instdir}${prefix}/share/doc/Cygwin/${PKG}-${VER}.README ; \=0A=
+ "${ThePackageReadMeFile}" ; \=0A=
fi ;\=0A=
fi ;\=0A=
if [ -f ${srcdir}/CYGWIN-PATCHES/postinstall.sh ] ; then \=0A=
@@ -142,9 +146,22 @@=0A=
true )=0A=
}=0A=
list() {=0A=
- (cd ${instdir} && \=0A=
- find . -name "*" ! -type d | sed 's/\.\/\(.*\)/\1/'=0A=
- true )=0A=
+ if [ -s "${ThePackageReadMeFile}" ]=0A=
+ then=0A=
+ (cd ${instdir} && =
\=0A=
+ find . -name "*" | sed 's/\.\/\(.*\)/ \/\1/' | =
\=0A=
+ sed -e "s#%PKG%#${PKG}#g" =
\=0A=
+ -e "s#%VER%#${VER}#g" =
\=0A=
+ -e "s#%REL%#${REL}#g" =
\=0A=
+ -e "s#%NEWER_VER%#${NEWVER}#g" =
\=0A=
+ -e '\|%THEFILES%| e /usr/bin/cat -' =
\=0A=
+ -e '\|%THEFILES%| d' =
\=0A=
+ "${ThePackageReadMeFile}" > =
\=0A=
+ "${ThePackageReadMeFile}.tmp" && =
\=0A=
+ mv -f "${ThePackageReadMeFile}.tmp" =
\=0A=
+ "${ThePackageReadMeFile}" && =
\=0A=
+ true )=0A=
+ fi=0A=
}=0A=
pkg() {=0A=
(cd ${instdir} && \=0A=
@@ -188,7 +205,7 @@=0A=
spkg) spkg ; STATUS=3D$? ;;=0A=
finish) finish ; STATUS=3D$? ;;=0A=
all) prep && conf && build && install && \=0A=
- strip && pkg && spkg && finish ; \=0A=
+ strip && list && pkg && spkg && finish ; \=0A=
STATUS=3D$? ;;=0A=
*) echo "Error: bad arguments" ; exit 1 ;;=0A=
esac=0A=
diff -ur Original/generic-readme New/generic-readme=0A=
--- Original/generic-readme 2003-09-12 12:36:02.000000000 -0500=0A=
+++ New/generic-readme 2003-11-17 17:24:44.467372800 -0600=0A=
@@ -1,4 +1,4 @@=0A=
-<package name>=0A=
+%PKG%=0A=
------------------------------------------=0A=
<short description, 2 or 3 lines>=0A=
=0A=
@@ -21,36 +21,36 @@=0A=
------------------------------------=0A=
=0A=
Build instructions:=0A=
- unpack <PKG>-VER-REL-src.tar.bz2=0A=
+ unpack %PKG%-%VER%-%REL%-src.tar.bz2=0A=
if you use setup to install this src package, it will be=0A=
unpacked under /usr/src automatically=0A=
cd /usr/src=0A=
- ./<PKG>-VER-REL.sh all=0A=
+ ./%PKG%-%VER%-%REL%.sh all=0A=
=0A=
This will create:=0A=
- /usr/src/<PKG>-VER-REL.tar.bz2=0A=
- /usr/src/<PKG>-VER-REL-src.tar.bz2=0A=
+ /usr/src/%PKG%-%VER%-%REL%.tar.bz2=0A=
+ /usr/src/%PKG%-%VER%-%REL%-src.tar.bz2=0A=
=0A=
-------------------------------------------=0A=
=0A=
Files included in the binary distro=0A=
=0A=
/usr/bin/...=0A=
- /usr/share/doc/<PKG>-<VER>/AUTHORS=0A=
- /usr/share/doc/<PKG>-<VER>/...=0A=
- /usr/share/doc/Cygwin/<PKG>-<VER>.README=0A=
+ /usr/share/doc/%PKG%-%VER%/AUTHORS=0A=
+ /usr/share/doc/Cygwin/%PKG%-%VER%.README=0A=
/usr/share/man/man1/...=0A=
/usr/share/info/...=0A=
- /etc/postinstall/<PKG>.sh=0A=
+ /etc/postinstall/%PKG%.sh=0A=
+%THEFILES%=0A=
=0A=
------------------=0A=
=0A=
Port Notes:=0A=
=0A=
------ version <newer VER> -----=0A=
+----- version %NEWER_VER% -----=0A=
Other information=0A=
=0A=
------ version <VER> -----=0A=
+----- version %VER% -----=0A=
Initial release=0A=
=0A=
=0A=
------=_NextPart_000_0049_01C3AE06.D74A8D90
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
------=_NextPart_000_0049_01C3AE06.D74A8D90--
- Raw text -