Commit 07e6e1e8 authored by Brian White's avatar Brian White

git-debimport mime-support_2.17-1.tar.gz

parent a9f57b44
......@@ -5,7 +5,7 @@
# new entries in the /etc/mailcap file. More information is available from
# the 'install-mime' man page.
#
# This was written by Brian White <bcwhite@verisim.com> and has been placed
# This was written by Brian White <bcwhite@pobox.com> and has been placed
# in the public domain.
#
###############################################################################
......
#! /bin/sh
dpkg="dpkg"
echo "Info for debian package '$1':"
dpkg-deb --info $1
echo " "
......@@ -8,9 +10,17 @@ read yn
if [ "$yn" = "y" -o "$yn" = "Y" ]
then
if [ `id --user` -ne 0 ]
then
echo "Installation of Debian packages needs to be done as root."
echo -n "Enter command used to become root (eg. "sudo"): "
read sudo
dpkg="$sudo $dpkg"
fi
echo " "
echo "Installing package..."
dpkg --install $1
eval "$dpkg --install $1"
fi
echo " "
......
This is the Debian Linux "Mime-Support" package.
This package was written by Brian White <bcwhite@verisim.com> and contains
This package was written by Brian White <bcwhite@pobox.com> and contains
public information compiled from around the 'net and many people.
The "install-mime" program was written by Brian White and has been
......
mime-support (2.17-1) frozen unstable; urgency=low
* added new mime.types for .bz2, .hqx, & .sit
-- Brian White <bcwhite@pobox.com> Tue, 12 May 1998 19:06:38 -0400
mime-support (2.16-1) frozen unstable; urgency=high
* changed name of "show" to "see" (Bug#19775 and friends)
* fixed man page dangling symlink (Bug#19866)
* fixed security of run-mailcap /tmp usage (Bug#19807)
-- Brian White <bcwhite@pobox.com> Mon, 30 Mar 1998 09:44:17 -0500
mime-support (2.15-1) unstable; urgency=high
* improved run-mailcap and aliased it to "showfile"
* fixed bug in "debian-view"
-- Brian White <bcwhite@pobox.com> Fri, 13 Mar 1998 20:53:16 -0500
mime-support (2.14-1) unstable; urgency=high
* fixed bug when used with perl 5.004 (Bug#16222)
-- Brian White <bcwhite@pobox.com> Fri, 20 Feb 1998 11:47:29 -0500
mime-support (2.13-1) unstable; urgency=low
* added 'run-mailcap' program for spawning programs based on mime-type
* enforced rule that actions must not be backgrounded within mailcap
* made 'debian-view' ask to become root when installing (Bug#9018)
* added description to install order resolution (Bug#11929)
* removed obsolete rfc files (Bug#15152)
* Added binary-indep and binary-arch targets (Bug#13548)
* Left copyright file uncompressed (Bug#14510)
-- Brian White <bcwhite@pobox.com> Sat, 7 Feb 1998 16:48:50 -0500
mime-support (2.12-1) frozen unstable; urgency=low
* added more descriptive error for incorrectly formatted mailcap file
* removed "test" hack added to help netscape (slowed lynx) (bug#7294)
-- Brian White <bcwhite@verisim.com> Wed, 2 Apr 1997 14:29:49 -0500
-- Brian White <bcwhite@pobox.com> Wed, 2 Apr 1997 14:29:49 -0500
mime-support (2.11-1) unstable; urgency=low
* added hack to work around Netscape's test bug (Bug#7030)
-- Brian White <bcwhite@verisim.com> Wed, 5 Feb 1997 16:00:48 -0500
-- Brian White <bcwhite@pobox.com> Wed, 5 Feb 1997 16:00:48 -0500
mime-support (2.10-1) unstable; urgency=low
......@@ -19,7 +63,7 @@ mime-support (2.10-1) unstable; urgency=low
* added new application/rtf to mime.types
* added new application/png to mime.types (Bug#6611)
-- Brian White <bcwhite@verisim.com> Wed, 11 Dec 1996 21:42:10 -0500
-- Brian White <bcwhite@pobox.com> Wed, 11 Dec 1996 21:42:10 -0500
mime-support (2.09-1) unstable; urgency=low
......@@ -27,21 +71,21 @@ mime-support (2.09-1) unstable; urgency=low
* removed use of perl extensions so no postinst/prerm errors
* added check to make sure /etc/mailcap is valid (Bug#5848)
-- Brian White <bcwhite@verisim.com> Wed, 11 Dec 1996 21:42:10 -0500
-- Brian White <bcwhite@pobox.com> Wed, 11 Dec 1996 21:42:10 -0500
mime-support (2.08-2) frozen unstable; urgency=low
* added dependancy on perl
-- Brian White <bcwhite@verisim.com> Tue, 3 Dec 1996 11:53:55 -0500
-- Brian White <bcwhite@pobox.com> Tue, 3 Dec 1996 11:53:55 -0500
mime-support (2.08-1) frozen unstable; urgency=low
* added "autoflush" setting for STDOUT
-- Brian White <bcwhite@verisim.com> Mon, 25 Nov 1996 14:38:14 -0500
-- Brian White <bcwhite@pobox.com> Mon, 25 Nov 1996 14:38:14 -0500
mime-support (2.07-1) frozen unstable; urgency=low
......@@ -49,21 +93,21 @@ mime-support (2.07-1) frozen unstable; urgency=low
* added new application/x-pgp-signature to mime.types
* added new scripts to handle audio/basic and application/x-debian-package
-- Brian White <bcwhite@verisim.com> Fri, 22 Nov 1996 13:35:55 -0500
-- Brian White <bcwhite@pobox.com> Fri, 22 Nov 1996 13:35:55 -0500
mime-support (2.06-1) unstable; urgency=low
* changed bad content-type error into a warning
-- Brian White <bcwhite@verisim.com> Wed, 16 Oct 1996 12:01:19 +0400
-- Brian White <bcwhite@pobox.com> Wed, 16 Oct 1996 12:01:19 +0400
mime-support (2.05-1) unstable; urgency=high
* fixed typo that caused install-mime not to work (sheesh!)
-- Brian White <bcwhite@verisim.com> Fri, 11 Oct 1996 21:19:41 +0400
-- Brian White <bcwhite@pobox.com> Fri, 11 Oct 1996 21:19:41 +0400
mime-support (2.04-1) unstable; urgency=low
......@@ -72,7 +116,7 @@ mime-support (2.04-1) unstable; urgency=low
* added checking to content-types
* added text/x-vCard and text/x-vCalendar mime.types
-- Brian White <bcwhite@verisim.com> Mon, 7 Oct 1996 15:01:22 +0400
-- Brian White <bcwhite@pobox.com> Mon, 7 Oct 1996 15:01:22 +0400
mime-support (2.03-1) unstable; urgency=low
......@@ -80,9 +124,9 @@ mime-support (2.03-1) unstable; urgency=low
* added "application/x-httpd-php" type
* added defaults to install-mime prompts
-- Brian White <bcwhite@verisim.com> Thu, 24 Sep 1996 12:01:22 +0400
-- Brian White <bcwhite@pobox.com> Thu, 24 Sep 1996 12:01:22 +0400
Local variables:
mode: debian-changelog
End:
# Local variables:
# mode: debian-changelog
# End:
Source: mime-support
Section: net
Priority: standard
Maintainer: Brian White <bcwhite@verisim.com>
Maintainer: Brian White <bcwhite@pobox.com>
Standards-Version: 2.1.1.0
Package: mime-support
......@@ -13,3 +13,6 @@ Description: MIME files 'mime.types' & 'mailcap', and support programs
.
Other packages add themselves as viewers/editors/composers/etc by
using the provided "install-mime" program.
.
In addition, the command "show" will display any file based on
the entries in the mime.types and mailcap files.
......@@ -20,7 +20,7 @@ clean:
build:
@true
binary:
binary-indep:
test -f debian/rules
test root = "`whoami`"
-rm -rf debian/tmp
......@@ -31,15 +31,14 @@ binary:
chmod -R 755 debian/tmp
install -m 644 mime.types debian/tmp/etc/
install -m 644 mailcap debian/tmp/etc/
install -m 644 debian/README debian/tmp/usr/doc/$(package)/copyright
install -m 644 debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian
install -m 755 install-mime debian/tmp/usr/sbin/
install -m 644 install-mime.8 debian/tmp/usr/man/man8/
install -m 755 run-mailcap debian/tmp/usr/bin/
install -m 644 run-mailcap.1 debian/tmp/usr/man/man1/
install -m 644 rfc1521.txt debian/tmp/usr/doc/$(package)/
install -m 644 rfc1522.txt debian/tmp/usr/doc/$(package)/
install -m 644 rfc1524.txt debian/tmp/usr/doc/$(package)/
install -m 644 run-mailcap.man debian/tmp/usr/man/man8/run-mailcap.8
# install -m 644 rfc1521.txt debian/tmp/usr/doc/$(package)/
# install -m 644 rfc1522.txt debian/tmp/usr/doc/$(package)/
# install -m 644 rfc1524.txt debian/tmp/usr/doc/$(package)/
install -m 644 basic-mime debian/tmp/usr/doc/$(package)/mime-install.HOWTO
install -m 644 mime-db debian/tmp/var/lib/mime/
install -m 755 debian-view debian/tmp/usr/lib/mime/
......@@ -51,12 +50,20 @@ binary:
install -m 755 debian/conffiles debian/tmp/DEBIAN/conffiles
cd debian/tmp/usr/man; gzip -9fv */*
cd debian/tmp/usr/doc/$(package); gzip -9v *
cd debian/tmp/usr/doc/$(package); ln -s rfc1521.txt.gz mime-1.txt.gz
cd debian/tmp/usr/doc/$(package); ln -s rfc1522.txt.gz mime-2.txt.gz
cd debian/tmp/usr/doc/$(package); ln -s rfc1524.txt.gz mailcap.txt.gz
cd debian/tmp/usr/bin; ln -s run-mailcap see
cd debian/tmp/usr/man/man1; ln -s ../man8/run-mailcap.8.gz see.1.gz
install -m 644 debian/README debian/tmp/usr/doc/$(package)/copyright
# cd debian/tmp/usr/doc/$(package); ln -s rfc1521.txt.gz mime-1.txt.gz
# cd debian/tmp/usr/doc/$(package); ln -s rfc1522.txt.gz mime-2.txt.gz
# cd debian/tmp/usr/doc/$(package); ln -s rfc1524.txt.gz mailcap.txt.gz
dpkg-gencontrol -is -ip
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp
dpkg-name -o -s .. debian/tmp.deb
binary-arch:
@echo "No architecture-specific binaries"
binary: binary-indep
@echo "Binaries made"
......@@ -4,7 +4,7 @@
# Install-MIME: Install programs into "/etc/mailcap", resolve conflicts,
# auto-uninstall, make dinner, and wash dishes.
#
# Written by Brian C. White <bcwhite@verisim.com>.
# Written by Brian White <bcwhite@pobox.com>.
#
# This program has been placed in the public domain. Do whatever you wish
# with it, though I'd appreciate it if my name stayed on it as the original
......@@ -166,7 +166,7 @@ For example: Two common ways of view GIF pictures are with the "xv" and the
"xloadimage" programs. If the "xv" package were installed and the "xloadimage"
package was being installed, you might see something like the following:
New action 'view' for MIME type 'image/gif'...
New action 'view' for MIME type 'image/gif' ("gif picture format")...
--> package=xloadimage view=xloadimage -view -quiet %s
1) package=xv view=xv %s
......@@ -236,7 +236,9 @@ sub Order {
$max = ($size>9 ? 9 : $size) + 1;
do {
print "\nNew action '$action' for MIME type '$content'...\n";
my $desc="";
$desc=" ($A{description})" if $A{description};
print "\nNew action '$action' for MIME type '$content'$desc...\n";
print "-->\tpackage=$package\t$value\n";
Reformat("Note: $A{comment}") if $A{comment};
print "\n";
......@@ -311,7 +313,7 @@ sub GenMailcap {
my($action);
@list = %O;
foreach (@list) {
while (@list) {
my($idx) = shift @list;
my($val) = shift @list;
my($content,$action) = ($idx =~ m/^(.*),(.*)$/);
......@@ -412,7 +414,7 @@ sub Install {
my $val = shift @list;
if ($arg =~ m/^(view|compose|composetyped|edit|print)$/ && $val) {
# die "Error: action '$arg' ($val) cannot be backgrounded within mailcap\n" if $val=~m/\&\s*$/;
die "Error: action '$arg' ($val) cannot be backgrounded within mailcap\n" if $val=~m/\&\s*$/;
Insert($A{package},$A{content},$arg,$val,$A{test},$flags);
$changed=1;
}
......
......@@ -239,7 +239,7 @@ scripts.
RFC-1524 (/usr/doc/mime-support/rfc1524.txt)
.SH AUTHOR
.B install\-mime
was written by Brian C. White <bcwhite@pobox.com>
was written by Brian White <bcwhite@pobox.com>
.SH COPYRIGHT
.B install\-mime
is in the public domain.
......@@ -18,13 +18,14 @@ application/dca-rft
application/dec-dx
application/dsptype tsp
application/excel xls
application/ghostview
application/mac-binhex40
application/ghostview
application/mac-binhex40 hqx
application/macwriteii
application/msword doc dot wrd
application/msword doc dot
application/news-message-id
application/news-transmission
application/octet-stream bin
application/octet-stream
application/oda oda
application/pdf pdf
application/pgp-signature pgp
......@@ -38,29 +39,46 @@ application/wordperfect5.1 wp5
application/x-123 wk
application/x-Wingz wz
application/x-bcpio bcpio
application/x-bzip2 bz2
application/x-compress z Z
application/x-core
application/x-cpio cpio
application/x-csh csh
application/x-debian-package deb
application/x-msdos-program com exe bat
application/x-dvi dvi
application/x-executable
application/x-font pfa pfb gsf pcf.Z
application/x-gtar gtar tgz
application/x-gzip gz
application/x-hdf hdf
application/x-httpd-php phtml pht php
application/x-httpd-php3 php3
application/x-httpd-php3-source phps
application/x-httpd-php3-preprocessed php3p
application/x-java class
application/x-kdelnk
application/x-latex latex
application/x-maker frm maker frame fm fb book fbdoc
application/x-mif mif
application/x-msdos-program com exe bat
application/x-netcdf nc cdf
application/x-object o
application/x-perl pl pm
application/x-rx
application/x-sh sh
application/x-shar shar
application/x-shellscript
application/x-stuffit sit
application/x-sv4cpio sv4cpio
application/x-sv4crc sv4crc
application/x-tar tar
application/x-tar tar
application/x-tcl tcl
application/x-tex tex
application/x-tex-gf *gf
application/x-tex-pk pk PK
application/x-texinfo texinfo texi
application/x-trash ~ % bak old sik
application/x-troff t tr roff
application/x-troff-man man
application/x-troff-me me
......@@ -72,7 +90,7 @@ application/zip zip
audio/basic au snd
audio/midi mid midi
audio/x-aiff aif aiff aifc
audio/x-pn-realaudio ra ram
audio/x-pn-realaudio ra rm ram
audio/x-wav wav
image/gif gif
......@@ -81,6 +99,7 @@ image/jpeg jpeg jpg jpe
image/png png
image/tiff tiff tif
image/x-cmu-raster ras
image/x-ms-bmp bmp BMP
image/x-portable-anymap pnm
image/x-portable-bitmap pbm
image/x-portable-graymap pgm
......@@ -90,6 +109,13 @@ image/x-xbitmap xbm
image/x-xpixmap xpm
image/x-xwindowdump xwd
inode/chardevice
inode/blockdevice
inode/directory-locked
inode/directory
inode/fifo
inode/socket
message/external-body
message/news
message/partial
......@@ -101,11 +127,23 @@ multipart/digest
multipart/mixed
multipart/parallel
text/comma-separated-values csv
text/english
text/html html htm
text/plain txt c h cc hh cpp hpp
text/plain txt
text/richtext rtx
text/tab-separated-values tsv
text/x-c++hdr hpp hxx hh
text/x-c++src cpp cxx cc
text/x-chdr h
text/x-csrc c
text/x-java java
text/x-makefile
text/x-moc moc
text/x-pascal p pas
text/x-setext etx
text/x-tcl tcl tk
text/x-tex tex ltx sty cls
text/x-vCalendar vcs
text/x-vCard vcf
......
#! /usr/bin/perl -w
#! /usr/bin/perl
###############################################################################
#
# Run-Mailcap: Run a program specified in the mailcap file based on a mime
# type.
#
# Written by Brian C. White <bcwhite@pobox.com>
# Written by Brian White <bcwhite@pobox.com>
# This file has been placed in the public domain (the only true "free").
#
###############################################################################
$debug=0;
$etcmailcap="/etc/mailcap";
$usrmailcap="$ENV{HOME}/.mailcap";
$etcmimetyp="/etc/mime.types";
$usrmimetyp="$ENV{HOME}/.mime.types";
sub Usage {
my($error) = @_;
print STDERR $error,"\n\n" if $error;
print STDERR "Use: $0 <--options=values> [...] <mime-type:filename> [...]\n\n";
print STDERR "Use: $0 <--option=value> [...] [<mime-type>:]<filename> [...]\n\n";
print STDERR "Options:\n";
print STDERR " action specify what action to do on these files (manditory)\n";
print STDERR " action specify what action to do on these files (default=view)\n";
print STDERR " debug be verbose about what's going on (any non-zero value)\n";
print STDERR "\n";
......@@ -40,6 +43,7 @@ sub SaveStdin {
$tmp =~ s|%s|$tmpfile|;
$tmpfile = $tmp;
}
unlink($tmpfile);
open(TMPFILE,">$tmpfile") || die "Error: could not write '$tmpfile' -- $!\n";
while (<STDIN>) {
print TMPFILE $_;
......@@ -50,25 +54,65 @@ sub SaveStdin {
}
sub ExtensionMimetype {
my($ext) = @_;
local $/ = undef;
unless ($mimetypes) {
if (open(MIMETYPES,"<$usrmimetyp")) {
$mimetypes .= <MIMETYPES>;
close MIMETYPES;
}
open(MIMETYPES,"<$etcmimetyp") || die "Error: could not read '$etcmimetyp' -- $!\n";
$mimetypes .= <MIMETYPES>;
close MIMETYPES;
}
$mimetypes =~ m!^(([\w-]+/[\w-]+).*\s\Q$ext\E(\s.*)?)$!m;
print " - extension '$ext' maps to mime-type '$2'\n" if $debug;
return $2;
}
sub FileMimetype {
my($file) = @_;
my($ext) =m!\.([^/\.]+)$!;
return unless $ext;
return ExtensionMimetype($ext);
}
foreach (@ARGV) {
if (m/^--(.*?)=(.*)$/) {
print STDERR "Warning: definition of '$1=$2' overrides value '${$1}'\n" if $ {$1};
print " - parsing parameter '$_'\n" if $debug;
if (m!^--(.*?)=(.*)$!) {
print STDERR "Warning: definition of '$1=$2' overrides value '${$1}'\n" if ($ {$1} && $ {$1} != $2);
$ {$1}=$2;
} elsif (m/:/) {
} elsif (m!^[^/]+/[^/]+:!) {
push @files,$_;
} else {
Usage "Error: unrecognized option '$_'";
my $file=$_;
my $type=FileMimetype($file);
if ($type && $file) {
push @files,"$type:$file";
} else {
print STDERR "Warning: unknown mime-type for file '$file'\n";
}
}
}
Usage "Error: no action specified" unless $action;
$action="view" unless $action;
if (open(MAILCAP,"<$usrmailcap")) {
while (<MAILCAP>) {
chomp;
next unless $_;
next if m/^#/;
next if m/^\#/;
push @mailcap,$_;
}
close MAILCAP;
......@@ -78,7 +122,7 @@ open(MAILCAP,"<$etcmailcap") || die "Error: could not read '$etcmailcap' -- $!\n
while (<MAILCAP>) {
chomp;
next unless $_;
next if m/^#/;
next if m/^\#/;
push @mailcap,$_;
}
close MAILCAP;
......@@ -95,6 +139,7 @@ foreach (@files) {
my $done=0;
foreach $match (@matches) {
my $comm;
print " - checking mailcap entry '$match'\n" if $debug;
if ($action eq "view") {
($comm) = ($match =~ m/^.*?;\s*(.*?)\s*($|;)/);
} else {
......@@ -116,13 +161,6 @@ foreach (@files) {
}
$comm = "/usr/bin/X11/xterm -T '$file ($type)' -e $0 --action=$action ${type}:${file}";
# exec "/usr/bin/X11/xterm", "-T" ,"$0 @ARGV", "-e", $0, @ARGV;
# $comm = "/usr/bin/X11/xterm -T '$file ($type)' -e /bin/sh -c ".'"'.$comm.'"';
# system "/usr/bin/X11/xterm","-T","$file ($type)","-e",$0,"--action=$action","${type}:${file}";
#
# unlink $tmpfile if $tmpfile;
# last;
}
if ($file ne "-") {
......
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.\" Run-mailcap and this manpage were written by Brian White and
.\" run-mailcap, see and this manpage were written by Brian White and
.\" have been placed in the public domain.
.\"
.TH RUN-MAILCAP 1 "8th Feb 1997" "Debian Project" "Run Mailcap Programs"
.TH RUN-MAILCAP 1 "14th Mar 1998" "Debian Project" "Run Mailcap Programs"
.SH NAME
run\-mailcap \- execute programs via entries in the mailcap file
run-mailcap, see \- execute programs via entries in the
.I mailcap
file
.SH SYNOPSIS
.B run\-mailcap
.B see
\-\-action=<action> [\-\-debug=<value>]
<mime-type>:<filename> [...]
[<mime-type>:]<filename> [...]
.B run-mailcap
\-\-action=<action> [\-\-debug=<value>]
[<mime-type>:]<filename> [...]
.SH DESCRIPTION
.PP
.B run-mailcap
will use the given action to process each mime-type/file in turn.
( or its alias,
.B see
) will use the given action to process each mime-type/file in turn.
Each file is is specified as its mime-type and filename together,
separated by a colon.
separated by a colon. If the mime-type is omitted, an attempt to
determine the type is made by trying to match the file's extension
with those in the
.I mime.types
files.
Both the user's files (~/.mailcap; ~/.mime.types) and the system files
(/etc/mailcap; /etc/mime.types) are searched in turn for information.
.SS OPTIONS
All options are in the form --<opt>=<value>.
......@@ -29,18 +44,16 @@ Performs the specified action on the files. Valid actions are
,
.I edit
, and
.I print
.
.I print.
If no action is specified, "view" will be used.
.TP
.BI \-\-debug=<value>
Turns on extra information to find out what is happening. Any value
other than zero (0) will turn on debugging output.
.SH "SEE ALSO"
RFC-1524 (/usr/doc/mime-support/rfc1524.txt)
.SH AUTHOR
.B run\-mailcap
was written by Brian C. White <bcwhite@pobox.com>
.B run-mailcap
(see) was written by Brian White <bcwhite@pobox.com>.
.SH COPYRIGHT
.B run\-mailcap
is in the public domain.
.B run-mailcap
(see) is in the public domain.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment