Open mcandre opened 7 years ago
The more the merrier! I don't know much about the opkg format, but if we had details about how to create these packages, we could codify that in fpm.
.ipk packages are basically the same as dpkg deb files. It seems that the key difference is, ipkg package format is tar.gz
, while deb is ar
.
Besides, Debian and Ubuntu typically use Architecture: amd64
for x86_64 systems, while OSes like OpenWrt use Architecture: x86_64
instead. I saw a conversion in fpm code, and this should be removed to pack a usable OpenWrt package.
I wrote a simple script snippet to demonstrate how to convert an existing deb file to ipk in my blog, although I'm not sure to what degree it works.
ar x openwrttest_1.0.0-1_amd64.deb
mkdir control && pushd control
tar xf ../control.tar.gz
sed "s/Architecture:\\ amd64/Architecture:\\ x86_64/g" ./control -i
tar czf ../control.tar.gz ./*
popd
tar czf openwrttest_1.0.0-1_x86_64.ipk control.tar.gz data.tar.gz debian-binary
opkg install ./openwrttest_1.0.0-1_x86_64.ipk
@hjc4869 In that case, would you mind submitting a pull request to copy-paste-modify a new IPK output option based on the DEB output option?
I'll try to have a look at this if time allows - in the meantime I hacked up a script from @hjc4869 suggestion https://gist.github.com/pldubouilh/c5703052986bfdd404005951dee54683
FPM is the shit! Could we also build .ipk's with FPM, for embedded Linux distros like OpenWrt / busybox?