aboutsummaryrefslogtreecommitdiffstats
path: root/trio/README
blob: 55ad1b07de875513f29d806282bc18878073d44d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
README -- trio

Trio is a package with portable string functions. Including printf() clones
and others.

 Copyright (C) 1998-2001 by Bjorn Reese and Daniel Stenberg.

 Permission to use, copy, modify, and distribute this software for any
 purpose with or without fee is hereby granted, provided that the above
 copyright notice and this permission notice appear in all copies.

 THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
 CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.

Trio is intended to be an integral part of another application, so we
have not done anything to create a proper installation.

Compile with 'make' (edit the Makefile if you want a release build)

Test the package with 'make test'

Install by copying trio.h, triop.h, and libtrio.a (and man/man?/* if
you want documentation) to the appropriate directories.

Catch some usage examples in example.c

Send feedback and patches to the mailing list, subscription and other
information is found here:

        http://lists.sourceforge.net/lists/listinfo/ctrio-talk

Enjoy!

Trio web page

        http://daniel.haxx.se/trio/
: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#/bin/sh
#
# rpm2lsm -- generate Linux Software Map file from RPM meta information
#
# Author:       Eric S. Raymond <esr@thyrsus.com>, 31 July 2002
# Project page: http://www.catb.org/~esr/
#
# Requires fmt(1), awk(1), and rpm(8).

while getopts a:m:k:p: c;
do
  case $c in
   'a') author=$OPTARG;;
   'm') maintainer=$OPTARG;;
   'k') keywords=$OPTARG;;
   'p') platforms=$OPTARG;;
   '?') echo "rpm2lsm: invalid switch specified - aborting."; exit 1;;
  esac
done
shift `expr $OPTIND - 1`

# If no RPM was given, look in the current directory and pick the last
# one in sort order.  That's likely to be the most recent.
if [ -z "$1" ]
then
	set -- *.rpm
	while [ "$2" ]
	do
		shift
	done
fi

# Mine out all the single-token fields we'll need
rpm=$1
set -- `rpm --queryformat="%{name} %{version} %{release}" -qp $rpm`
name=$1
version=$2
release=$3

# Extract and reformat the desciption
description=`rpm --queryformat="%{description}" -qp $rpm | fmt -w 65 | sed '2,$s/^/                /'`

# Who am I?
fullname=`cat /etc/passwd | awk -F : "/^${USER}/ "'{print $5}'`
fullname="${USER}@${HOSTNAME} ($fullname)"

if [ -z "$author" ]
then 
    if [ -f AUTHORS ]
    then
	author=`cat AUTHORS`
    else
	author=$fullname
    fi
fi

# Fill in keywords if present
if [ -n "$keywords" ]
then
    keywords="Keywords:       $keywords\n"
fi

# Default the maintainer field properly
if [ -z "$maintainer" ]
then
    maintainer=`rpm --queryformat="%{packager}" -qp $rpm`
    if [ "$maintainer" = "(none)" ]
    then
        maintainer=$author
    fi
fi

# The date
date=`date '+%Y-%m-%d'`

cat >/usr/tmp/rpm2lsm.$$ <<EOF
Begin3
Title:		%{name}
Version:	%{version}
Entered-date:	${date}
Description:	${description}
${keywords}Author: 	${author}
Maintained-by:	${maintainer}
Primary-site:	%{url}
EOF

# File patterns that we ship 
tarballs="${name}-${version}.tar.gz ${name}-${version}.tgz"
rpms=${name}-${version}-${release}.*.rpm

trap "rm -f /usr/tmp/rpm2lsm.$$"  0 2 15
for file in $tarballs $rpms
do
    if [ -f $file ]
    then
        set -- `du $file`; size=$1
        echo "		${size}	${file}" >>/usr/tmp/rpm2lsm.$$
    fi
done

cat >>/usr/tmp/rpm2lsm.$$ <<EOF
Platforms:      ${platforms:-All}
Copying-policy:	%{license}
End
EOF

format=`cat /usr/tmp/rpm2lsm.$$`
rpm --queryformat="$format" -qp $rpm