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