source: pkgmngt/packInstall.sh@ b2c7742

2.4 ablfs-more legacy new_features trunk
Last change on this file since b2c7742 was 4c6f54f, checked in by Pierre Labastie <pierre@…>, 13 years ago

Fix svn properties on some files

  • Property mode set to 100644
File size: 1.1 KB
Line 
1# $Id$
2# function for packing and installing a tree. We only have access
3# to variables PKGDIR and PKG_DEST
4
5packInstall() {
6
7local PCKGVRS=$(basename $PKGDIR)
8local TGTPKG=$(basename $PKG_DEST)
9local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' |
10 sed 's/^[0-9]\{1\}-//')
11case $PCKGVRS in
12 expect*|tcl*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*//') ;;
13 vim*|unzip*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/') ;;
14 tidy*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]*\)/\1cvs/') ;;
15 docbook-xml) local VERSION=4.5 ;;
16 *) local VERSION=$(echo ${PCKGVRS} | sed 's/^.*-\([0-9]\)/\1/');;
17esac
18local ARCHIVE_NAME=$(dirname ${PKGDIR})/${PACKAGE}_${VERSION}.deb
19case $(uname -m) in
20 x86_64) local ARCH=amd64 ;;
21 *) local ARCH=i386 ;;
22esac
23
24pushd $PKG_DEST
25rm -fv ./usr/share/info/dir
26mkdir DEBIAN
27cat > DEBIAN/control <<EOF
28Package: $PACKAGE
29Version: $VERSION
30Maintainer: Pierre Labastie <lnimbus@club-internet.fr>
31Description: $PACKAGE
32Architecture: $ARCH
33EOF
34dpkg-deb -b . $ARCHIVE_NAME
35dpkg -i $ARCHIVE_NAME
36mv -v $ARCHIVE_NAME /var/lib/packages
37popd
38}
Note: See TracBrowser for help on using the repository browser.