Re: Packages
rshutt@ravenet.com (Randall Shutt) wrote on 15.02.96 in <[🔎] Pine.LNX.3.91.960215082951.3145A-100000@extacy.tical.com>:
> > dselect). Maybe there is same way of preparing .deb package from normal
> > one in usual .tgz format??
> >
> > Thanks in advance!
> >
>
> Makeing .deb's is VERY simple. Too bad dpkg-deb doesnt have a
> manual page. Basically, to get an idea of what you have to do, use
Well, the following shell script will do it. Input a Slackware package,
output a Debian package.
Maybe something like this should go into the dpkg package?
For package names, maybe you should call them localxyz to avoid clashing
with a future Debian package.
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1996-02-15 19:55 MET by <root@khms>.
# Source directory was `/root/testdir'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 1711 -rwxr-xr-x slack2deb
#
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
shar_touch=touch
else
shar_touch=:
echo
echo 'WARNING: not restoring timestamps. Consider getting and'
echo "installing GNU \`touch', distributed in GNU File Utilities..."
echo
fi
rm -f 1231235999 $$.touch
#
# ============= slack2deb ==============
if test -f 'slack2deb' && test X"$1" != X"-c"; then
echo 'x - skipping slack2deb (file already exists)'
else
echo 'x - extracting slack2deb (text)'
sed 's/^X//' << 'SHAR_EOF' > 'slack2deb' &&
#!/bin/bash
X
# Minimal conversion of a Slackware package to a Debian package
# Copyright (C) 1996 Kai Henningsen <kai@khms.westfalen.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X
usage(){
X echo
X echo Usage:
X echo $0 arch.tar.gz debname debversion myemail '"debdescription"'
X echo
X echo Minimal conversion of a Slackware package to a Debian package
X echo " arch.tar.gz - the Slackware package to convert"
X echo " debname - the name of the package to create"
X echo " debversion - the version number"
X echo " myemail - your email address"
X echo " \"debdescription\" - a description string"
X echo
X echo For best effect, run as root
X echo Will not preserve groups and/or users that don\'t exist
X echo on your system
X echo
X exit 255
}
X
[ $# != 5 ] && usage ;
X
work=/tmp/slack2deb.$$
X
mkdir $work
X
tar -x -C $work -z -f $1
X
mkdir $work/DEBIAN
X
cat >$work/DEBIAN/control <<EOF
Package: $2
Version: $3
Maintainer: $4
Description: $5
EOF
X
dpkg-deb -b $work
X
dpkg-name $work.deb
X
rm -rf $work
X
SHAR_EOF
$shar_touch -am 0215195596 'slack2deb' &&
chmod 0755 'slack2deb' ||
echo 'restore of slack2deb failed'
shar_count="`wc -c < 'slack2deb'`"
test 1711 -eq "$shar_count" ||
echo "slack2deb: original size 1711, current size $shar_count"
fi
exit 0
MfG Kai
Reply to:
- Follow-Ups:
- Re: Packages
- From: Raul Miller <rdm@tad.micro.umn.edu>
- Re: TR
- From: Leszek Gerwatowski <lg@peryt.waw.pl>
- Re: Packages
- From: Bill Hogan <bhogan@rahul.net>
- Re: Packages
- From: kai@khms.westfalen.de (Kai Henningsen)
- References:
- Packages
- From: Leszek Gerwatowski <lg@peryt.waw.pl>