source: pkgmngt/packInstall.sh@ b533b78

2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since b533b78 was 7072e1f, checked in by Thomas Pegg <thomasp@…>, 13 years ago

Commit Pierre Labastie's patch for including package management support in jhalfs. NOTE: Package management is by default disabled.

  • 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.