diff --git a/arfile.py b/arfile.py index e1886a3..398265c 100644 --- a/arfile.py +++ b/arfile.py @@ -111,7 +111,7 @@ if __name__ == "__main__": if len(sys.argv) > 1: dir = sys.argv[1] for f in os.listdir(dir): - if not f.endswith(".ipk"): continue + if not f.endswith(".opk") and not f.endswith(".ipk"): continue print "=== %s ===" % f f = open(dir + "/" + f, "rb") diff --git a/makePackage b/makePackage index b9c8070..082a81f 100755 --- a/makePackage +++ b/makePackage @@ -4,7 +4,7 @@ # Run tar to extract control from control.tar.gz from the package. # Insert the filename, size, and md5 lines before the description. # Call it like this: -# find . -name \*.ipk | xargs -n 1 makePackage > Packages +# find . -name \*.opk | xargs -n 1 makePackage > Packages import sys import opkg diff --git a/opkg-build b/opkg-build index b7be3dc..82ee291 100755 --- a/opkg-build +++ b/opkg-build @@ -1,6 +1,6 @@ #!/bin/sh -# opkg-build -- construct a .ipk from a directory +# opkg-build -- construct a .opk from a directory # Carl Worth # based on a script by Steve Redler IV, steve@sr-tech.com 5-21-2001 # 2003-04-25 rea@sr.unh.edu @@ -112,7 +112,7 @@ You probably want to chown these to a system user: " >&2 echo "The Source field contain the URL's or filenames of the source code and any patches" echo "used to build this package. Either gnu-style tarballs or Debian source packages " echo "are acceptable. Relative filenames may be used if they are distributed in the same" - echo "directory as the .ipk file." + echo "directory as the .opk file." fi disallowed_filename=`disallowed_field Filename` @@ -158,7 +158,8 @@ You probably want to chown these to a system user: " >&2 ogargs="" outer=ar noclean=0 -usage="Usage: $0 [-c] [-C] [-o owner] [-g group] []" +ipkext=0 +usage="Usage: $0 [-c] [-C] [-i] [-o owner] [-g group] []" while getopts "cg:ho:v" opt; do case $opt in o ) owner=$OPTARG @@ -171,11 +172,17 @@ while getopts "cg:ho:v" opt; do ;; C ) noclean=1 ;; + i ) ipkext=1 + ;; v ) echo $version exit 0 ;; - h ) echo $usage >&2 ;; - \? ) echo $usage >&2 + h ) + echo $usage >&2 + exit 0 + ;; + \? ) + echo $usage >&2 esac done @@ -232,7 +239,12 @@ rm $tmp_dir/tarX echo "2.0" > $tmp_dir/debian-binary -pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk +if (( $ipkext == 1)); then + pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk +else + pkg_file=$dest_dir/${pkg}_${version}_${arch}.opk +fi + rm -f $pkg_file if [ "$outer" = "ar" ] ; then ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz ) diff --git a/opkg-buildpackage b/opkg-buildpackage index 5ddc707..719c9a5 100755 --- a/opkg-buildpackage +++ b/opkg-buildpackage @@ -23,7 +23,7 @@ # * clean cleans ;-) # # You should run this with fakeroot (1) or as root. -# If all went well, you will find a diff file and an *.ipk file in the +# If all went well, you will find a diff file and an *.opk file in the # directory above. set -e @@ -206,7 +206,7 @@ for i in ${files_optional} ; do fi done -# build the ipk package +# build the opk package owd=`pwd` cd .. opkg-build /tmp/${pkg} || exit 1 diff --git a/opkg-diff b/opkg-diff index 49ca276..bad0b3c 100755 --- a/opkg-diff +++ b/opkg-diff @@ -1,10 +1,10 @@ #!/bin/sh pkg1=$1 -dir1=`echo $pkg1 | sed s/.ipk//` +dir1=`echo $pkg1 | sed s/.opk//` dir1=`basename $dir1` pkg2=$2 -dir2=`echo $pkg2 | sed s/.ipk//` +dir2=`echo $pkg2 | sed s/.opk//` dir2=`basename $dir2` opkg-unbuild $pkg2 diff --git a/opkg-extract-file b/opkg-extract-file index aadaf12..7c952ad 100755 --- a/opkg-extract-file +++ b/opkg-extract-file @@ -3,7 +3,7 @@ set -e if [ $# -lt 1 ]; then - echo "usage: $0: package.ipk filename ..." + echo "usage: $0: package.opk filename ..." exit 1 fi @@ -32,7 +32,7 @@ esac tmpdir=/tmp/opkg-extract-$$ mkdir $tmpdir -pkgdir=$tmpdir/`basename $opkgfilename | sed 's/.*\///;s/.ipk$//;s/.deb$//'` +pkgdir=$tmpdir/`basename $opkgfilename | sed 's/.*\///;s/.opk$//;s/.deb$//;s/.ipk$//'` mkdir -p $pkgdir/CONTROL diff --git a/opkg-list-fields b/opkg-list-fields index fb0dbd6..d263b90 100755 --- a/opkg-list-fields +++ b/opkg-list-fields @@ -3,7 +3,7 @@ import sys, opkg def usage(): - sys.stderr.write("%s ipk\n" % (sys.argv[0],)) + sys.stderr.write("%s opk\n" % (sys.argv[0],)) sys.exit(-1) if (len(sys.argv) < 2): diff --git a/opkg-make-index b/opkg-make-index index c45340a..ae829e6 100755 --- a/opkg-make-index +++ b/opkg-make-index @@ -93,7 +93,7 @@ if old_filename: if (verbose): sys.stderr.write("Reading in all the package info from %s\n" % (pkg_dir, )) -files=glob(pkg_dir + '/*.ipk') + glob(pkg_dir + '/*.deb') +files=glob(pkg_dir + '/*.opk') + glob(pkg_dir + '/*.deb') + glob(pkg_dir + '/*.ipk') files.sort() for filename in files: basename = os.path.basename(filename) diff --git a/opkg-unbuild b/opkg-unbuild index 661d4f1..eff604b 100755 --- a/opkg-unbuild +++ b/opkg-unbuild @@ -3,13 +3,13 @@ import sys, os, re if (len(sys.argv) == 0): - print 'usage: %s: package.ipk' % sys.argv[0] + print 'usage: %s: package.opk' % sys.argv[0] sys.exit(1) for filename in sys.argv[1:]: m = re.match('((.*/)*)(.*)', filename) pkg = m.group(3) - m = re.match('(.*)((.ipk)|(.deb))', filename) + m = re.match('(.*)((.opk)|(.deb)|(.ipk))', filename) if m: pkg = m.group(1) diff --git a/opkg.py b/opkg.py index 2fde41a..9f1b85b 100644 --- a/opkg.py +++ b/opkg.py @@ -355,7 +355,7 @@ class Package: bits = bits + " data.tar.gz" - file = "%s_%s_%s.ipk" % (self.package, self.version, self.architecture) + file = "%s_%s_%s.opk" % (self.package, self.version, self.architecture) cmd = "cd %s ; tar cvfz %s/%s %s" % (self.scratch_dir, dirname, file,