Changeset 4560


Ignore:
Timestamp:
07/28/08 12:29:45 (5 years ago)
Author:
tick
Message:

opkg-util make .opk as the default file extension

"opkg-build -i ..." means creating .ipk file for backward support

Location:
trunk/src/host/opkg-utils
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/host/opkg-utils/arfile.py

    r4534 r4560  
    112112        dir = sys.argv[1] 
    113113    for f in os.listdir(dir): 
    114         if not f.endswith(".ipk"): continue 
     114        if not f.endswith(".opk") and not f.endswith(".ipk"): continue 
    115115 
    116116        print "=== %s ===" % f 
  • trunk/src/host/opkg-utils/makePackage

    r4534 r4560  
    55#   Insert the filename, size, and md5 lines before the description. 
    66# Call it like this: 
    7 #  find . -name \*.ipk | xargs -n 1 makePackage > Packages 
     7#  find . -name \*.opk | xargs -n 1 makePackage > Packages 
    88 
    99import sys 
  • trunk/src/host/opkg-utils/opkg-build

    r4534 r4560  
    11#!/bin/sh 
    22 
    3 # opkg-build -- construct a .ipk from a directory 
     3# opkg-build -- construct a .opk from a directory 
    44# Carl Worth <cworth@east.isi.edu> 
    55# based on a script by Steve Redler IV, steve@sr-tech.com 5-21-2001 
     
    113113            echo "used to build this package.  Either gnu-style tarballs or Debian source packages " 
    114114            echo "are acceptable.  Relative filenames may be used if they are distributed in the same" 
    115             echo "directory as the .ipk file." 
     115            echo "directory as the .opk file." 
    116116        fi 
    117117 
     
    159159outer=ar 
    160160noclean=0 
    161 usage="Usage: $0 [-c] [-C] [-o owner] [-g group] <pkg_directory> [<destination_directory>]" 
     161ipkext=0 
     162usage="Usage: $0 [-c] [-C] [-i] [-o owner] [-g group] <pkg_directory> [<destination_directory>]" 
    162163while getopts "cg:ho:v" opt; do 
    163164    case $opt in 
     
    172173        C ) noclean=1 
    173174            ;; 
     175        i ) ipkext=1 
     176            ;; 
    174177        v ) echo $version 
    175178            exit 0 
    176179            ;; 
    177         h )     echo $usage  >&2 ;; 
    178         \? )    echo $usage  >&2 
     180        h )      
     181            echo $usage  >&2  
     182            exit 0 
     183            ;; 
     184        \? )     
     185            echo $usage  >&2 
    179186        esac 
    180187done 
     
    233240echo "2.0" > $tmp_dir/debian-binary 
    234241 
    235 pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk 
     242if (( $ipkext == 1)); then  
     243        pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk 
     244else 
     245        pkg_file=$dest_dir/${pkg}_${version}_${arch}.opk 
     246fi 
     247 
    236248rm -f $pkg_file 
    237249if [ "$outer" = "ar" ] ; then 
  • trunk/src/host/opkg-utils/opkg-buildpackage

    r4534 r4560  
    2424# 
    2525# You should run this with fakeroot (1) or as root. 
    26 # If all went well, you will find a diff file and an *.ipk file in the 
     26# If all went well, you will find a diff file and an *.opk file in the 
    2727# directory above. 
    2828 
     
    207207done 
    208208 
    209 # build the ipk package 
     209# build the opk package 
    210210owd=`pwd` 
    211211cd .. 
  • trunk/src/host/opkg-utils/opkg-diff

    r4534 r4560  
    22 
    33pkg1=$1 
    4 dir1=`echo $pkg1 | sed s/.ipk//` 
     4dir1=`echo $pkg1 | sed s/.opk//` 
    55dir1=`basename $dir1`  
    66pkg2=$2 
    7 dir2=`echo $pkg2 | sed s/.ipk//` 
     7dir2=`echo $pkg2 | sed s/.opk//` 
    88dir2=`basename $dir2`  
    99 
  • trunk/src/host/opkg-utils/opkg-extract-file

    r4534 r4560  
    44 
    55if [ $# -lt 1 ]; then 
    6         echo "usage: $0: package.ipk filename ..." 
     6        echo "usage: $0: package.opk filename ..." 
    77        exit 1 
    88fi 
     
    3333mkdir $tmpdir 
    3434 
    35 pkgdir=$tmpdir/`basename $opkgfilename | sed 's/.*\///;s/.ipk$//;s/.deb$//'` 
     35pkgdir=$tmpdir/`basename $opkgfilename | sed 's/.*\///;s/.opk$//;s/.deb$//;s/.ipk$//'` 
    3636 
    3737mkdir -p $pkgdir/CONTROL 
  • trunk/src/host/opkg-utils/opkg-list-fields

    r4534 r4560  
    44 
    55def usage(): 
    6      sys.stderr.write("%s ipk\n" % (sys.argv[0],)) 
     6     sys.stderr.write("%s opk\n" % (sys.argv[0],)) 
    77     sys.exit(-1) 
    88 
  • trunk/src/host/opkg-utils/opkg-make-index

    r4534 r4560  
    9494if (verbose): 
    9595     sys.stderr.write("Reading in all the package info from %s\n" % (pkg_dir, )) 
    96 files=glob(pkg_dir + '/*.ipk') + glob(pkg_dir + '/*.deb') 
     96files=glob(pkg_dir + '/*.opk') + glob(pkg_dir + '/*.deb') + glob(pkg_dir + '/*.ipk') 
    9797files.sort() 
    9898for filename in files: 
  • trunk/src/host/opkg-utils/opkg-unbuild

    r4534 r4560  
    44 
    55if (len(sys.argv) == 0): 
    6     print 'usage: %s: package.ipk' % sys.argv[0] 
     6    print 'usage: %s: package.opk' % sys.argv[0] 
    77    sys.exit(1) 
    88 
     
    1010    m = re.match('((.*/)*)(.*)', filename) 
    1111    pkg = m.group(3) 
    12     m = re.match('(.*)((.ipk)|(.deb))', filename) 
     12    m = re.match('(.*)((.opk)|(.deb)|(.ipk))', filename) 
    1313    if m: 
    1414        pkg = m.group(1) 
  • trunk/src/host/opkg-utils/opkg.py

    r4534 r4560  
    356356                bits = bits + " data.tar.gz" 
    357357 
    358         file = "%s_%s_%s.ipk" % (self.package, self.version, self.architecture) 
     358        file = "%s_%s_%s.opk" % (self.package, self.version, self.architecture) 
    359359        cmd = "cd %s ; tar cvfz %s/%s %s" % (self.scratch_dir, 
    360360                                             dirname, 
Note: See TracChangeset for help on using the changeset viewer.