extracting and creating ipk files
I have tested "ar x package-name.ipk" command but it didn't help
I found bellow command which worked perfectly
tar zxpvf package-name.ipk
This extracts three files:
debian-binary
data.tar.gz
control.tar.gz
use the same command to open data.tar.gz and control.tar.gz files
for more information refer to https://cognito.me.uk/computers/manual-extractioninstallation-of-ipk-packages-on-gargoyleopenwrt/
You need to create a control
file, and then do some archiving using tar
and ar
. In my case, I was distributing just python scripts, so there was no architecture dependency. You should check the control
and Makefile
into version control, and delete all the other intermediate files.
Here are the contents of control
Package: my-thing-python Version: 1.0 Description: python scripts for MyCompany Section: extras Priority: optional Maintainer: John License: CLOSED Architecture: all OE: my-thing-python Homepage: unknown Depends: python python-distutils python-pyserial python-curses python-mmap python-ctypes Source: N/A
Here is my Makefile
which sits in the same directory as all my python scripts.
all: my-thing-python.ipk my-thing-python.ipk: rm -rf ipk mkdir -p ipk/opt/my-thing-python cp *.py ipk/opt/my-thing-python tar czvf control.tar.gz control cd ipk; tar czvf ../data.tar.gz .; cd .. echo 2.0 > debian-binary ar r my-thing-python.ipk control.tar.gz data.tar.gz debian-binary clean: FORCE rm -rf ipk rm -f control.tar.gz rm -f data.tar.gz rm -f my-thing-python.ipk FORCE:
I figured it out.
You can extract the main package with the ar x
command, then extract the control.tar.gz with the tar -zxf
command.