ablfs-more
legacy
trunk
Last change
on this file since dfab075 was 89bcb1b, checked in by Pierre Labastie <pierre@…>, 4 years ago |
Allow scriptlet numbering to be on 4 digits in packInstall.sh*
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | # $Id$
|
---|
2 | # function for packing and installing a tree. We only have access
|
---|
3 | # to variables PKGDIR and PKG_DEST
|
---|
4 |
|
---|
5 | packInstall() {
|
---|
6 |
|
---|
7 | local PCKGVRS=$(basename $PKGDIR)
|
---|
8 | local TGTPKG=$(basename $PKG_DEST)
|
---|
9 | local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3,4\}-//' |
|
---|
10 | sed 's/^[0-9]\{2\}-//')
|
---|
11 | case $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/' |
|
---|
17 | sed 's/_/./g');;
|
---|
18 | # the last sed above is because dpkg does not want a '_' in version.
|
---|
19 | esac
|
---|
20 | local ARCHIVE_NAME=$(dirname ${PKGDIR})/${PACKAGE}_${VERSION}.deb
|
---|
21 | case $(uname -m) in
|
---|
22 | x86_64) local ARCH=amd64 ;;
|
---|
23 | *) local ARCH=i386 ;;
|
---|
24 | esac
|
---|
25 |
|
---|
26 | pushd $PKG_DEST
|
---|
27 | rm -fv ./usr/share/info/dir
|
---|
28 | mkdir DEBIAN
|
---|
29 | cat > DEBIAN/control <<EOF
|
---|
30 | Package: $PACKAGE
|
---|
31 | Version: $VERSION
|
---|
32 | Maintainer: Pierre Labastie <lnimbus@club-internet.fr>
|
---|
33 | Description: $PACKAGE
|
---|
34 | Architecture: $ARCH
|
---|
35 | EOF
|
---|
36 | dpkg-deb -z9 -b . $ARCHIVE_NAME
|
---|
37 | dpkg -i $ARCHIVE_NAME
|
---|
38 | mv -v $ARCHIVE_NAME /var/lib/packages
|
---|
39 | popd
|
---|
40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.