ablfs
Last change
on this file since f53dc4c 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 |
|
---|
5 | packInstall() {
|
---|
6 |
|
---|
7 | local PCKGVRS=$(basename $PKGDIR)
|
---|
8 | local TGTPKG=$(basename $PKG_DEST)
|
---|
9 | local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' |
|
---|
10 | sed 's/^[0-9]\{1\}-//')
|
---|
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 | esac
|
---|
18 | local ARCHIVE_NAME=$(dirname ${PKGDIR})/${PACKAGE}_${VERSION}.deb
|
---|
19 | case $(uname -m) in
|
---|
20 | x86_64) local ARCH=amd64 ;;
|
---|
21 | *) local ARCH=i386 ;;
|
---|
22 | esac
|
---|
23 |
|
---|
24 | pushd $PKG_DEST
|
---|
25 | rm -fv ./usr/share/info/dir
|
---|
26 | mkdir DEBIAN
|
---|
27 | cat > DEBIAN/control <<EOF
|
---|
28 | Package: $PACKAGE
|
---|
29 | Version: $VERSION
|
---|
30 | Maintainer: Pierre Labastie <lnimbus@club-internet.fr>
|
---|
31 | Description: $PACKAGE
|
---|
32 | Architecture: $ARCH
|
---|
33 | EOF
|
---|
34 | dpkg-deb -b . $ARCHIVE_NAME
|
---|
35 | dpkg -i $ARCHIVE_NAME
|
---|
36 | mv -v $ARCHIVE_NAME /var/lib/packages
|
---|
37 | popd
|
---|
38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.