summaryrefslogtreecommitdiffstats
path: root/makePackage
blob: 4bdfc56ce3ff96540e4fa5b5f3b56dcdac980792 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python

# The general algorithm this program follows goes like this:
#   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 \*.opk | xargs -n 1 makePackage > Packages
from __future__ import absolute_import
from __future__ import print_function

import sys
import opkg

fn = sys.argv[1]
pkg = opkg.Package(fn)
print(pkg)