Wednesday, August 3, 2011

Repack a .deb-archive

Today just a bookmark.
Needed to change some files inside a .deb archive; found a short tutorial here:
Repack a .deb-archive with dpkg-deb

For backup reasons a c&p from the blog above:
$ mkdir -p extract/DEBIAN
$ dpkg-deb -x package.deb extract/
$ dpkg-deb -e package.deb extract/DEBIAN
[...do something, e.g. edit the control file...]
$ mkdir build
$ dpkg-deb -b extract/ build/
-x extracts the package contents
-e extracts the control files
-b builds the new package
view raw gistfile1.sh hosted with ❤ by GitHub

Thanks maff.