go-deb/deb.extraction-tests/Makefile

30 lines
660 B
Makefile
Raw Normal View History

all:
make clean
make extract
make create
clean:
rm -rf stuff/ blah/ jcarr-new.deb
extract:
mkdir stuff/ blah/
cd stuff && ar x ../jcarr.deb
cd stuff && tar xvf control.tar.xz
dpkg-deb --raw-extract jcarr.deb blah/
cp control blah/DEBIAN/
cp stuff/debian-binary blah/
mkdir blah/files
mv blah/etc blah/files/
mv blah/usr blah/files/
create:
cd blah/DEBIAN && tar --ignore-failed-read -cvJf ../control.tar.xz {post,pre}{inst,rm} md5sums control
cd blah/files && tar -cvJf ../data.tar.xz .
cd blah && ar rcs ../jcarr-new.deb debian-binary control.tar.xz data.tar.xz
info:
dpkg-deb --info jcarr-new.deb
install:
dpkg --install jcarr-new.deb